Class DataItemIdentifierCollection
Last update: 09.03.2026Namespace: OpenTD.Results.Dataset
Assembly: OpenTD.Results.dll
Collection of DataItemIdentifiers
public class DataItemIdentifierCollection : IList<DataItemIdentifier>, ICollection<DataItemIdentifier>, IEnumerable<DataItemIdentifier>, IEnumerable
Inheritance
object ← DataItemIdentifierCollection
Implements
IList<DataItemIdentifier>, ICollection<DataItemIdentifier>, IEnumerable<DataItemIdentifier>, IEnumerable
Inherited Members
object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()
Constructors
DataItemIdentifierCollection(IEnumerable<DataItemIdentifier>)
public DataItemIdentifierCollection(IEnumerable<DataItemIdentifier> collection)
Parameters
collection IEnumerable<DataItemIdentifier>
DataItemIdentifierCollection()
public DataItemIdentifierCollection()
DataItemIdentifierCollection(ItemIdentifierCollection, List<DataSubtype>, bool)
public DataItemIdentifierCollection(ItemIdentifierCollection items, List<DataSubtype> subtypes, bool createAllCombinations = true)
Parameters
items ItemIdentifierCollection
subtypes List<DataSubtype>
createAllCombinations bool
DataItemIdentifierCollection(ItemIdentifierCollection, DataSubtype)
public DataItemIdentifierCollection(ItemIdentifierCollection items, DataSubtype subtype)
Parameters
items ItemIdentifierCollection
subtype DataSubtype
DataItemIdentifierCollection(IEnumerable<string>)
public DataItemIdentifierCollection(IEnumerable<string> dataItemNames)
Parameters
dataItemNames IEnumerable<string>
DataItemIdentifierCollection(params string[])
public DataItemIdentifierCollection(params string[] sindaNames)
Parameters
sindaNames string[]
Properties
AutoNamer
protected AutoNamer AutoNamer { get; set; }
Property Value
AutoNamer
Count
Gets the number of elements contained in the
public int Count { get; }
Property Value
InternalSuggestedName
public string InternalSuggestedName { get; set; }
Property Value
IsReadOnly
Gets a value indicating whether the
public bool IsReadOnly { get; }
Property Value
ItemIdentifiers
The ItemIdentifiers associated with the DataItemIdentifiers in this collection.
public ItemIdentifierCollection ItemIdentifiers { get; }
Property Value
Name
public string Name { get; set; }
Property Value
Subtype
If all the DataItemIdentifiers in the collection have the same DataSubtype, this will equal that. Otherwise this will be null.
public DataSubtype Subtype { get; }
Property Value
this[int]
Gets or sets the element at the specified index.
public DataItemIdentifier this[int index] { get; set; }
Property Value
Exceptions
index is not a valid index in the
The property is set and the
Methods
Add(DataItemIdentifier)
Adds an item to the
public void Add(DataItemIdentifier item)
Parameters
item DataItemIdentifier
The object to add to the
Exceptions
The
AddRange(IEnumerable<DataItemIdentifier>)
public void AddRange(IEnumerable<DataItemIdentifier> collection)
Parameters
collection IEnumerable<DataItemIdentifier>
Clear()
Removes all items from the
public void Clear()
Exceptions
The
Contains(DataItemIdentifier)
Determines whether the
public bool Contains(DataItemIdentifier item)
Parameters
item DataItemIdentifier
The object to locate in the
Returns
true if item is found in the
CopyTo(DataItemIdentifier[], int)
Copies the elements of the
public void CopyTo(DataItemIdentifier[] array, int arrayIndex)
Parameters
array DataItemIdentifier[]
The one-dimensional
arrayIndex int
The zero-based index in array at which copying begins.
Exceptions
array is null.
arrayIndex is less than 0.
The number of elements in the source arrayIndex to the end of the destination array.
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<DataItemIdentifier> GetEnumerator()
Returns
IEnumerator<DataItemIdentifier>
An enumerator that can be used to iterate through the collection.
GetSelfSuggestedName()
protected virtual string GetSelfSuggestedName()
Returns
IndexOf(DataItemIdentifier)
Determines the index of a specific item in the
public int IndexOf(DataItemIdentifier item)
Parameters
item DataItemIdentifier
The object to locate in the
Returns
The index of item if found in the list; otherwise, -1.
Insert(int, DataItemIdentifier)
Inserts an item to the
public void Insert(int index, DataItemIdentifier item)
Parameters
index int
The zero-based index at which item should be inserted.
item DataItemIdentifier
The object to insert into the
Exceptions
index is not a valid index in the
The
InsertRange(int, IEnumerable<DataItemIdentifier>)
public void InsertRange(int index, IEnumerable<DataItemIdentifier> collection)
Parameters
index int
collection IEnumerable<DataItemIdentifier>
Remove(DataItemIdentifier)
Removes the first occurrence of a specific object from the
public bool Remove(DataItemIdentifier item)
Parameters
item DataItemIdentifier
The object to remove from the
Returns
true if item was successfully removed from the item is not found in the original
Exceptions
The
RemoveAt(int)
Removes the
public void RemoveAt(int index)
Parameters
index int
The zero-based index of the item to remove.
Exceptions
index is not a valid index in the
The
RemoveRange(int, int)
public void RemoveRange(int index, int count)
Parameters
index int
count int
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
A string that represents the current object.