/// <summary> /// Initializes a new instance of the <see cref="StorageMetaInfoMessageAdapter"/>. /// </summary> /// <param name="innerAdapter">The adapter, to which messages will be directed.</param> /// <param name="securityStorage">Securities meta info storage.</param> /// <param name="positionStorage">Position storage.</param> /// <param name="exchangeInfoProvider">Exchanges and trading boards provider.</param> public StorageMetaInfoMessageAdapter(IMessageAdapter innerAdapter, ISecurityStorage securityStorage, IPositionStorage positionStorage, IExchangeInfoProvider exchangeInfoProvider) : base(innerAdapter) { _securityStorage = securityStorage ?? throw new ArgumentNullException(nameof(securityStorage)); _positionStorage = positionStorage ?? throw new ArgumentNullException(nameof(positionStorage)); _exchangeInfoProvider = exchangeInfoProvider ?? throw new ArgumentNullException(nameof(_exchangeInfoProvider)); }
/// <summary> /// Initializes a new instance of the <see cref="StorageMetaInfoMessageAdapter"/>. /// </summary> /// <param name="innerAdapter">The adapter, to which messages will be directed.</param> /// <param name="securityStorage">Securities meta info storage.</param> /// <param name="positionStorage">Position storage.</param> /// <param name="exchangeInfoProvider">Exchanges and trading boards provider.</param> /// <param name="storageRegistry">The storage of market data.</param> /// <param name="snapshotRegistry">Snapshot storage registry.</param> /// <param name="candleBuilderProvider">Candle builders provider.</param> public StorageMetaInfoMessageAdapter(IMessageAdapter innerAdapter, ISecurityStorage securityStorage, IPositionStorage positionStorage, IExchangeInfoProvider exchangeInfoProvider, IStorageRegistry storageRegistry, SnapshotRegistry snapshotRegistry, CandleBuilderProvider candleBuilderProvider) : base(innerAdapter, storageRegistry, snapshotRegistry, candleBuilderProvider) { _securityStorage = securityStorage ?? throw new ArgumentNullException(nameof(securityStorage)); _positionStorage = positionStorage ?? throw new ArgumentNullException(nameof(positionStorage)); _exchangeInfoProvider = exchangeInfoProvider ?? throw new ArgumentNullException(nameof(_exchangeInfoProvider)); }
/// <summary> /// Initializes a new instance of the <see cref="Connector"/>. /// </summary> /// <param name="securityStorage">Securities meta info storage.</param> /// <param name="positionStorage">Position storage.</param> /// <param name="storageRegistry">The storage of market data.</param> /// <param name="snapshotRegistry">Snapshot storage registry.</param> /// <param name="initManagers">Initialize managers.</param> public Connector(ISecurityStorage securityStorage, IPositionStorage positionStorage, IStorageRegistry storageRegistry, SnapshotRegistry snapshotRegistry, bool initManagers = true) : this(false, true, storageRegistry, snapshotRegistry, initManagers) { _entityCache.ExchangeInfoProvider = storageRegistry.ExchangeInfoProvider; SecurityStorage = securityStorage ?? throw new ArgumentNullException(nameof(securityStorage)); PositionStorage = positionStorage ?? throw new ArgumentNullException(nameof(positionStorage)); InitAdapter(storageRegistry, snapshotRegistry); }
/// <summary> /// Initializes a new instance of the <see cref="StorageEntityFactory"/>. /// </summary> /// <param name="securityStorage">Securities meta info storage.</param> /// <param name="positionStorage">Position storage.</param> /// <param name="trackPositions">Track positions.</param> public StorageEntityFactory(ISecurityStorage securityStorage, IPositionStorage positionStorage, bool trackPositions) { _securityStorage = securityStorage ?? throw new ArgumentNullException(nameof(securityStorage)); _positionStorage = positionStorage ?? throw new ArgumentNullException(nameof(positionStorage)); _trackPositions = trackPositions; }