Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFNotificationContact Class

  • Last UpdatedNov 18, 2025
  • 10 minute read
AFNotificationContact Class
The AFNotificationContact defines the information needed to deliver notifications.

Inheritance Hierarchy

SystemObject
  OSIsoft.AFAFObject
    OSIsoft.AF.NotificationAFNotificationContact

Namespace:  OSIsoft.AF.Notification
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

[SerializableAttribute]
public sealed class AFNotificationContact : AFObject, 
	IAFNotificationContact, IComparable<AFNotificationContact>, IAFTrace
<SerializableAttribute>
Public NotInheritable Class AFNotificationContact
	Inherits AFObject
	Implements IAFNotificationContact, IComparable(Of AFNotificationContact), 
	IAFTrace

Dim instance As AFNotificationContact
[SerializableAttribute]
public ref class AFNotificationContact sealed : public AFObject, 
	IAFNotificationContact, IComparable<AFNotificationContact^>, IAFTrace
[<SealedAttribute>]
[<SerializableAttribute>]
type AFNotificationContact =  
    class
        inherit AFObject
        interface IAFNotificationContact
        interface IComparable<AFNotificationContact>
        interface IAFTrace
    end

The AFNotificationContact type exposes the following members.

Properties

  NameDescription
Public property
Available
This property indicates whether the AFNotificationContact is available to receive notifications.
Public property
CategoryString Obsolete.
This property is used by the AFNotificationContent object to determine if the AFNotificationContact is interested in the category of the AFNotificationContent
Public property
ConfigString
This property returns the current configuration of the contact's delivery channel as a string suitable for displaying to an end-user.
Public property
Contact
This read-only property gets the AFContact associated with the Notification contact.
Public property
ContactDefinition
This read-only property returns the AFNotificationContact that was used to create this AFNotificationContact from the AFNotificationTemplate.
Public property
ContactType
The type of the notification contact.
Public property
Database
This read-only property returns the AFDatabase where this object is defined.
Public property
DeliveryChannel
The instance of the delivery channel that is used by the AFNotificationContact to deliver notifications.
Public property
DeliveryChannelPlugIn
The delivery channel plugin property is used to specify which delivery channel will be used in the AFNotificationContact to deliver the notification.
Public property
Description
Read/write property that provides a more detailed description of the object.
Public property
EscalationTimeout
This property is for an EscalationAFNotificationContact to specify the retry interval if the notification send was not successful.
Public property
ExpirationPeriod Obsolete.
This property is for an IndividualAFNotificationContact to specify the expiration period for the notification.
Public property
ID
Read-only property that provides a unique identifier for the object to be used for quick access that is not dependent upon the index.
(Inherited from AFObject.)
Public property
Identity
This read-only property contains identity of the object.
(Inherited from AFObject.)
Public property
IsDeleted
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.)
Public property
MaximumRetries
This property is for an IndividualAFNotificationContact to specify the maximum number of times to retry sending the notification if it was not successful.
Public property
MinimumAcknowledgements
This property is for an GroupAFNotificationContact to specify the minimum number of acknowledgments before the group is considered to be acknowledged.
Public property
Name
This property defines the name that identifies the object.
Public property
Notification
This property returns the AFNotification object which owns the notification contact.
Public property
NotificationContacts
This is a collection of child contacts that have been added to this notification contact.
Public property
NotificationTemplate
This property returns the AFNotificationTemplate object which owns the notification contact.
Public property
NotifyWhenInstanceEnded
This property is for an IndividualAFNotificationContact to specify that the notification contact should be notified when the instance of the notification ends.
Public property
Parent
This read-only property returns the AFNotificationContact that is the parent of this notification contact.
Public property
PISystem
This read-only property allows access to the PISystem associated with this object.
(Inherited from AFObject.)
Public property
RetryInterval
This property is for an IndividualAFNotificationContact to specify the retry interval if the notification send was not successful.
Public property
Template
This read-only property returns the AFNotificationContactTemplate that was used to create this AFNotificationContact.
Public property
UniqueID
Read-only property that provides the object's ID as a String.
(Inherited from AFObject.)

Methods

  NameDescription
Public method
CompareTo(Object)
Compares this instance with a specified Object.
(Inherited from AFObject.)
Public method
CompareTo(AFObject)
Compares this instance with a specified AFObject.
(Inherited from AFObject.)
Public method
Equals(Object)
Determines whether the specified Object is equal to the current object.
(Inherited from AFObject.)
Public method
Equals(AFObject)
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.)
Public method
FindContact
Used for finding the AFNotificationContact with a given ID for the notification contact or its template.
Public methodStatic member
FindNotificationContact(AFNotification, Guid)
Retrieves the AFNotificationContact object with the specified unique identifier within the AFNotification.
Public methodStatic member
FindNotificationContact(AFNotificationTemplate, Guid)
Retrieves the AFNotificationContact object with the specified unique identifier within the AFNotificationTemplate.
Public methodStatic member
FindNotificationContact(AFNotification, Guid, Guid)
Retrieves the AFNotificationContact object with the specified unique identifier and parent unique identifier within the AFNotification.
Public methodStatic member
FindNotificationContact(AFNotificationTemplate, Guid, Guid)
Retrieves the AFNotificationContact object with the specified unique identifier and parent unique identifier within the AFNotificationTemplate.
Public method
GetHashCode
Gets the hash code for this instance of the object which is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from AFObject.)
Public method
GetPath
Returns the full path to the object, using just the names.
(Inherited from AFObject.)
Public method
GetPath(AFObject)
Returns the path to the object relative from another object.
(Inherited from AFObject.)
Public method
GetPath(AFEncodeType, AFObject)
Returns the path to the object relative from another object, using the name and/or id as specified by encodeType.
(Inherited from AFObject.)
Public method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method
IsTraced
Indicates if a specified level is being traced.
Public method
Persist
This method returns the persistence string for the object.
(Inherited from AFObject.)
Public method
ToString
Returns a String that represents the current object.
(Inherited from AFObject.)
Public method
TraceData
Output a data trace event.
Public method
TraceDetail
Output a detail trace event.
Public method
TraceError
Output an error trace event.
Public method
TraceEvent(AFTraceSwitchLevel, String)
Output a trace event with a message.
Public method
TraceEvent(AFTraceSwitchLevel, String, Int32)
Output a trace event with a message and a duration.
Public method
TraceEvent(AFTraceSwitchLevel, String, Object)
Output a trace event as a formatted message with a variable number of arguments.
Public method
TraceInformation
Output an information trace event.
Public method
TraceSummary
Output a summary trace event.
Public method
TraceWarning
Output a warning trace event.

Remarks

A notification contact provides additional information to an AFContact needed to deliver notifications. An AFNotificationContactTemplate can be used as a template for creating a notification contact. If an AFNotification is created from an AFNotificationTemplate, then the notification contact hierarchy can be defined by notification template's NotificationContacts collection.

Examples

// This example demonstrates how to create a hierarchy of notification
// contact templates and use them to create a hierarchy of notification
// contacts in a new notification. Then information about the created
// notification contacts is displayed.

// Get the Database
PISystems myPISystems = new PISystems();
PISystem myPISystem = myPISystems.DefaultPISystem;
AFDatabase myDB = myPISystem.Databases.DefaultDatabase;

// Create a Hierarchy of Notification Contact Templates
AFNotificationContactTemplate myContactTemplate1 = new AFNotificationContactTemplate(myPISystem, "MyContact#1");
AFNotificationContactTemplate myContactTemplate2 = new AFNotificationContactTemplate(myPISystem, "MyContact#2");
AFNotificationContactTemplate myGroupContactTemplate = new AFNotificationContactTemplate(myPISystem, "MyGroup");
myGroupContactTemplate.ContactType = AFNotificationContactType.Group;
myGroupContactTemplate.NotificationContactTemplates.Add(myContactTemplate1);
myGroupContactTemplate.NotificationContactTemplates.Add(myContactTemplate2);

// Create a Notification with Notification Contacts
AFNotification myNotification = new AFNotification(myDB, "MyNotification");
myNotification.NotificationContacts.Add("MyLocalContact#1");
myNotification.NotificationContacts.Add(myGroupContactTemplate);

// Display Information for the Created Notification Contacts
foreach (AFNotificationContact item in myNotification.NotificationContacts)
{
    Console.WriteLine("Name of Notification Contact = {0}", item.Name);
    foreach (AFNotificationContact subItem in item.NotificationContacts)
    {
        Console.WriteLine("  Name of Notification Contact = {0}", subItem.Name);
    }
}
' This example demonstrates how to create a hierarchy of notification
' contact templates and use them to create a hierarchy of notification
' contacts in a new notification. Then information about the created
' notification contacts is displayed.

' Get the Database
Dim myPISystems As PISystems = New PISystems
Dim myPISystem As PISystem = myPISystems.DefaultPISystem
Dim myDB As AFDatabase = myPISystem.Databases.DefaultDatabase

' Create a Hierarchy of Notification Contact Templates
Dim myContactTemplate1 As AFNotificationContactTemplate = New AFNotificationContactTemplate(myPISystem, "MyContact#1")
Dim myContactTemplate2 As AFNotificationContactTemplate = New AFNotificationContactTemplate(myPISystem, "MyContact#2")
Dim myGroupContactTemplate As AFNotificationContactTemplate = New AFNotificationContactTemplate(myPISystem, "MyGroup")
myGroupContactTemplate.ContactType = AFNotificationContactType.Group
myGroupContactTemplate.NotificationContactTemplates.Add(myContactTemplate1)
myGroupContactTemplate.NotificationContactTemplates.Add(myContactTemplate2)

' Create a Notification with Notification Contacts
Dim myNotification As AFNotification = New AFNotification(myDB, "MyNotification")
myNotification.NotificationContacts.Add("MyLocalContact#1")
myNotification.NotificationContacts.Add(myGroupContactTemplate)

' Display Information for the Created Notification Contacts
For Each item As AFNotificationContact In myNotification.NotificationContacts
    Console.WriteLine("Name of Notification Contact = {0}", item.Name)
    For Each subItem As AFNotificationContact In item.NotificationContacts
        Console.WriteLine("  Name of Notification Contact = {0}", subItem.Name)
    Next
Next

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

Version Information

AFSDK


See Also

TitleResults for “How to create a CRG?”Also Available in