示例#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);
        }
示例#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;
        }
示例#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);
 }
示例#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;
        }