AFNotificationRule Constructor
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
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.