using System.Collections.Generic; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.SoftCodec { /// /// Represents a GenericSoftCodecFactory /// public class GenericSoftCodecFactory : EssentialsDeviceFactory { /// /// Initializes a new instance of the class /// public GenericSoftCodecFactory() { TypeNames = new List { "genericsoftcodec" }; } /// /// BuildDevice method /// /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Attempting to create new Generic SoftCodec Device"); var props = dc.Properties.ToObject(); return new GenericSoftCodec(dc.Key, dc.Name, props); } } }