InstanceCollectionT Class

Base class for IInstance object collections (abstract).

Inheritance Hierarchy

SystemObject
  TwinCAT.TypeSystem.GenericInstanceCollectionT
    TwinCAT.TypeSystemFieldCollection
    TwinCAT.TypeSystem.GenericSymbolCollectionT
    TwinCAT.TypeSystemMemberCollection

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

Syntax

C#

public abstract class InstanceCollection<T> : IList<T>, 
    ICollection<T>, IEnumerable<T>, IEnumerable, IInstanceCollection<T>
where T : class, IInstance

Type Parameters

T

The InstanceCollectionT type exposes the following members.

Constructors

 

Name

Description

InstanceCollectionT(InstanceCollectionMode)

Initializes a new instance of the InstanceCollectionT class.

InstanceCollectionT(IEnumerableT, InstanceCollectionMode)

Initializes a new instance of the InstanceCollectionT class.

Properties

 

Name

Description

Count

Gets the collection count.

InnerList

Gets the LIst of instances.

InnerPathDict

The Path dictionary

IsReadOnly

Gets a value indicating whether this instance is read only.

ItemInt32

Gets or sets the IInstance at the specified index.

ItemString

Gets the IInstance with the specified instance path.

Mode

The mode this InstanceCollectionT is working in.

Methods

 

Name

Description

Add

Adds the specified item.

AddRange

Adds the specified items to this collection.

AsReadOnly

Converts the InstanceCollectionT to an ReadOnlyInstanceCollectionT

Clear

Clears this instance.

Contains(T)

Determines whether this collection contains the specified IInstance

Contains(String)

Determines whether this collection contains an IInstance with the specified InstanceName / InstancePath

ContainsName

Determines whether the specified instance name contains name.

CopyTo

Copies this InstanceCollectionT to the specified array.

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

Gets the enumerator.

GetHashCode

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

GetInstance

Gets the IInstanceby instance path.

GetInstanceByName

Gets the name of the instance by.

GetType

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

IndexOf

Determines the index of the specified IInstance.

Insert

Inserts the specified IInstance at the specified index.

MemberwiseClone

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

Remove

Removes the specified item.

RemoveAt

Removes the IInstance at the specified index.

ToString

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

TryGetInstance

Tries to get the IInstance. of the specified path.

TryGetInstanceByName

Tries to get Instances by name.

Reference

TwinCAT.TypeSystem.Generic Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026