Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CsvEntityRegistry"/>.
        /// </summary>
        public CsvEntityRegistry(string path)
        {
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }

            Path    = path;
            Storage = new FakeStorage(this);

            _exchanges      = new ExchangeCsvList(this);
            _exchangeBoards = new ExchangeBoardCsvList(this);
            _securities     = new SecurityCsvList(this);
            _portfolios     = new PortfolioCsvList(this);
            _positions      = new PositionCsvList(this);
        }
Exemple #2
0
 public Security ToSecurity(SecurityCsvList list, string id)
 {
     return(new Security
     {
         Id = id,
         Name = Name,
         Code = Code,
         Class = Class,
         ShortName = ShortName,
         Board = list.Registry.GetBoard(Board),
         UnderlyingSecurityId = UnderlyingSecurityId,
         PriceStep = PriceStep,
         VolumeStep = VolumeStep,
         Multiplier = Multiplier,
         Decimals = Decimals,
         Type = Type,
         ExpiryDate = ExpiryDate,
         SettlementDate = SettlementDate,
         Strike = Strike,
         OptionType = OptionType,
         Currency = Currency,
         ExternalId = ExternalId.Clone(),
     });
 }