Пример #1
0
 public void Initialize(Task task)
 {
     this.task      = task;
     filter         = task.GetFilter();
     task.Scheduler = Scheduler.EarliestTime;
     fixPacketQueue.ConnectInbound(task);
     heartbeatTimer = Factory.Parallel.CreateTimer("Heartbeat", task, HeartbeatTimerEvent);
     IncreaseHeartbeat();
     task.Start();
     ListenToFIX();
     MainLoopMethod = Invoke;
     if (debug)
     {
         log.Debug("Starting FIX Simulator.");
     }
     if (allTests)
     {
         foreach (var kvp in simulators)
         {
             var simulator = kvp.Value;
             if (!simulator.Enabled && simulator.Minimum > 0)
             {
                 log.Error(simulator + " is disabled");
             }
         }
         if (!simulateReceiveFailed)
         {
             log.Error("SimulateReceiveFailed is disabled.");
         }
         if (!simulateSendFailed)
         {
             log.Error("SimulateSendFailed is disabled.");
         }
     }
 }
 public void Initialize(Task task)
 {
     this.task      = task;
     filter         = task.GetFilter();
     task.Scheduler = Scheduler.EarliestTime;
     quotePacketQueue.ConnectInbound(task);
     task.Start();
     ListenToQuotes();
     if (debug)
     {
         log.Debug("Starting FIX Simulator.");
     }
 }