/// <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); }
/// <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; }
/// <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); }