Ejemplo n.º 1
0
        public void Add(ObjectStreamer streamer)
        {
            var s = this.streamsById[streamer.typeId];
            if (s != null && s.type != streamer.type)
                throw new Exception($"StreamerManager::Add Streamer with the same typeId but different type is already registered in the StreamerManager {s.typeId} {s.type}");

            streamer.streamerManager = this;
            this.streamsById[streamer.typeId] = streamer;
            this.streamsByType[streamer.type] = streamer;
        }
Ejemplo n.º 2
0
        public void Add(ObjectStreamer streamer)
        {
            var s = this.streamsById[streamer.typeId];

            if (s != null && s.type != streamer.type)
            {
                throw new Exception($"StreamerManager::Add Streamer with the same typeId but different type is already registered in the StreamerManager {s.typeId} {s.type}");
            }

            streamer.streamerManager          = this;
            this.streamsById[streamer.typeId] = streamer;
            this.streamsByType[streamer.type] = streamer;
        }
Ejemplo n.º 3
0
        public void AddDefaultStreamers()
        {
            var streamers = new ObjectStreamer[]
            {
                new TickStreamer(),
                new TickStreamer(),
                new BidStreamer(),
                new AskStreamer(),
                new TradeStreamer(),
                new QuoteStreamer(),
                new BarStreamer(),
                new Level2Streamer(),
                new Level2SnapshotStreamer(),
                new Level2UpdateStreamer(),
                new FillStreamer(),
                new TimeSeriesItemStreamer(),
                new ExecutionReportStreamer(),
                new ExecutionCommandStreamer(),
                new TextInfoStreamer(),
                new FieldListStreamer(),
                new StrategyStatusStreamer(),
                new ProviderErrorStreamer(),
                new FundamentalStreamer(),
                new NewsStreamer(),
                new PositionStreamer(),
                new PortfolioStreamer(),
                new GroupStreamer(),
                new GroupUpdateStreamer(),
                new GroupEventStreamer(),
                new MessageStreamer(),
                new CommandStreamer(),
                new ResponseStreamer(),
                new InstrumentStreamer(),
                new AltIdStreamer(),
                new LegStreamer(),
                new AccountDataStreamer(),
                new AccountTransactionStreamer(),
                new UserStreamer(),
                new StringStreamer(),
                new Int64Streamer(),
                new Int32Streamer(),
                new DateTimeStreamer(),
                new CharStreamer(),
                new BooleanStreamer(),
                new ColorStreamer(),
                new ByteStreamer(),
                new DoubleStreamer(),
                new Int16Streamer(),
                new ArrayStreamer(),
                new AccountReportStreamer(),
                new OnSubscribeStreamer(),
                new OnUnsubscribeStreamer(),
                new ParameterStreamer(),
                new ParameterListStreamer(),
                new OnLoginStreamer(),
                new OnLogoutStreamer(),
                new OnLoggedInStreamer(),
                new OnLoggedOutStreamer(),
                new OnHeartbeatStreamer(),
                new OnProviderConnectedStreamer(),
                new OnProviderDisconnectedStreamer(),
                new AttributeStreamer(),
                new TimeSpanStreamer()
            };

            foreach (var s in streamers)
            {
                Add(s);
            }
        }
Ejemplo n.º 4
0
 public void Get(Type type, out ObjectStreamer streamer) => this.streamsByType.TryGetValue(type, out streamer);
Ejemplo n.º 5
0
 public void Remove(ObjectStreamer streamer)
 {
     this.streamsById.Remove(streamer.typeId);
     this.streamsByType.Remove(streamer.type);
 }
Ejemplo n.º 6
0
 public void AddDefaultStreamers()
 {
     var streamers = new ObjectStreamer[]
     {
         new TickStreamer(),
         new TickStreamer(),
         new BidStreamer(),
         new AskStreamer(),
         new TradeStreamer(),
         new QuoteStreamer(),
         new BarStreamer(),
         new Level2Streamer(),
         new Level2SnapshotStreamer(),
         new Level2UpdateStreamer(),
         new FillStreamer(),
         new TimeSeriesItemStreamer(),
         new ExecutionReportStreamer(),
         new ExecutionCommandStreamer(),
         new TextInfoStreamer(),
         new FieldListStreamer(),
         new StrategyStatusStreamer(),
         new ProviderErrorStreamer(),
         new FundamentalStreamer(),
         new NewsStreamer(),
         new PositionStreamer(),
         new PortfolioStreamer(),
         new GroupStreamer(),
         new GroupUpdateStreamer(),
         new GroupEventStreamer(),
         new MessageStreamer(),
         new CommandStreamer(),
         new ResponseStreamer(),
         new InstrumentStreamer(),
         new AltIdStreamer(),
         new LegStreamer(),
         new AccountDataStreamer(),
         new AccountTransactionStreamer(),
         new UserStreamer(),
         new StringStreamer(),
         new Int64Streamer(),
         new Int32Streamer(),
         new DateTimeStreamer(),
         new CharStreamer(),
         new BooleanStreamer(),
         new ColorStreamer(),
         new ByteStreamer(),
         new DoubleStreamer(),
         new Int16Streamer(),
         new ArrayStreamer(),
         new AccountReportStreamer(),
         new OnSubscribeStreamer(),
         new OnUnsubscribeStreamer(),
         new ParameterStreamer(),
         new ParameterListStreamer(),
         new OnLoginStreamer(),
         new OnLogoutStreamer(),
         new OnLoggedInStreamer(),
         new OnLoggedOutStreamer(),
         new OnHeartbeatStreamer(),
         new OnProviderConnectedStreamer(),
         new OnProviderDisconnectedStreamer(),
         new AttributeStreamer(),
         new TimeSpanStreamer()
     };
     foreach (var s in streamers)
         Add(s);
 }
Ejemplo n.º 7
0
 public void Get(Type type, out ObjectStreamer streamer) => this.streamsByType.TryGetValue(type, out streamer);
Ejemplo n.º 8
0
 public void Remove(ObjectStreamer streamer)
 {
     this.streamsById.Remove(streamer.typeId);
     this.streamsByType.Remove(streamer.type);
 }