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

AF SDK Reference

AFNotificationRule Constructor

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFNotificationRule Constructor
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 AFNotificationRule(
	string name,
	AFNotificationRuleTemplate template = null,
	AFElement target = null
)
Public Sub New ( 
	name As String,
	Optional template As AFNotificationRuleTemplate = Nothing,
	Optional target As AFElement = Nothing
)

Dim name As String
Dim template As AFNotificationRuleTemplate
Dim target As AFElement

Dim instance As New AFNotificationRule(name, template, 
	target)
public:
AFNotificationRule(
	String^ name, 
	AFNotificationRuleTemplate^ template = nullptr, 
	AFElement^ target = nullptr
)
new : 
        name : string * 
        ?template : AFNotificationRuleTemplate * 
        ?target : AFElement 
(* Defaults:
        let _template = defaultArg template null
        let _target = defaultArg target null
*)
-> AFNotificationRule

Parameters

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 (Optional)
Type: OSIsoft.AF.NotificationAFNotificationRuleTemplate
The AFNotificationRuleTemplate that is to be used to create a new instance of the AFNotificationRule object. If , then the element is created without a template and properties normally defined by the template will be defined by the element instead.
target (Optional)
Type: OSIsoft.AF.AssetAFElement
The AFElement that will be set as the Target of the new AFNotificationRule

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

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8

See Also

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