Esempio n. 1
0
        /// <summary>
        /// DeviceManager class constructor.
        /// </summary>
        /// <param name="socketGenerator">A function which creates a new instance of an IUdpSocket.</param>
        public DeviceManager(Func<IUdpSocket> socketGenerator)
        {
            Helpers.NullCheck(socketGenerator, nameof(socketGenerator));

            NetworkManager = new NetworkManager(socketGenerator);
        }
Esempio n. 2
0
        /// <summary>
        /// Constructs a new Device. Note that construction of devices is library-internal. The library
        /// user is expected to use the DeviceManager to interact with devices.
        /// </summary>
        /// <param name="networkManager">The NetworkManager that provides an interface to network communications.</param>
        internal Device(NetworkManager networkManager)
        {
            Debug.Assert(networkManager != null);

            NetworkManager = networkManager;
        }
Esempio n. 3
0
 /// <summary>
 /// Constructs a Light. Note that construction of devices is library-internal. The library
 /// user is expected to use the DeviceManager to interact with devices.
 /// </summary>
 /// <param name="networkManager">The NetworkManager that provides an interface to network communications.</param>
 internal Light(NetworkManager networkManager)
     : base(networkManager)
 {
     Debug.Assert(networkManager != null);
 }
Esempio n. 4
0
        /// <summary>
        /// Constructs a new Device. Note that construction of devices is library-internal. The library
        /// user is expected to use the DeviceManager to interact with devices.
        /// </summary>
        /// <param name="networkManager">The NetworkManager that provides an interface to network communications.</param>
        internal Device(NetworkManager networkManager)
        {
            Debug.Assert(networkManager != null);

            NetworkManager = networkManager;
        }