AFSecurityMapping.FindSecurityMappings Method
- Last UpdatedSep 18, 2024
- PI System
- AF SDK 2024
- Developer
Performs a text search within the PISystem to retrieve a collection
of AFSecurityMapping objects that match the specified query string.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.0.1156
Syntax
public static AFNamedCollectionList<AFSecurityMapping> FindSecurityMappings( PISystem system, string query, AFSearchField field, AFSortField sortField, AFSortOrder sortOrder, int maxCount )
Public Shared Function FindSecurityMappings ( system As PISystem, query As String, field As AFSearchField, sortField As AFSortField, sortOrder As AFSortOrder, maxCount As Integer ) As AFNamedCollectionList(Of AFSecurityMapping) Dim system As PISystem Dim query As String Dim field As AFSearchField Dim sortField As AFSortField Dim sortOrder As AFSortOrder Dim maxCount As Integer Dim returnValue As AFNamedCollectionList(Of AFSecurityMapping) returnValue = AFSecurityMapping.FindSecurityMappings(system, query, field, sortField, sortOrder, maxCount)
public: static AFNamedCollectionList<AFSecurityMapping^>^ FindSecurityMappings( PISystem^ system, String^ query, AFSearchField field, AFSortField sortField, AFSortOrder sortOrder, int maxCount )
static member FindSecurityMappings : system : PISystem * query : string * field : AFSearchField * sortField : AFSortField * sortOrder : AFSortOrder * maxCount : int -> AFNamedCollectionList<AFSecurityMapping>
Parameters
- system
- Type: OSIsoft.AF.PISystem
The PISystem to search for the requested objects. - query
- Type: System.String
The query string used for finding objects.The query string (or match pattern) can include regular characters and wildcard characters. Regular characters must match exactly the characters specified in the query string. Wildcard characters can be matched with arbitrary fragments of the query string. Wildcard characters can be escaped using the single backslash (\) character. Use a double backslash (\\) to match a single backslash. The syntax of the query string has the following rules:
- If null or empty string, then everything will be matched.
- If no wildcards, then an exact match on the query string is performed.
- Wildcard * can be placed anywhere in the query string and matches zero or more characters.
- Wildcard ? can be placed anywhere in the query string and matches exactly one character.
- One character in a set of characters are matched by placing them within [ ]. For example, a[bc] would match 'ab' or 'ac', but it would not match 'ad' or 'abd'.
- One character in a set of characters are not matched by placing them within [! ]. For example, a[!bc] would match 'ad', but it would not match 'ab', 'ac', or 'abd'.
- A character in a range of characters from first to last are matched using the following syntax: [first - last]. For example, a[a-c] would match 'aa', 'ab', or 'ac', but it would not match 'ad' or 'abc'.
- field
- Type: OSIsoft.AF.AFSearchField
Specifies which of the object's properties are searched. - sortField
- Type: OSIsoft.AF.AFSortField
The field or property of the object used to sort the returned collection. - sortOrder
- Type: OSIsoft.AF.AFSortOrder
The order that the returned collection is sorted. - maxCount
- Type: System.Int32
The maximum number of objects to be returned.
Return Value
Type: AFNamedCollectionList<AFSecurityMapping>Returns the collection of AFSecurityMapping objects which match the specified query string.
Remarks
An object matches the text search if the specified query is found
in one of the object's properties specified by the field parameter.
The PISystem.Supports method can be used to check if the
PISystem supports the SecurityIdentity feature.