Tidy: Sort/remove usings, simplify names
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using Disco.Models.Services.Devices.Importing;
|
||||
using System;
|
||||
|
||||
namespace Disco.Services.Devices.Importing
|
||||
{
|
||||
public class DeviceImportColumn : IDeviceImportColumn
|
||||
{
|
||||
public int Index { get; set; }
|
||||
public string Name { get; set; }
|
||||
public DeviceImportFieldTypes Type { get; set; }
|
||||
public Type Handler { get; set; }
|
||||
|
||||
public IDeviceImportField GetHandlerInstance()
|
||||
{
|
||||
if (Handler == null)
|
||||
throw new InvalidOperationException($"No field handler available for this type {Type.ToString()}.");
|
||||
|
||||
return (IDeviceImportField)Activator.CreateInstance(Handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user