/// <summary> /// Deserialization constructor. /// </summary> public PlatformSourceOrderExecutionProvider(SerializationInfo info, StreamingContext context) : base(info, context) { _tradeEntities = (TradeEntityKeeper)info.GetValue("tradeEntities", typeof(TradeEntityKeeper)); _manager = (TradePlatformComponent)info.GetValue("manager", typeof(TradePlatformComponent)); _dataSourced = (ComponentId)info.GetValue("dataSourceId", typeof(ComponentId)); this.OperationalStateChangedEvent += new OperationalStateChangedDelegate(PlatformSourceOrderExecutionProvider_OperationalStateChangedEvent); }
/// <summary> /// /// </summary> public bool SetInitialParameters(TradePlatformComponent manager, ComponentId sourceId, ComponentId dataSourced) { SystemMonitor.CheckError(_manager == null, "Session member already assigned."); _manager = manager; _dataSourced = dataSourced; _tradeEntities.SetInitialParameters(manager, this, manager.GetDataDelivery(_dataSourced)); SourceInfo?info = _manager.GetSourceInfo(sourceId, SourceTypeEnum.OrderExecution); if (info.HasValue) { return(base.SetInitialParameters(sourceId, info.Value.TransportInfo)); } SystemMonitor.Warning("Failed to establish source information [" + sourceId.Print() + "]"); return(false); }
/// <summary> /// /// </summary> public bool SetInitialParameters(TradePlatformComponent manager, ComponentId sourceId, ComponentId dataSourced) { SystemMonitor.CheckError(_manager == null, "Session member already assigned."); _manager = manager; _dataSourced = dataSourced; _tradeEntities.SetInitialParameters(manager, this, manager.GetDataDelivery(_dataSourced)); SourceInfo? info = _manager.GetSourceInfo(sourceId, SourceTypeEnum.OrderExecution); if (info.HasValue) { return base.SetInitialParameters(sourceId, info.Value.TransportInfo); } SystemMonitor.Warning("Failed to establish source information [" + sourceId.Print() + "]"); return false; }
protected override void OnHandleDestroyed(EventArgs e) { base.OnHandleDestroyed(e); if (_host != null) { _host = null; } }