Skip to main content
Namespace: OpenTD.Results.Dataset
Assembly: OpenTD.Results.dll
Collection of ItemIdentifiers

Inheritance

object ← ItemIdentifierCollection

Implements

IList<ItemIdentifier>, ICollection<ItemIdentifier>, IEnumerable<ItemIdentifier>, IEnumerable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

ItemIdentifierCollection(IEnumerable<ItemIdentifier>)

Parameters

collection IEnumerable<ItemIdentifier>

ItemIdentifierCollection()

ItemIdentifierCollection(string, ThermalDesktop)

Initializes a new instance of the ItemIdentifierCollection class with node names from a domain.

Parameters

domainName string td ThermalDesktop

ItemIdentifierCollection(DataTypes, string, IDataset)

Initializes a new instance of the ItemIdentifierCollection class with entity names (conductors, nodes, lumps, etc.) from a DataSet.

Parameters

dataType DataTypes submodelName string dataset IDataset

ItemIdentifierCollection(IEnumerable<string>)

Parameters

dataItemNames IEnumerable<string>

ItemIdentifierCollection(params string[])

Parameters

sindaNames string[]

Properties

AutoCommenter

Property Value

AutoCommenter

AutoNamer

Property Value

AutoNamer

Comment

Property Value

string

Count

Gets the number of elements contained in the ICollection`1.

Property Value

int

Id

If all the ItemIdentifiers in the collection have the same Id, this will equal that. Otherwise this will be -1.

Property Value

long

InternalSuggestedComment

Property Value

string

InternalSuggestedName

Property Value

string

IsReadOnly

Gets a value indicating whether the ICollection`1 is read-only.

Property Value

bool

Name

Property Value

string

RecordNum

If all the ItemRecordNumentifiers in the collection have the same RecordNum, this will equal that. Otherwise this will be -1.

Property Value

long

RegisterName

If all the ItemIdentifiers in the collection have the same RegisterName, this will equal that. Otherwise this will be null.

Property Value

string

Submodel

If all the ItemIdentifiers in the collection have the same Submodel, this will equal that. Otherwise this will be null.

Property Value

string

Type

If all the ItemIdentifiers in the collection have the same Type, this will equal that. Otherwise this will be NOT_SET.

Property Value

ItemIdentifier.Types

this[int]

Gets or sets the element at the specified index.

Property Value

ItemIdentifier

Exceptions

ArgumentOutOfRangeException index is not a valid index in the IList`1. NotSupportedException The property is set and the IList`1 is read-only.

Methods

Add(ItemIdentifier)

Adds an item to the ICollection`1.

Parameters

item ItemIdentifier The object to add to the ICollection`1.

Exceptions

NotSupportedException The ICollection`1 is read-only.

AddRange(IEnumerable<ItemIdentifier>)

Parameters

collection IEnumerable<ItemIdentifier>

Clear()

Removes all items from the ICollection`1.

Exceptions

NotSupportedException The ICollection`1 is read-only.

Contains(ItemIdentifier)

Determines whether the ICollection`1 contains a specific value.

Parameters

item ItemIdentifier The object to locate in the ICollection`1.

Returns

bool true if item is found in the ICollection`1; otherwise, false.

CopyTo(ItemIdentifier[], int)

Copies the elements of the ICollection`1 to an Array, starting at a particular Array index.

Parameters

array ItemIdentifier[] The one-dimensional Array that is the destination of the elements copied from ICollection`1. The Array must have zero-based indexing. arrayIndex int The zero-based index in array at which copying begins.

Exceptions

ArgumentNullException array is null. ArgumentOutOfRangeException arrayIndex is less than 0. ArgumentException The number of elements in the source ICollection`1 is greater than the available space from arrayIndex to the end of the destination array.

GetEnumerator()

Returns an enumerator that iterates through the collection.

Returns

IEnumerator<ItemIdentifier> An enumerator that can be used to iterate through the collection.

GetSelfSuggestedComment()

Returns

string

GetSelfSuggestedName()

Returns

string

IndexOf(ItemIdentifier)

Determines the index of a specific item in the IList`1.

Parameters

item ItemIdentifier The object to locate in the IList`1.

Returns

int The index of item if found in the list; otherwise, -1.

Insert(int, ItemIdentifier)

Inserts an item to the IList`1 at the specified index.

Parameters

index int The zero-based index at which item should be inserted. item ItemIdentifier The object to insert into the IList`1.

Exceptions

ArgumentOutOfRangeException index is not a valid index in the IList`1. NotSupportedException The IList`1 is read-only.

InsertRange(int, IEnumerable<ItemIdentifier>)

Parameters

index int collection IEnumerable<ItemIdentifier>

Remove(ItemIdentifier)

Removes the first occurrence of a specific object from the ICollection`1.

Parameters

item ItemIdentifier The object to remove from the ICollection`1.

Returns

bool true if item was successfully removed from the ICollection1; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). This method also returns [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if <code className="paramref">item</code> is not found in the original ICollection1.

Exceptions

NotSupportedException The ICollection`1 is read-only.

RemoveAt(int)

Removes the IList`1 item at the specified index.

Parameters

index int The zero-based index of the item to remove.

Exceptions

ArgumentOutOfRangeException index is not a valid index in the IList`1. NotSupportedException The IList`1 is read-only.

RemoveRange(int, int)

Parameters

index int count int

ToString()

Returns a string that represents the current object.

Returns

string A string that represents the current object.