Skip to main content

OpenTD reference 2026 R1

Class CompareSuite

Last update: 09.03.2026

Namespace: OpenTD.Results.Dataset
Assembly: OpenTD.Results.dll

Use a CompareSuite to test whether multiple pairs of Datasets are equal or not. Tests a set of CompareAssertions and collects the results.

public class CompareSuite : IList<CompareAssertion>, ICollection<CompareAssertion>, IEnumerable<CompareAssertion>, IEnumerable

Inheritance

object ← CompareSuite

Implements

IList<CompareAssertion>, ICollection<CompareAssertion>, IEnumerable<CompareAssertion>, IEnumerable

Inherited Members

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

Properties

Count

Gets the number of elements contained in the .

public int Count { get; }

Property Value

int

IsReadOnly

Gets a value indicating whether the is read-only.

public bool IsReadOnly { get; }

Property Value

bool

Log

public string Log { get; set; }

Property Value

string

Message

public string Message { get; }

Property Value

string

this[int]

Gets or sets the element at the specified index.

public CompareAssertion this[int index] { get; set; }

Property Value

CompareAssertion

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the .

NotSupportedException

The property is set and the is read-only.

Methods

Add(IDataset, IDataset, bool)

public void Add(IDataset a, IDataset b, bool assertDatasetsSame)

Parameters

a IDataset

b IDataset

assertDatasetsSame bool

Add(CompareAssertion)

Adds an item to the .

public void Add(CompareAssertion item)

Parameters

item CompareAssertion

The object to add to the .

Exceptions

NotSupportedException

The is read-only.

Clear()

Removes all items from the .

public void Clear()

Exceptions

NotSupportedException

The is read-only.

Contains(CompareAssertion)

Determines whether the contains a specific value.

public bool Contains(CompareAssertion item)

Parameters

item CompareAssertion

The object to locate in the .

Returns

bool

true if item is found in the ; otherwise, false.

CopyTo(CompareAssertion[], int)

Copies the elements of the to an , starting at a particular index.

public void CopyTo(CompareAssertion[] array, int arrayIndex)

Parameters

array CompareAssertion[]

The one-dimensional that is the destination of the elements copied from . The 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 is greater than the available space from arrayIndex to the end of the destination array.

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<CompareAssertion> GetEnumerator()

Returns

IEnumerator<CompareAssertion>

An enumerator that can be used to iterate through the collection.

IndexOf(CompareAssertion)

Determines the index of a specific item in the .

public int IndexOf(CompareAssertion item)

Parameters

item CompareAssertion

The object to locate in the .

Returns

int

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

Insert(int, CompareAssertion)

Inserts an item to the at the specified index.

public void Insert(int index, CompareAssertion item)

Parameters

index int

The zero-based index at which item should be inserted.

item CompareAssertion

The object to insert into the .

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the .

NotSupportedException

The is read-only.

Remove(CompareAssertion)

Removes the first occurrence of a specific object from the .

public bool Remove(CompareAssertion item)

Parameters

item CompareAssertion

The object to remove from the .

Returns

bool

true if item was successfully removed from the ; otherwise, false. This method also returns false if item is not found in the original .

Exceptions

NotSupportedException

The is read-only.

RemoveAt(int)

Removes the item at the specified index.

public void RemoveAt(int index)

Parameters

index int

The zero-based index of the item to remove.

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the .

NotSupportedException

The is read-only.

Run()

public Tuple<int, int> Run()

Returns

Tuple<int, int>

Connect with Ansys