Merge branch 'feature/rework-plugin-loading-process-to-avoid-assembly-conflicts' into feature/ecs-1209

# Conflicts:
#	essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj
This commit is contained in:
Neil Dorin
2020-04-01 11:19:30 -06:00
12 changed files with 201 additions and 718 deletions

View File

@@ -13,12 +13,14 @@ using PepperDash.Essentials.Core.Config;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Serves as a generic wrapper class for all styles of IBasicCommuncation ports
/// </summary>
public class
GenericComm : ReconfigurableDevice
public class GenericComm : ReconfigurableDevice
{
EssentialsControlPropertiesConfig PropertiesConfig;
public IBasicCommunication CommPort { get; private set; }
@@ -29,6 +31,14 @@ namespace PepperDash.Essentials.Core
PropertiesConfig = CommFactory.GetControlPropertiesConfig(config);
CommPort = CommFactory.CreateCommForDevice(config);
}
public static IKeyed BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new Generic Comm Device");
return new GenericComm(dc);
}
public void SetPortConfig(string portConfig)
@@ -51,6 +61,22 @@ namespace PepperDash.Essentials.Core
ConfigWriter.UpdateDeviceConfig(config);
}
public class Factory : EssentialsDevice.Factory
{
#region IDeviceFactory Members
List<string> TypeNames = new List<string>() { "genericComm" };
#endregion
public override IKeyed BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new Generic Comm Device");
return new GenericComm(dc);
}
}
}
}