17 using System.Globalization;
63 public List<Symbol>
Symbols {
get; } =
new();
78 #pragma warning disable CA1308 // class Market keeps all name in lowercase
80 #pragma warning restore CA1308
85 Log.
Trace($
"{nameof(DataDownloadConfig)}: Default market '{MarketName}' applied for SecurityType '{SecurityType}'");
90 throw new ArgumentException($
"The specified market '{MarketName}' is not supported. Supported markets are: {string.Join(",
", Market.SupportedMarkets())}.");
126 return $
"TickType: {TickType}, " +
127 $
"SecurityType: {SecurityType}, " +
128 $
"Resolution: {Resolution}, " +
129 $
"StartDate: {StartDate:yyyyMMdd}, " +
130 $
"EndDate: {EndDate:yyyyMMdd}, " +
131 $
"MarketName: {MarketName}, " +
132 $
"Symbols: {string.Join(",
", Symbols.Select(s => s.ToString()))}";
141 private static TEnum ParseEnum<TEnum>(
string value) where TEnum :
struct, Enum
143 if (!Enum.TryParse(value,
true, out TEnum result) || !Enum.IsDefined(typeof(TEnum), result))
145 throw new ArgumentException($
"Invalid {typeof(TEnum).Name} specified. Please provide a valid {typeof(TEnum).Name}.");