ReadOnlyInstanceCollectionT Class

ReadOnly Instance collection

Inheritance Hierarchy

SystemObject
  System.Collections.ObjectModelReadOnlyCollectionT
    TwinCAT.TypeSystem.GenericReadOnlyInstanceCollectionT
      TwinCAT.TypeSystem.GenericReadOnlySymbolCollectionT
      TwinCAT.TypeSystemReadOnlyFieldCollection
      TwinCAT.TypeSystemReadOnlyMemberCollection

Namespace: TwinCAT.TypeSystem.Generic
Assembly: TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470

Syntax

C#

public class ReadOnlyInstanceCollection<T> : ReadOnlyCollection<T>, 
    IInstanceCollection<T>, IList<T>, ICollection<T>, IEnumerable<T>, 
    IEnumerable
where T : class, IInstance

Type Parameters

T

The ReadOnlyInstanceCollectionT type exposes the following members.

Constructors

 

Name

Description

ReadOnlyInstanceCollectionT

Initializes a new instance of the ReadOnlyInstanceCollectionT class.

Properties

 

Name

Description

Count

Gets the number of elements contained in the ReadOnlyCollectionT instance.
(Inherited from ReadOnlyCollectionT)

ItemInt32

Gets the element at the specified index.
(Inherited from ReadOnlyCollectionT)

ItemString

Gets the element with the specified instance path.

Items

Returns the IListT that the ReadOnlyCollectionT wraps.
(Inherited from ReadOnlyCollectionT)

Mode

Gets the InstanceCollectionMode.

Methods

 

Name

Description

Contains(T)

Determines whether an element is in the ReadOnlyCollectionT.
(Inherited from ReadOnlyCollectionT)

Contains(String)

Determines whether the ReadOnlyInstanceCollectionT contains an instance with the specified instance path.

ContainsName

Determines whether the specified instance is contained.

CopyTo

Copies the entire ReadOnlyCollectionT to a compatible one-dimensional Array, starting at the specified index of the target array.
(Inherited from ReadOnlyCollectionT)

Equals

Determines whether the specified object is equal to the current object.
(Inherited from Object)

Finalize

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)

GetEnumerator

Returns an enumerator that iterates through the ReadOnlyCollectionT.
(Inherited from ReadOnlyCollectionT)

GetHashCode

Serves as the default hash function.
(Inherited from Object)

GetInstance

Gets the IInstanceby instance path.

GetInstanceByName

Gets the IInstance by instance name.

GetType

Gets the Type of the current instance.
(Inherited from Object)

IndexOf

Searches for the specified object and returns the zero-based index of the first occurrence within the entire ReadOnlyCollectionT.
(Inherited from ReadOnlyCollectionT)

MemberwiseClone

Creates a shallow copy of the current Object.
(Inherited from Object)

ToString

Returns a string that represents the current object.
(Inherited from Object)

TryGetInstance

Tries to get the instance with the specified instance path.

TryGetInstanceByName

Tries to get the instance by name.

Reference

TwinCAT.TypeSystem.Generic Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026