/// <summary>
        /// Initializes an instance of this class and creates all <see cref="Led"/> resources in the non-persistent <see cref="ILedStorage"/>.
        /// </summary>
        /// <param name="ledStorage">reference to the <see cref="ILedStorage"/>  where all groups are stored</param>
        /// <param name="controllerStorage">reference to the <see cref="IGroupStorage"/> where all controllers are stored</param>
        public LedHandler(ILedStorage ledStorage, IControllerStorage controllerStorage)
        {
            _ledStorage = ledStorage;

            foreach (IControllerDataSet cds in controllerStorage.GetAllControllers())
            {
                for (int i = 0; i < cds.LedCount; i++)
                {
                    _ledStorage.AddLed(cds.Id, i);
                }
            }
        }
 public TrunkEndpoint(IControllerStorage controllerStorage, ILedStorage ledStorage)
 {
     _controllerStorage = controllerStorage;
     _ledStorage        = ledStorage;
 }
示例#3
0
 //Dictionary<string, Assembly> _LoadedAssemblies = new Dictionary<string, Assembly>();
 //Dictionary<string, Type> _ControllerTypes = new Dictionary<string, Type>();
 public DpControllerFactory(IContainer container, IControllerStorage controllerStorage = null)
 {
     _Storage = controllerStorage;
     _Container = container;
 }
示例#4
0
 /// <summary>
 /// Initializes an instance of this class
 /// </summary>
 /// <param name="controllerStorage">reference to the <see cref="IControllerStorage"/>, where all controllers are stored persistently</param>
 /// <param name="groupStorage">reference to the <see cref="IGroupStorage"/>, where all groups are stored persistently</param>
 /// <param name="ledStorage">reference to the <see cref="ILedStorage"/>, where all LEDs are stored persistently</param>
 public ControllerHandler(IControllerStorage controllerStorage, IGroupStorage groupStorage, ILedStorage ledStorage)
 {
     _controllerStorage = controllerStorage;
     _ledStorage        = ledStorage;
     _groupStorage      = groupStorage;
 }