Exemple #1
0
        public OrderMonitorHandler(OrderMonitor o, Action <string, string> sendToUserAct)
        {
            tms = new TraderMsgSaver();

            this.sendToUserAct              = sendToUserAct;
            this.om                         = o;
            om.OnBailWarning               += om_OnBailWarning;
            om.prepare.OnBailAutoCollected += preBlaster_OnBailAutoCollected;
            om.prepare.OnRedoed            += preBlaster_OnRedoed;
            om.prepare.OnRedoing           += preBlaster_OnRedoing;
        }
Exemple #2
0
        public void Dispose()
        {
            if (om != null)
            {
                om.OnBailWarning -= om_OnBailWarning;
                om.prepare.OnBailAutoCollected -= preBlaster_OnBailAutoCollected;
                om.prepare.OnRedoed            -= preBlaster_OnRedoed;
                om.prepare.OnRedoing           -= preBlaster_OnRedoing;

                om.Dispose(); om = null;
            }
            if (tms != null)
            {
                tms.Dispose(); tms = null;
            }

            if (sendToUserAct != null)
            {
                sendToUserAct = null;
            }
        }