/// <summary> /// Initializes a new instance of the <see cref="CsvEntityList{TKey,TEntity}"/>. /// </summary> /// <param name="registry">The CSV storage of trading objects.</param> /// <param name="fileName">CSV file name.</param> protected CsvEntityList(CsvEntityRegistry registry, string fileName) { if (fileName == null) { throw new ArgumentNullException(nameof(fileName)); } Registry = registry ?? throw new ArgumentNullException(nameof(registry)); FileName = Path.Combine(Registry.Path, fileName); }
protected CsvEntityList(CsvEntityRegistry registry, string fileName, Encoding encoding) { if (registry == null) { throw new ArgumentNullException(nameof(registry)); } if (fileName == null) { throw new ArgumentNullException(nameof(fileName)); } if (encoding == null) { throw new ArgumentNullException(nameof(encoding)); } Registry = registry; _fileName = System.IO.Path.Combine(Registry.Path, fileName); _encoding = encoding; }
public FakeStorage(CsvEntityRegistry registry) { _registry = registry; }
public SecurityCsvList(CsvEntityRegistry registry) : base(registry, "security.csv") { ((ICollectionEx <Security>) this).AddedRange += s => _added?.Invoke(s); ((ICollectionEx <Security>) this).RemovedRange += s => _removed?.Invoke(s); }
public ExchangeBoardCsvList(CsvEntityRegistry registry) : base(registry, "exchangeboard.csv") { }
public ExchangeCsvList(CsvEntityRegistry registry) : base(registry, "exchange.csv") { }
public PositionCsvList(CsvEntityRegistry registry) : base(registry, "position.csv", Encoding.UTF8) { }
public PortfolioCsvList(CsvEntityRegistry registry) : base(registry, "portfolio.csv", Encoding.UTF8) { }
public ExchangeBoardCsvList(CsvEntityRegistry registry) : base(registry, "exchangeboard.csv", Encoding.UTF8) { }
public SecurityCsvList(CsvEntityRegistry registry) : base(registry, "security.csv") { AddedRange += s => _added?.Invoke(s); RemovedRange += s => _removed?.Invoke(s); }
public FakeStorage(CsvEntityRegistry registry) { _registry = registry ?? throw new ArgumentNullException(nameof(registry)); }
public PositionCsvList(CsvEntityRegistry registry) : base(registry, "position.csv") { }
public PortfolioCsvList(CsvEntityRegistry registry) : base(registry, "portfolio.csv") { }
/// <summary> /// Initializes a new instance of the <see cref="ComplexCsvSecurityList{TSecurity}"/>. /// </summary> /// <param name="registry">The CSV storage of trading objects.</param> /// <param name="fileName">CSV file name.</param> protected ComplexCsvSecurityList(CsvEntityRegistry registry, string fileName) : base(registry, fileName) { ((ICollectionEx <Security>) this).AddedRange += s => _added?.Invoke(s); ((ICollectionEx <Security>) this).RemovedRange += s => _removed?.Invoke(s); }