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

AF SDK Reference

AFNotification Constructor (AFDatabase, String, AFNotificationTemplate, AFBaseElement)

AFNotification Constructor (AFDatabase, String, AFNotificationTemplate, AFBaseElement)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFNotification Constructor (AFDatabase, String, AFNotificationTemplate, AFBaseElement)
Initializes a new instance of the class with the specified name.

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

Syntax

public AFNotification(
	AFDatabase database,
	string name,
	AFNotificationTemplate template,
	AFBaseElement target
)
Public Sub New ( 
	database As AFDatabase,
	name As String,
	template As AFNotificationTemplate,
	target As AFBaseElement
)

Dim database As AFDatabase
Dim name As String
Dim template As AFNotificationTemplate
Dim target As AFBaseElement

Dim instance As New AFNotification(database, 
	name, template, target)
public:
AFNotification(
	AFDatabase^ database, 
	String^ name, 
	AFNotificationTemplate^ template, 
	AFBaseElement^ target
)
new : 
        database : AFDatabase * 
        name : string * 
        template : AFNotificationTemplate * 
        target : AFBaseElement -> AFNotification

Parameters

database
Type: OSIsoft.AFAFDatabase
The new AFNotification is added to the specified AFDatabase.
name
Type: SystemString
The name of the newly created instance of the class. See the ValidateName(String, String) method for a description of what is valid when setting the name of the object.
template
Type: OSIsoft.AF.NotificationAFNotificationTemplate
The AFNotificationTemplate that is to be used to create a new instance of the AFNotification object. If , then the notification is created without a template and properties normally defined by the template will be defined by the notification instead.
target
Type: OSIsoft.AF.AssetAFBaseElement
If the template parameter is specified and the notification template's AnalysisTemplate property is specified, then this parameter specifies the Target for the new AFAnalysis that is created from the AFAnalysisTemplate defined by the analysis template's Target property. If the template parameter is or the notification template's AnalysisTemplate property is , then this parameter is ignored.

Remarks

The instance of the class created using this constructor does not belong to any collection. To add the object to a collection, use the collection's Add method.

Version Information

AFSDK


See Also

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