public void Dispose() { if (_disposed) { return; } ObjectStateNotifier.RemoveObserver(this); try { Releaseobject(_exchangeClientSiteCode, "_exchangeClientSiteCode"); Releaseobject(_exchangeClientTITOEnDis, "_exchangeClientTITOEnDis"); Releaseobject(_exchangeClientTITOEXP, "_exchangeClientTITOEXP"); Releaseobject(_iExchangeAdminSiteCode, "_iExchangeAdminSiteCode"); Releaseobject(_iExchangeAdminTITOEnDis, "_iExchangeAdminTITOEnDis"); Releaseobject(_iExchangeAdminTITOEXP, "_iExchangeAdminTITOEXP"); LogManager.WriteLog("Dispose | All Objects were released successfully.", LogManager.enumLogLevel.Info); } catch { } _exchangeClientSiteCode = null; _exchangeClientTITOEnDis = null; _exchangeClientTITOEXP = null; _iExchangeAdminSiteCode = null; _iExchangeAdminTITOEnDis = null; _iExchangeAdminTITOEXP = null; GC.SuppressFinalize(this); }
public EmployeeMasterCard() { _exchangeClient = new ExchangeClient(); _exchangeClient.EMP_DATA_ACK += new _IExchangeClientEvents_EMP_DATA_ACKEventHandler(_exchangeClient_EMP_DATA_ACK); _exchangeClient.InitialiseExchange(0); if (_requestCollection == null) { _requestCollection = new SortedDictionary <int, EmployeeMasterCardThreadData>(); } if (_emppollingCollection == null) { _emppollingCollection = new List <Employeecarddata>(); } _thRequest = new Thread(new ThreadStart(ProcessRequest)); _thRequest.Start(); _thAckResponse = new ThreadDispatcher <EmployeeMasterCardThreadDataResponse>(1, "_thAckResponse_EmployeeMasterCard"); _thAckResponse.AddProcessThreadData(new ProcessThreadDataHandler <EmployeeMasterCardThreadDataResponse>(this.ProcessResponse)); _thAckResponse.Initialize(); _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; ObjectStateNotifier.AddObserver(this); }
public void Dispose() { if (_disposed) { return; } ObjectStateNotifier.RemoveObserver(this); try { var i = Marshal.ReleaseComObject(_exchangeClient); Thread.Sleep(10); while (i > 0) { LogManager.WriteLog("Number of objects in _exchangeClient = " + i, LogManager.enumLogLevel.Info); i = Marshal.ReleaseComObject(_exchangeClient); } LogManager.WriteLog("|=> _exchangeClient was released successfully.", LogManager.enumLogLevel.Info); i = Marshal.ReleaseComObject(_iExchangeAdmin); Thread.Sleep(10); while (i > 0) { LogManager.WriteLog("Number of objects in _iExchangeAdmin = " + i, LogManager.enumLogLevel.Info); i = Marshal.ReleaseComObject(_iExchangeAdmin); } LogManager.WriteLog("|=> _iExchangeAdmin was released successfully.", LogManager.enumLogLevel.Info); } catch { } _iExchangeAdmin = null; _exchangeClient = null; GC.SuppressFinalize(this); }
public AutoEnableDisable() { _exchangeClient = new ExchangeClient(); _exchangeClient.ExchangeSectorUpdate += ExchangeClientExchangeSectorUpdate; _exchangeClient.ACK += ExchangeClientAck; _exchangeClient.UDPUpdate += ExchangeClientUDPUpdate; _exchangeClient.ServerUpdate += ExchangeClientServerUpdate; _exchangeClient.InitialiseExchange(0); lock (HoldingObject) { if (MessageStore == null) { MessageStore = new List <MessageStore>(); } if (AFTMessages == null) { AFTMessages = new List <AFTMessages>(); } } _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; ObjectStateNotifier.AddObserver(this); }
public EmployeeMasterCard() { _exchangeClient = new ExchangeClient(); _exchangeClient.EMP_DATA_ACK += new _IExchangeClientEvents_EMP_DATA_ACKEventHandler(_exchangeClient_EMP_DATA_ACK); _exchangeClient.InitialiseExchange(0); if (_requestCollection == null) _requestCollection = new SortedDictionary<int, EmployeeMasterCardThreadData>(); if (_emppollingCollection == null) _emppollingCollection = new List<Employeecarddata>(); _thRequest = new Thread(new ThreadStart(ProcessRequest)); _thRequest.Start(); _thAckResponse = new ThreadDispatcher<EmployeeMasterCardThreadDataResponse>(1, "_thAckResponse_EmployeeMasterCard"); _thAckResponse.AddProcessThreadData(new ProcessThreadDataHandler<EmployeeMasterCardThreadDataResponse>(this.ProcessResponse)); _thAckResponse.Initialize(); _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; ObjectStateNotifier.AddObserver(this); }
public TITO() { _exchangeClientSiteCode = new ExchangeClient(); _exchangeClientSiteCode.OPT_PARAM_ACK += ExchangeClientSiteCodeAck; _exchangeClientSiteCode.InitialiseExchange(0); _exchangeClientTITOEnDis = new ExchangeClient(); _exchangeClientTITOEnDis.TITO_ENDIS_ACK += ExchangeClientTITOAck; _exchangeClientTITOEnDis.InitialiseExchange(0); _exchangeClientTITOEXP = new ExchangeClient(); _exchangeClientTITOEXP.TITO_PARAM_ACK += ExchangeClientVoucherAck; _exchangeClientTITOEXP.InitialiseExchange(0); if (dTITORequest == null) { dTITORequest = new SortedDictionary <int, TITOThreadDataRequest>(); } if (dTicketExpireRequest == null) { dTicketExpireRequest = new SortedDictionary <int, int>(); } if (dSiteCodeRequest == null) { dSiteCodeRequest = new SortedDictionary <int, int>(); } _tmrRequest = new System.Timers.Timer(Int32.Parse(ConfigManager.Read("TITOConfigInterval")) * 1000); _tmrRequest.Elapsed += new ElapsedEventHandler(ProcessRequest); _thAckResponse = new ThreadDispatcher <TITOThreadDataResponse>(1, "_thTITOAckResponse"); _thAckResponse.AddProcessThreadData(new ProcessThreadDataHandler <TITOThreadDataResponse>(this.TITOProcessResponse)); _thAckResponse.Initialize(); _thTicketExpireAckResponse = new ThreadDispatcher <TITOThreadDataResponse>(1, "_thTicketExpireAckResponse"); _thTicketExpireAckResponse.AddProcessThreadData(new ProcessThreadDataHandler <TITOThreadDataResponse>(this.TicketExpireProcessResponse)); _thTicketExpireAckResponse.Initialize(); _thSiteCodeAckResponse = new ThreadDispatcher <TITOThreadDataResponse>(1, "_thSiteCodeAckResponse"); _thSiteCodeAckResponse.AddProcessThreadData(new ProcessThreadDataHandler <TITOThreadDataResponse>(this.SiteCodeProcessResponse)); _thSiteCodeAckResponse.Initialize(); _iExchangeAdminSiteCode = (IExchangeAdmin)_exchangeClientSiteCode; _iExchangeAdminTITOEnDis = (IExchangeAdmin)_exchangeClientTITOEnDis; _iExchangeAdminTITOEXP = (IExchangeAdmin)_exchangeClientTITOEXP; ObjectStateNotifier.AddObserver(this); _tmrRequest.Start(); }
public InstantPeriodicIntervalHandler() { _exchangeClient = new ExchangeClient(); _exchangeClient.InitialiseExchange(0); _tmrRequest = new System.Timers.Timer(Int32.Parse(ConfigManager.Read("InstantPeriodicInterval")) * 1000); _tmrRequest.Elapsed += new ElapsedEventHandler(ProcessRequest); _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; ObjectStateNotifier.AddObserver(this); _tmrRequest.Start(); }
public MachineManagerInterface() { _exchangeClient = new ExchangeClient(); _exchangeClient.ExchangeSectorUpdate += ExchangeClientExchangeSectorUpdate; _exchangeClient.ACK += ExchangeClientAck; _exchangeClient.UDPUpdate += ExchangeClientUDPUpdate; _exchangeClient.ServerUpdate += ExchangeClientServerUpdate; _exchangeClient.InitialiseExchange(0); //RefreshActiveServer(); _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { if (_disposed) { return; } try { Marshal.FinalReleaseComObject(_iExchangeAdmin); Marshal.FinalReleaseComObject(_exchangeClient); } catch { } _iExchangeAdmin = null; _exchangeClient = null; GC.SuppressFinalize(this); }
public AFTEnableDisable() { _exchangeClient = new ExchangeClient(); _exchangeClient.AFTAck += ExchangeClientAck; _exchangeClient.InitialiseExchange(0); if (_requestCollection == null) _requestCollection = new SortedDictionary<int, AFTEnableDisableThreadData>(); _tmrRequest = new System.Timers.Timer(Int32.Parse(ConfigManager.Read("AFTTimeInterval")) * 1000); _tmrRequest.Elapsed += new ElapsedEventHandler(ProcessRequest); _thAckResponse = new ThreadDispatcher<AFTEnableDisableThreadDataResponse>(1, "_thAckResponse_AFTEnableDisable"); _thAckResponse.AddProcessThreadData(new ProcessThreadDataHandler<AFTEnableDisableThreadDataResponse>(this.ProcessResponse)); _thAckResponse.Initialize(); _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; ObjectStateNotifier.AddObserver(this); _tmrRequest.Start(); }
public EmployeeMasterCard() { _exchangeClient = new ExchangeClient(); _exchangeClient.EMP_DATA_ACK += new _IExchangeClientEvents_EMP_DATA_ACKEventHandler(_exchangeClient_EMP_DATA_ACK); _exchangeClient.InitialiseExchange(0); if (_requestCollection == null) _requestCollection = new SortedDictionary<int, EmployeeMasterCardThreadData>(); _tmrRequest = new System.Timers.Timer(Int32.Parse(ConfigManager.Read("EmployeecardTimeInterval")) * 1000); _tmrRequest.Elapsed += new ElapsedEventHandler(ProcessRequest); _thAckResponse = new ThreadDispatcher<EmployeeMasterCardThreadDataResponse>(1, "_thAckResponse_EmployeeMasterCard"); _thAckResponse.AddProcessThreadData(new ProcessThreadDataHandler<EmployeeMasterCardThreadDataResponse>(this.ProcessResponse)); _thAckResponse.Initialize(); _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; ObjectStateNotifier.AddObserver(this); _tmrRequest.Start(); }
public AutoEnableDisable() { _exchangeClient = new ExchangeClient(); _exchangeClient.ExchangeSectorUpdate += ExchangeClientExchangeSectorUpdate; _exchangeClient.ACK += ExchangeClientAck; _exchangeClient.UDPUpdate += ExchangeClientUDPUpdate; _exchangeClient.ServerUpdate += ExchangeClientServerUpdate; _exchangeClient.InitialiseExchange(0); lock (HoldingObject) { if (MessageStore == null) MessageStore = new List<MessageStore>(); if (AFTMessages == null) AFTMessages = new List<AFTMessages>(); } _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; ObjectStateNotifier.AddObserver(this); }
public EnableDisable() { _exchangeClient = new ExchangeClient(); _exchangeClient.MACEnDisAck += ExchangeClientAck; _exchangeClient.InitialiseExchange(0); if (dEnableDisableRequest == null) dEnableDisableRequest = new SortedDictionary<int, EnableDisableThreadData>(); _tmrRequest = new System.Timers.Timer(Int32.Parse(ConfigManager.Read("MachineConfigInterval")) * 1000); _tmrRequest.Elapsed += new ElapsedEventHandler(ProcessRequest); _thAckResponse = new ThreadDispatcher<EnableDisableThreadDataResponse>(1, "_thAckResponse"); _thAckResponse.AddProcessThreadData(new ProcessThreadDataHandler<EnableDisableThreadDataResponse>(this.ProcessResponse)); _thAckResponse.Initialize(); _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; ObjectStateNotifier.AddObserver(this); _tmrRequest.Start(); }
public EmployeeMasterCard() { _exchangeClient = new ExchangeClient(); _exchangeClient.EMP_DATA_ACK += new _IExchangeClientEvents_EMP_DATA_ACKEventHandler(_exchangeClient_EMP_DATA_ACK); _exchangeClient.InitialiseExchange(0); if (_requestCollection == null) { _requestCollection = new SortedDictionary <int, EmployeeMasterCardThreadData>(); } _tmrRequest = new System.Timers.Timer(Int32.Parse(ConfigManager.Read("EmployeecardTimeInterval")) * 1000); _tmrRequest.Elapsed += new ElapsedEventHandler(ProcessRequest); _thAckResponse = new ThreadDispatcher <EmployeeMasterCardThreadDataResponse>(1, "_thAckResponse_EmployeeMasterCard"); _thAckResponse.AddProcessThreadData(new ProcessThreadDataHandler <EmployeeMasterCardThreadDataResponse>(this.ProcessResponse)); _thAckResponse.Initialize(); _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; ObjectStateNotifier.AddObserver(this); _tmrRequest.Start(); }
public RleaseGameCap() { _exchangeClient = new ExchangeClient(); _exchangeClient.MACEnDisAck += new _IExchangeClientEvents_MACEnDisAckEventHandler(_exchangeClient_MacEnable_DATA_ACK); _exchangeClient.InitialiseExchange(0); if (_requestCollection == null) { _requestCollection = new SortedDictionary <int, EnableMachineThreadData>(); } if (m_SectorData == null) { m_SectorData = new Sector203Data(); } if (oGameCappingBiz == null) { oGameCappingBiz = new GameCappingBiz(); } if (_lstGameCapDetails == null) { _lstGameCapDetails = new List <GameCapDetails>(); } _thRequest = new Thread(new ThreadStart(ProcessRequest)); _thAckResponse = new ThreadDispatcher <EnableMachineThreadDataResponse>(1, "_thAckResponse_EnableMachine"); _thAckResponse.AddProcessThreadData(new ProcessThreadDataHandler <EnableMachineThreadDataResponse>(this.ProcessResponse)); _thAckResponse.Initialize(); _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; ObjectStateNotifier.AddObserver(this); _thRequest.Start(); }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { if (_disposed) return; try { Marshal.ReleaseComObject(_exchangeClient); Marshal.ReleaseComObject(_iExchangeAdmin); } catch { } _iExchangeAdmin = null; _exchangeClient = null; GC.SuppressFinalize(this); }
public void Dispose() { if (_disposed) return; ObjectStateNotifier.RemoveObserver(this); try { var i = Marshal.ReleaseComObject(_exchangeClient); Thread.Sleep(10); while (i > 0) { LogManager.WriteLog("Number of objects in _exchangeClient = " + i, LogManager.enumLogLevel.Info); i = Marshal.ReleaseComObject(_exchangeClient); } LogManager.WriteLog("|=> _exchangeClient was released successfully.", LogManager.enumLogLevel.Info); i = Marshal.ReleaseComObject(_iExchangeAdmin); Thread.Sleep(10); while (i > 0) { LogManager.WriteLog("Number of objects in _iExchangeAdmin = " + i, LogManager.enumLogLevel.Info); i = Marshal.ReleaseComObject(_iExchangeAdmin); } LogManager.WriteLog("|=> _iExchangeAdmin was released successfully.", LogManager.enumLogLevel.Info); } catch { } _iExchangeAdmin = null; _exchangeClient = null; GC.SuppressFinalize(this); }
public RleaseGameCap() { _exchangeClient = new ExchangeClient(); _exchangeClient.MACEnDisAck += new _IExchangeClientEvents_MACEnDisAckEventHandler(_exchangeClient_MacEnable_DATA_ACK); _exchangeClient.InitialiseExchange(0); if (_requestCollection == null) _requestCollection = new SortedDictionary<int, EnableMachineThreadData>(); if (m_SectorData == null) m_SectorData = new Sector203Data(); if(oGameCappingBiz == null) oGameCappingBiz= new GameCappingBiz(); if (_lstGameCapDetails == null) _lstGameCapDetails = new List<GameCapDetails>(); _thRequest = new Thread(new ThreadStart(ProcessRequest)); _thAckResponse = new ThreadDispatcher<EnableMachineThreadDataResponse>(1, "_thAckResponse_EnableMachine"); _thAckResponse.AddProcessThreadData(new ProcessThreadDataHandler<EnableMachineThreadDataResponse>(this.ProcessResponse)); _thAckResponse.Initialize(); _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; ObjectStateNotifier.AddObserver(this); _thRequest.Start(); }
public void Dispose() { if (_disposed) return; ObjectStateNotifier.RemoveObserver(this); try { Releaseobject(_exchangeClientSiteCode, "_exchangeClientSiteCode"); Releaseobject(_exchangeClientTITOEnDis, "_exchangeClientTITOEnDis"); Releaseobject(_exchangeClientTITOEXP, "_exchangeClientTITOEXP"); Releaseobject(_iExchangeAdminSiteCode, "_iExchangeAdminSiteCode"); Releaseobject(_iExchangeAdminTITOEnDis, "_iExchangeAdminTITOEnDis"); Releaseobject(_iExchangeAdminTITOEXP, "_iExchangeAdminTITOEXP"); LogManager.WriteLog("Dispose | All Objects were released successfully.", LogManager.enumLogLevel.Info); } catch { } _exchangeClientSiteCode = null; _exchangeClientTITOEnDis = null; _exchangeClientTITOEXP = null; _iExchangeAdminSiteCode = null; _iExchangeAdminTITOEnDis = null; _iExchangeAdminTITOEXP = null; GC.SuppressFinalize(this); }
public TITO() { _exchangeClientSiteCode = new ExchangeClient(); _exchangeClientSiteCode.OPT_PARAM_ACK += ExchangeClientSiteCodeAck; _exchangeClientSiteCode.InitialiseExchange(0); _exchangeClientTITOEnDis = new ExchangeClient(); _exchangeClientTITOEnDis.TITO_ENDIS_ACK += ExchangeClientTITOAck; _exchangeClientTITOEnDis.InitialiseExchange(0); _exchangeClientTITOEXP = new ExchangeClient(); _exchangeClientTITOEXP.TITO_PARAM_ACK += ExchangeClientVoucherAck; _exchangeClientTITOEXP.InitialiseExchange(0); if (dTITORequest == null) dTITORequest = new SortedDictionary<int, TITOThreadDataRequest>(); if (dTicketExpireRequest == null) dTicketExpireRequest = new SortedDictionary<int, int>(); if (dSiteCodeRequest == null) dSiteCodeRequest = new SortedDictionary<int, int>(); _tmrRequest = new System.Timers.Timer(Int32.Parse(ConfigManager.Read("TITOConfigInterval")) * 1000); _tmrRequest.Elapsed += new ElapsedEventHandler(ProcessRequest); _thAckResponse = new ThreadDispatcher<TITOThreadDataResponse>(1, "_thTITOAckResponse"); _thAckResponse.AddProcessThreadData(new ProcessThreadDataHandler<TITOThreadDataResponse>(this.TITOProcessResponse)); _thAckResponse.Initialize(); _thTicketExpireAckResponse = new ThreadDispatcher<TITOThreadDataResponse>(1, "_thTicketExpireAckResponse"); _thTicketExpireAckResponse.AddProcessThreadData(new ProcessThreadDataHandler<TITOThreadDataResponse>(this.TicketExpireProcessResponse)); _thTicketExpireAckResponse.Initialize(); _thSiteCodeAckResponse = new ThreadDispatcher<TITOThreadDataResponse>(1, "_thSiteCodeAckResponse"); _thSiteCodeAckResponse.AddProcessThreadData(new ProcessThreadDataHandler<TITOThreadDataResponse>(this.SiteCodeProcessResponse)); _thSiteCodeAckResponse.Initialize(); _iExchangeAdminSiteCode = (IExchangeAdmin)_exchangeClientSiteCode; _iExchangeAdminTITOEnDis = (IExchangeAdmin)_exchangeClientTITOEnDis; _iExchangeAdminTITOEXP = (IExchangeAdmin)_exchangeClientTITOEXP; ObjectStateNotifier.AddObserver(this); _tmrRequest.Start(); }