IAFNamedCollection(T) Interface
- Last UpdatedNov 18, 2025
- 5 minute read
- PI System
- AF SDK 2024 R2
- Developer
An interface for named collections that support looking up by ID
and Name.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public interface IAFNamedCollection<T> : ICollection<T>, IEnumerable<T>, IEnumerable, IList<T> where T :
Public Interface IAFNamedCollection(Of T As ) Inherits ICollection(Of T), IEnumerable(Of T), IEnumerable, IList(Of T) Dim instance As IAFNamedCollection(Of T)
generic<typename T> where T : public interface class IAFNamedCollection : ICollection<T>, IEnumerable<T>, IEnumerable, IList<T>
type IAFNamedCollection<'T when 'T : > = interface interface ICollection<'T> interface IEnumerable<'T> interface IEnumerable interface IList<'T> end
Type Parameters
- T
- IAFNamedObject
The IAFNamedCollectionT type exposes the following members.
Properties
| Name | Description | |
|---|---|---|
| Count | Gets the number of elements contained in the ICollectionT. (Inherited from ICollectionT.) | |
| IsReadOnly | Gets a value indicating whether the ICollectionT is read-only. (Inherited from ICollectionT.) | |
| ItemInt32 | Gets or sets the element at the specified index. (Inherited from IListT.) | |
| ItemGuid |
Gets the item with the specified id.
| |
| ItemString |
Returns the specified object from the collection by name.
|
Methods
| Name | Description | |
|---|---|---|
| Add | Adds an item to the ICollectionT. (Inherited from ICollectionT.) | |
| Clear | Removes all items from the ICollectionT. (Inherited from ICollectionT.) | |
| Contains(T) | Determines whether the ICollectionT contains a specific value. (Inherited from ICollectionT.) | |
| Contains(Guid) |
This method determines whether the collection contains a specific item referenced by id.
| |
| Contains(String) |
This method determines whether the collection contains a specific item referenced by name.
| |
| CopyTo | Copies the elements of the ICollectionT to an Array, starting at a particular Array index. (Inherited from ICollectionT.) | |
| GetEnumerator | Returns an enumerator that iterates through the collection. (Inherited from IEnumerableT.) | |
| IndexOf | Determines the index of a specific item in the IListT. (Inherited from IListT.) | |
| Insert | Inserts an item to the IListT at the specified index. (Inherited from IListT.) | |
| Remove(T) | Removes the first occurrence of a specific object from the ICollectionT. (Inherited from ICollectionT.) | |
| Remove(Guid) |
Removes the item with the specified id from the collection.
| |
| Remove(String) |
The Remove method removes the item from the collection by name.
| |
| RemoveAt | Removes the IListT item at the specified index. (Inherited from IListT.) |
Extension Methods
| Name | Description | |
|---|---|---|
| ChunkedByT |
This extension method breaks up search results into chunks to make it easier to
page through and process IEnumerableT collections in chunks.
(Defined by AFSDKExtension.) |
Remarks
This is used in the IAFAttribute and IAFNotificationContact
interfaces to provide a list of child object.