Beispiel #1
0
        /// <summary>
        /// Attempts to find a device by its id given by <paramref name="deviceId"/>
        /// </summary>
        /// <param name="deviceId">
        /// The id of the device to find.
        /// </param>
        /// <param name="foundDevice">
        /// The device that has been found or <see langword="null"/> if the device has not beed found.
        /// </param>
        /// <returns>
        /// <see langword="true"/>, if the device has been found; <see langword="false"/> otherwise.
        /// </returns>
        public bool FindDeviceById(DeviceId deviceId, out Device foundDevice)
        {
            if (deviceId == null)
            {
                throw new ArgumentNullException(nameof(deviceId));
            }

            return(devices.TryGetValue(deviceId, out foundDevice));
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Device"/> class.
        /// </summary>
        /// <param name="id">
        /// The id of the device.
        /// </param>
        protected Device(DeviceId id)
        {
            if (id == null)
            {
                throw new ArgumentNullException(nameof(id));
            }

            Id = id;
        }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VideoCamera"/> class.
 /// </summary>
 /// <param name="id">
 /// The id of the video camera device.
 /// </param>
 public VideoCamera(DeviceId id)
     : base(id)
 {
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Microphone"/> class.
 /// </summary>
 /// <param name="id">
 /// The id of the microphone.
 /// </param>
 public Microphone(DeviceId id)
     : base(id)
 {
 }