mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-09 09:45:06 +00:00
- moved files into folders to match their current namespace - did not update any namespaces to maintain backward compatibility
23 lines
837 B
C#
23 lines
837 B
C#
using System.Collections.Generic;
|
|
using PepperDash.Core;
|
|
using PepperDash.Essentials.Core.Config;
|
|
|
|
namespace PepperDash.Essentials.Core
|
|
{
|
|
public class ConsoleCommMockDeviceFactory : EssentialsDeviceFactory<ConsoleCommMockDevice>
|
|
{
|
|
public ConsoleCommMockDeviceFactory()
|
|
{
|
|
TypeNames = new List<string>() { "commmock" };
|
|
}
|
|
|
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
|
{
|
|
Debug.Console(1, "Factory Attempting to create new Comm Mock Device");
|
|
var comm = CommFactory.CreateCommForDevice(dc);
|
|
var props = Newtonsoft.Json.JsonConvert.DeserializeObject<ConsoleCommMockDevicePropertiesConfig>(
|
|
dc.Properties.ToString());
|
|
return new ConsoleCommMockDevice(dc.Key, dc.Name, props, comm);
|
|
}
|
|
}
|
|
} |