protected virtual void OnConnected()
{
if ((this is IDataProvider || this is IFundamentalProvider) && this.dataQueue == null)
{
this.dataQueue = new EventQueue(EventQueueId.Data, EventQueueType.Master, EventQueuePriority.Normal, 25600, this.framework.EventBus);
this.dataQueue.Enqueue(new OnQueueOpened(this.dataQueue));
this.dataQueue.Name = $"{this.name} data queue";
this.framework.EventBus.DataPipe.Add(this.dataQueue);
}
if (this is IExecutionProvider && this.executionQueue == null)
{
this.executionQueue = new EventQueue(EventQueueId.Execution, EventQueueType.Master, EventQueuePriority.Normal, 25600, this.framework.EventBus);
this.executionQueue.Enqueue(new OnQueueOpened(this.executionQueue));
this.executionQueue.Name = $"{this.name} execution queue";
this.framework.EventBus.ExecutionPipe.Add(this.executionQueue);
}
}