Table of Contents

Class OrderCollection

Namespace
Balsam
Assembly
Balsam.Backtester.dll

Encapsulates a collection of orders using order id as the key.

public class OrderCollection : KeyedCollection<long, Order>, IList<Order>, ICollection<Order>, IReadOnlyList<Order>, IReadOnlyCollection<Order>, IEnumerable<Order>, IList, ICollection, IEnumerable
Inheritance
OrderCollection
Implements
Inherited Members
Extension Methods

Constructors

OrderCollection()

Instantiates a new order collection.

public OrderCollection()

OrderCollection(Order)

Instantiates a new collection of child orders using the specified order as the parent.

public OrderCollection(Order parent)

Parameters

parent Order

Methods

AddRange(IEnumerable<Order>)

Adds each order in the specified enumerable to the collection.

public void AddRange(IEnumerable<Order> orders)

Parameters

orders IEnumerable<Order>

GetKeyForItem(Order)

Returns the order id as the key.

protected override long GetKeyForItem(Order item)

Parameters

item Order

Returns

long

InsertItem(int, Order)

Inserts am order at the specified index.

protected override void InsertItem(int index, Order item)

Parameters

index int
item Order