Exemplo n.º 1
0
		/// <summary>
		/// Removes the listener from the collection of listeners who will be notified when a
		/// <seealso cref="IDevice"/> is connected, disconnected, or when its properties or its <seealso cref="Client"/>
		/// list changed. </summary>
		/// <param name="listener"> The listener which should no longer be notified. </param>
		public static void removeDeviceChangeListener(IDeviceChangeListener listener)
		{
			lock (sLock)
			{
				sDeviceListeners.Remove(listener);
			}
		}
Exemplo n.º 2
0
		/// <summary>
		/// Adds the listener to the collection of listeners who will be notified when a <seealso cref="IDevice"/>
		/// is connected, disconnected, or when its properties or its <seealso cref="Client"/> list changed,
		/// by sending it one of the messages defined in the <seealso cref="IDeviceChangeListener"/> interface. </summary>
		/// <param name="listener"> The listener which should be notified. </param>
		public static void addDeviceChangeListener(IDeviceChangeListener listener)
		{
			lock (sLock)
			{
				if (sDeviceListeners.Contains(listener) == false)
				{
					sDeviceListeners.Add(listener);
				}
			}
		}