Notification Class

 

Represents a notification in the Notification Provider system.

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

Inheritance Hierarchy

System.Object
  Microsoft.WindowsServerSolutions.Common.ProviderFramework.Notifications.Notification

Syntax

[DataContractAttribute(Namespace = "https://www.microsoft.com/WindowsServerSolutions/ProviderFramework/Notifications/3/2010")]
[KnownTypeAttribute(typeof(CultureInfo))]
[KnownTypeAttribute(typeof(RegionInfo))]
[KnownTypeAttribute(typeof(ProviderInfo))]
[KnownTypeAttribute(typeof(OperatingSystem))]
[KnownTypeAttribute(typeof(Version))]
[KnownTypeAttribute(typeof(PlatformID))]
[KnownTypeAttribute(typeof(string[]))]
[KnownTypeAttribute(typeof(bool[]))]
[KnownTypeAttribute(typeof(byte[]))]
[KnownTypeAttribute(typeof(sbyte[]))]
[KnownTypeAttribute(typeof(char[]))]
[KnownTypeAttribute(typeof(short[]))]
[KnownTypeAttribute(typeof(ushort[]))]
[KnownTypeAttribute(typeof(int[]))]
[KnownTypeAttribute(typeof(uint[]))]
[KnownTypeAttribute(typeof(long[]))]
[KnownTypeAttribute(typeof(ulong[]))]
[KnownTypeAttribute(typeof(float[]))]
[KnownTypeAttribute(typeof(double[]))]
[KnownTypeAttribute(typeof(decimal[]))]
[KnownTypeAttribute(typeof(Guid[]))]
[KnownTypeAttribute(typeof(DateTime[]))]
[KnownTypeAttribute(typeof(TimeSpan[]))]
[KnownTypeAttribute(typeof(TimeZone[]))]
[KnownTypeAttribute(typeof(TimeZoneInfo[]))]
[KnownTypeAttribute(typeof(DateTimeOffset[]))]
[KnownTypeAttribute(typeof(Uri[]))]
[KnownTypeAttribute(typeof(CultureInfo[]))]
[KnownTypeAttribute(typeof(RegionInfo[]))]
[KnownTypeAttribute(typeof(ProviderInfo[]))]
[KnownTypeAttribute(typeof(OperatingSystem[]))]
[KnownTypeAttribute(typeof(Version[]))]
[KnownTypeAttribute(typeof(PlatformID[]))]
public sealed class Notification : IEquatable<Notification>
[DataContractAttribute(Namespace = "https://www.microsoft.com/WindowsServerSolutions/ProviderFramework/Notifications/3/2010")]
[KnownTypeAttribute((CultureInfo^::typeid))]
[KnownTypeAttribute((RegionInfo^::typeid))]
[KnownTypeAttribute((ProviderInfo^::typeid))]
[KnownTypeAttribute((OperatingSystem^::typeid))]
[KnownTypeAttribute((Version^::typeid))]
[KnownTypeAttribute((PlatformID::typeid))]
[KnownTypeAttribute((array<String^>^::typeid))]
[KnownTypeAttribute((array<bool>^::typeid))]
[KnownTypeAttribute((array<unsigned char>^::typeid))]
[KnownTypeAttribute((array<signed char>^::typeid))]
[KnownTypeAttribute((array<wchar_t>^::typeid))]
[KnownTypeAttribute((array<short>^::typeid))]
[KnownTypeAttribute((array<unsigned short>^::typeid))]
[KnownTypeAttribute((array<int>^::typeid))]
[KnownTypeAttribute((array<unsigned int>^::typeid))]
[KnownTypeAttribute((array<long long>^::typeid))]
[KnownTypeAttribute((array<unsigned long long>^::typeid))]
[KnownTypeAttribute((array<float>^::typeid))]
[KnownTypeAttribute((array<double>^::typeid))]
[KnownTypeAttribute((array<Decimal>^::typeid))]
[KnownTypeAttribute((array<Guid>^::typeid))]
[KnownTypeAttribute((array<DateTime>^::typeid))]
[KnownTypeAttribute((array<TimeSpan>^::typeid))]
[KnownTypeAttribute((array<TimeZone^>^::typeid))]
[KnownTypeAttribute((array<TimeZoneInfo^>^::typeid))]
[KnownTypeAttribute((array<DateTimeOffset>^::typeid))]
[KnownTypeAttribute((array<Uri^>^::typeid))]
[KnownTypeAttribute((array<CultureInfo^>^::typeid))]
[KnownTypeAttribute((array<RegionInfo^>^::typeid))]
[KnownTypeAttribute((array<ProviderInfo^>^::typeid))]
[KnownTypeAttribute((array<OperatingSystem^>^::typeid))]
[KnownTypeAttribute((array<Version^>^::typeid))]
[KnownTypeAttribute((array<PlatformID>^::typeid))]
public ref class Notification sealed : IEquatable<Notification^>
<DataContractAttribute(Namespace := "https://www.microsoft.com/WindowsServerSolutions/ProviderFramework/Notifications/3/2010")>
<KnownTypeAttribute(GetType(CultureInfo))>
<KnownTypeAttribute(GetType(RegionInfo))>
<KnownTypeAttribute(GetType(ProviderInfo))>
<KnownTypeAttribute(GetType(OperatingSystem))>
<KnownTypeAttribute(GetType(Version))>
<KnownTypeAttribute(GetType(PlatformID))>
<KnownTypeAttribute(GetType(String()))>
<KnownTypeAttribute(GetType(Boolean()))>
<KnownTypeAttribute(GetType(Byte()))>
<KnownTypeAttribute(GetType(SByte()))>
<KnownTypeAttribute(GetType(Char()))>
<KnownTypeAttribute(GetType(Short()))>
<KnownTypeAttribute(GetType(UShort()))>
<KnownTypeAttribute(GetType(Integer()))>
<KnownTypeAttribute(GetType(UInteger()))>
<KnownTypeAttribute(GetType(Long()))>
<KnownTypeAttribute(GetType(ULong()))>
<KnownTypeAttribute(GetType(Single()))>
<KnownTypeAttribute(GetType(Double()))>
<KnownTypeAttribute(GetType(Decimal()))>
<KnownTypeAttribute(GetType(Guid()))>
<KnownTypeAttribute(GetType(Date()))>
<KnownTypeAttribute(GetType(TimeSpan()))>
<KnownTypeAttribute(GetType(TimeZone()))>
<KnownTypeAttribute(GetType(TimeZoneInfo()))>
<KnownTypeAttribute(GetType(DateTimeOffset()))>
<KnownTypeAttribute(GetType(Uri()))>
<KnownTypeAttribute(GetType(CultureInfo()))>
<KnownTypeAttribute(GetType(RegionInfo()))>
<KnownTypeAttribute(GetType(ProviderInfo()))>
<KnownTypeAttribute(GetType(OperatingSystem()))>
<KnownTypeAttribute(GetType(Version()))>
<KnownTypeAttribute(GetType(PlatformID()))>
Public NotInheritable Class Notification
    Implements IEquatable(Of Notification)

Constructors

Name Description
System_CAPS_pubmethod Notification(String, String)

Initializes a new instance of the Notification class with the specified category and identifier.

Properties

Name Description
System_CAPS_pubproperty Category

Gets the category of which the Notification object is a member.

System_CAPS_pubproperty Id

Gets the identifier of the Notification object.

System_CAPS_pubproperty OneShot

Indicates that the Notification object represents a one-shot notification.

System_CAPS_pubproperty Properties

Gets the properties that are associated with the Notification object.

System_CAPS_pubproperty Source

Gets the source of the notification.

System_CAPS_pubproperty Timestamp

Gets the time when the notification was sent, expressed as local time on the computer from which it was sent.

Methods

Name Description
System_CAPS_pubmethod Equals(Notification)

Compares one Notification object to another Notification object.

System_CAPS_pubmethod Equals(Object)

Calls the Equals method with the specified object.(Overrides Object.Equals(Object).)

System_CAPS_pubmethod GetHashCode()

Returns a hash code for the Notification object.(Overrides Object.GetHashCode().)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod Merge(NotificationChangeRequest)

Merges changes specified in the NotificationChangeRequest object into the Notification object.

System_CAPS_pubmethod ToString()

Returns a String that represents the current object.(Overrides Object.ToString().)

Remarks

The following types of notifications are available:

  • Persistent Notifications – This type of notification has a lifetime, which means that after a persistant notification is created, it is alive until either the source (the publisher) explicitly clears it, or the source cannot be contacted.

  • One-shot Notifications – This type of notification does not have a lifetime. If you are not connected when a one-shot notification is created, you will not receive the notification.

Persistent notifications are cached by the Notification Provider system. If you create persistent notifications and then are disconnected and reconnected, your outstanding notifications will be available for you.

One-shot notifications are distinguished by the OneShot property. Persistent notifications are created when you call the RaiseNotification method of the Notifier class. One-shot notifications are created when you call the FireEvent method of the Notifier class.

Two notifications are considered equal if they have the same Category, Id, and the same Source. A publisher can replace or refresh the Properties on an existing persistent notification that it created by modifying the Properties collection and creating it again. A publisher cannot modify or clear a notification that was created by a different publisher.

Adding or removing values from the Properties dictionary is permitted after a notification is created, but the changes will not be visible to other subscribers because the dictionary is (shallow) copied when the notification is created. However, if you add reference-type objects to the Properties dictionary, modifications to those objects after the notification is created are visible to other subscribers in the same process, but not in other processes. Therefore, you should not modify reference-type objects after adding them to the Properties dictionary because it can lead to unexpected and difficult-to-debug behavior. Instead, replace reference-type values with new values.

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