Class DataArrayCollection
Last update: 09.03.2026Namespace: OpenTD.Results.Dataset
Assembly: OpenTD.Results.dll
A collection of DataArrays, with some metadata describing them.
public class DataArrayCollection : IList<DataArray>, ICollection<DataArray>, IEnumerable<DataArray>, IEnumerable
Inheritance
Implements
IList<DataArray>, ICollection<DataArray>, IEnumerable<DataArray>, IEnumerable
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
DataArrayCollection()
public DataArrayCollection()
DataArrayCollection(IEnumerable<DataArray>)
public DataArrayCollection(IEnumerable<DataArray> collection)
Parameters
collection IEnumerable<DataArray>
DataArrayCollection(StandardDataSubtypes, IEnumerable<IEnumerable<double>>, UnitsData, IDataset, ItemIdentifier)
public DataArrayCollection(StandardDataSubtypes subtype, IEnumerable<IEnumerable<double>> collection, UnitsData units, IDataset sourceDataset = null, ItemIdentifier sourceItem = null)
Parameters
subtype StandardDataSubtypes
collection IEnumerable<IEnumerable<double>>
units UnitsData
sourceDataset IDataset
sourceItem ItemIdentifier
DataArrayCollection(DataSubtype, IEnumerable<IEnumerable<double>>, UnitsData, IDataset, ItemIdentifier)
public DataArrayCollection(DataSubtype subtype, IEnumerable<IEnumerable<double>> collection, UnitsData units, IDataset sourceDataset = null, ItemIdentifier sourceItem = null)
Parameters
subtype DataSubtype
collection IEnumerable<IEnumerable<double>>
units UnitsData
sourceDataset IDataset
sourceItem ItemIdentifier
DataArrayCollection(DataArrayCollection)
public DataArrayCollection(DataArrayCollection collection)
Parameters
collection DataArrayCollection
Properties
AutoCommenter
protected AutoCommenter AutoCommenter { get; set; }
Property Value
AutoCommenter
AutoNamer
protected AutoNamer AutoNamer { get; set; }
Property Value
AutoNamer
Comment
public string Comment { get; set; }
Property Value
Count
Gets the number of elements contained in the
public int Count { get; }
Property Value
DataItemCount
If all the DataArrays in the collection have the same number of items, this will equal that. Otherwise this will be -1.
public virtual int DataItemCount { get; }
Property Value
Dimension
If all the DataArrays in the collection have the same physical dimension, this will equal that. Otherwise this will be UnitsData.UnitsType.UNITS_NOT_SET.
public virtual UnitsData.UnitsType Dimension { get; }
Property Value
UnitsData.UnitsType
InternalSuggestedComment
public string InternalSuggestedComment { get; set; }
Property Value
InternalSuggestedName
public string InternalSuggestedName { get; set; }
Property Value
IsReadOnly
Gets a value indicating whether the
public bool IsReadOnly { get; }
Property Value
MaxDataItemCount
The maximum item count found in the arrays of the collection.
public virtual int MaxDataItemCount { get; }
Property Value
MinDataItemCount
The minimum item count found in the arrays of the collection.
public virtual int MinDataItemCount { get; }
Property Value
Name
public string Name { get; set; }
Property Value
SourceDataItemIdentifiers
The SourceDataItemIdentifiers associated with the DataArrays in this collection.
public DataItemIdentifierCollection SourceDataItemIdentifiers { get; }
Property Value
SourceDataset
If all the DataArrays in the collection have the same SourceDataset, this will equal that. Otherwise this will be null.
public virtual IDataset SourceDataset { get; }
Property Value
SourceItem
If all the DataArrays in the collection have the same SourceItem, this will equal that. Otherwise this will be null.
public virtual ItemIdentifier SourceItem { get; }
Property Value
SourceItemIdentifiers
The SourceItemIdentifiers associated with the DataArrays in this collection.
public ItemIdentifierCollection SourceItemIdentifiers { get; }
Property Value
SourceItemSubmodel
If all the DataArrays in the collection have the same SourceItem submodel, this will equal that. Otherwise this will be null.
public virtual string SourceItemSubmodel { get; }
Property Value
Subtype
If all the DataArrays in the collection have the same data subtype, this will equal that. Otherwise this will be null.
public virtual DataSubtype Subtype { get; }
Property Value
this[int]
Gets or sets the element at the specified index.
public DataArray this[int index] { get; set; }
Property Value
Exceptions
index is not a valid index in the
The property is set and the
Methods
Add(DataArray)
Adds an item to the
public void Add(DataArray x)
Parameters
Exceptions
The
AddRange(IEnumerable<DataArray>)
public void AddRange(IEnumerable<DataArray> collection)
Parameters
collection IEnumerable<DataArray>
Clear()
Removes all items from the
public void Clear()
Exceptions
The
Contains(DataArray)
Determines whether the
public bool Contains(DataArray item)
Parameters
item DataArray
The object to locate in the
Returns
true if item is found in the
CopyTo(DataArray[], int)
Copies the elements of the
public void CopyTo(DataArray[] array, int arrayIndex)
Parameters
array DataArray[]
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.
Filter(DataItemIdentifierCollection)
public DataArrayCollection Filter(DataItemIdentifierCollection dataItems)
Parameters
dataItems DataItemIdentifierCollection
Returns
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<DataArray> GetEnumerator()
Returns
An enumerator that can be used to iterate through the collection.
GetSelfSuggestedComment()
protected virtual string GetSelfSuggestedComment()
Returns
GetSelfSuggestedName()
protected virtual string GetSelfSuggestedName()
Returns
GetTranspose()
public virtual DataArrayCollection GetTranspose()
Returns
GetValues()
public virtual List<List<double>> GetValues()
Returns
GetValues(UnitsData)
public virtual List<List<double>> GetValues(UnitsData units)
Parameters
units UnitsData
Returns
IndexOf(DataArray)
Determines the index of a specific item in the
public int IndexOf(DataArray item)
Parameters
item DataArray
The object to locate in the
Returns
The index of item if found in the list; otherwise, -1.
Insert(int, DataArray)
Inserts an item to the
public void Insert(int index, DataArray item)
Parameters
index int
The zero-based index at which item should be inserted.
item DataArray
The object to insert into the
Exceptions
index is not a valid index in the
The
InsertRange(int, IEnumerable<DataArray>)
public void InsertRange(int index, IEnumerable<DataArray> collection)
Parameters
index int
collection IEnumerable<DataArray>
Remove(DataArray)
Removes the first occurrence of a specific object from the
public bool Remove(DataArray x)
Parameters
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.
See Also
IAutoName