Class SettlementPriceCollection
A collection of settlement prices indexed by symbol and then by date.
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
public class SettlementPriceCollection
- Inheritance
-
SettlementPriceCollection
- Inherited Members
- Extension Methods
Properties
Count
Gets the total number of settlement prices in the collection.
public int Count { get; }
Property Value
LastDate
Gets the last settlement date in the collection.
public DateTime LastDate { get; }
Property Value
Methods
Add(string, DateTime, double)
Adds the specified settlement to the collection.
public void Add(string symbol, DateTime date, double settlement)
Parameters
ContainsSymbol(string)
Returns true if the specified symbol is contained in the collection.
public bool ContainsSymbol(string symbol)
Parameters
symbol
string
Returns
GetSettlementPrice(string, DateTime)
Returns the settlement price for the specified symbol/date or null if not found.
public double? GetSettlementPrice(string symbol, DateTime date)
Parameters
Returns
GetSettlementPrices(string)
Returns a dictionary of date/settlement prices for the specified symbol.
public Dictionary<DateTime, double> GetSettlementPrices(string symbol)
Parameters
symbol
string
Returns
Load(string)
Loads the specified json file.
public static SettlementPriceCollection Load(string fileName)
Parameters
fileName
string
Returns
Save(string)
Serializes the collection to a json file.
public void Save(string fileName)
Parameters
fileName
string