Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SecurityMarketDataDrive"/>.
 /// </summary>
 /// <param name="drive">The storage (database, file etc.).</param>
 /// <param name="security">Security.</param>
 public SecurityMarketDataDrive(IMarketDataDrive drive, Security security)
 {
     Drive      = drive ?? throw new ArgumentNullException(nameof(drive));
     Security   = security ?? throw new ArgumentNullException(nameof(security));
     SecurityId = security.ToSecurityId();
     SecurityId.EnsureHashCode();
 }
Example #2
0
        protected IndexBuilder(IndexSecurity security)
        {
            Security   = security ?? throw new ArgumentNullException(nameof(security));
            SecurityId = security.ToSecurityId();
            SecurityId.EnsureHashCode();

            var index = 0;

            foreach (var innerSec in security.InnerSecurityIds)
            {
                _securityIndecies[innerSec] = index;

                index++;
            }

            _bufferSize = index;
        }