AFAttributeTemplate.GetAttributeTemplatesByTrait Method
- Last UpdatedSep 18, 2024
- PI System
- AF SDK 2024
- Developer
Retrieves a list of child AFAttributeTemplate objects identified by the specified list of attribute traits.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.0.1156
Syntax
public IList<AFAttributeTemplate> GetAttributeTemplatesByTrait( ICollection<AFAttributeTrait> traits )
Public Function GetAttributeTemplatesByTrait ( traits As ICollection(Of AFAttributeTrait) ) As IList(Of AFAttributeTemplate) Dim instance As AFAttributeTemplate Dim traits As ICollection(Of AFAttributeTrait) Dim returnValue As IList(Of AFAttributeTemplate) returnValue = instance.GetAttributeTemplatesByTrait(traits)
public: IList<AFAttributeTemplate^>^ GetAttributeTemplatesByTrait( ICollection<AFAttributeTrait^>^ traits )
member GetAttributeTemplatesByTrait : traits : ICollection<AFAttributeTrait> -> IList<AFAttributeTemplate>
Parameters
- traits
- Type: System.Collections.Generic.ICollection<AFAttributeTrait>
The list of AFAttributeTrait objects to match against the child attribute templates. Nested child attribute templates and non-overridden base attribute templates are included.
Return Value
Type: IList<AFAttributeTemplate>Returns a list of child AFAttributeTemplate objects identified by the specified list of attribute traits. Returns an empty list if an AFAttributeTemplate with any of the specified traits does not exist.
Remarks
This method will search the child AFAttributeTemplate collection and return a list of all attribute templates
that match any of the specified attribute traits.