Partager via


ReadOnlyObservableNotificationCollection Class

 

Represents a read-only, observable collection of persistent notifications.

Namespace:   Microsoft.WindowsServerSolutions.Common.ProviderFramework.Notifications
Assembly:  CoreProviders (in CoreProviders.dll)

Inheritance Hierarchy

System.Object
  System.Collections.ObjectModel.ReadOnlyCollection<T>
    System.Collections.ObjectModel.ReadOnlyObservableCollection<T>
      Microsoft.WindowsServerSolutions.Common.ProviderFramework.Notifications.ReadOnlyObservableNotificationCollection

Syntax

public class ReadOnlyObservableNotificationCollection : ReadOnlyObservableCollection<Notification>, 
    IDisposable
public ref class ReadOnlyObservableNotificationCollection : ReadOnlyObservableCollection<Notification^>, 
    IDisposable
Public Class ReadOnlyObservableNotificationCollection
    Inherits ReadOnlyObservableCollection(Of Notification)
    Implements IDisposable

Properties

Name Description
System_CAPS_pubproperty Count

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubproperty Item[Int32]

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_protproperty Items

(Inherited from ReadOnlyCollection<T>.)

Methods

Name Description
System_CAPS_pubmethod Contains(T)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubmethod CopyTo(T[], Int32)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubmethodSystem_CAPS_static Create(Boolean, String[])

Creates a subscription to receive persistent notifications through a ReadOnlyObservableNotificationCollection object. The subscription can be specified to receive notifications from the Notifications Provider on the server or the local computer. The subscription can also be filtered with a list of categories.

System_CAPS_pubmethodSystem_CAPS_static Create(String[])

Creates a subscription to receive persistent notifications through a ReadOnlyObservableNotificationCollection object. The subscription can be filtered with a list of categories.

System_CAPS_pubmethod Dispose()

Releases all resources that are used by the ReadOnlyObservableNotificationCollection object.

System_CAPS_protmethod Dispose(Boolean)

Releases the unmanaged resources used by the ReadOnlyObservableNotificationCollection object and optionally releases the managed resources.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetEnumerator()

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod IndexOf(T)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethod OnCollectionChanged(NotifyCollectionChangedEventArgs)

(Inherited from ReadOnlyObservableCollection<T>.)

System_CAPS_protmethod OnPropertyChanged(PropertyChangedEventArgs)

(Inherited from ReadOnlyObservableCollection<T>.)

System_CAPS_pubmethod RequestNotificationChange(NotificationChangeRequest)

Sends a request to the source of a notification to change it.

System_CAPS_pubmethod Start()

Starts the subscription that is represented by the ReadOnlyObservableNotificationCollection object.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Events

Name Description
System_CAPS_protevent CollectionChanged

(Inherited from ReadOnlyObservableCollection<T>.)

System_CAPS_protevent PropertyChanged

(Inherited from ReadOnlyObservableCollection<T>.)

Explicit Interface Implementations

Name Description
System_CAPS_pubinterfaceSystem_CAPS_privevent INotifyCollectionChanged.CollectionChanged

(Inherited from ReadOnlyObservableCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privevent INotifyPropertyChanged.PropertyChanged

(Inherited from ReadOnlyObservableCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICollection<T>.Add(T)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICollection<T>.Clear()

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICollection<T>.Remove(T)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList<T>.Insert(Int32, T)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList<T>.RemoveAt(Int32)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICollection.CopyTo(Array, Int32)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IEnumerable.GetEnumerator()

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Add(Object)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Clear()

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Contains(Object)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.IndexOf(Object)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Insert(Int32, Object)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Remove(Object)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.RemoveAt(Int32)

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privproperty ICollection<T>.IsReadOnly

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privproperty IList<T>.Item[Int32]

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privproperty ICollection.IsSynchronized

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privproperty ICollection.SyncRoot

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privproperty IList.IsFixedSize

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privproperty IList.IsReadOnly

(Inherited from ReadOnlyCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privproperty IList.Item[Int32]

(Inherited from ReadOnlyCollection<T>.)

Remarks

This collection class is returned from the DeviceInfoCollection property, the GetAllDevicesInfo method, and the GetAllDevicesInfoAsync method. Once you have subscribed and started the subscription via the CollectionChanged event, objects that match your subscription parameters are added, replaced, and removed from the collection as notifications are raised, updated, and cleared. It is useful to develop a self-updating user interface for your devices.

Note that the only difference between the DeviceInfoCollection property and the GetAllDevicesInfo/GetAllDevicesInfoAsync methods is that by getting the DeviceInfoCollection property value, the DevicesManager will not attempt to get the latest device list from the provider. However, when the DevicesManager is connected, it will be updated automatically and the caller is expected to receive the CollectionChanged events. Conversely, the GetAllDevicesInfo/GetAllDevicesInfoAsync methods will try to call the provider to get the latest device list.

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.WindowsServerSolutions.Common.ProviderFramework.Notifications Namespace

Return to top