protected override bool OnExecuteInternal(MonitorExecutionContext context, MonitorEntity_MsgTgt target) { MonMsg_G2H request = context.G2HMessage; Log.Info("Player Card Out Started for : " + request.CardNumber); // delete the epi message CurrentEPIMsgProcessor.DeleteEPIMessage(request.InstallationNo); // check if the card in exists in the local dictionary if (!this.CheckCardInSession(request, (r) => { CurrentEPIManager.PlayerCardOut(request.InstallationNo, request.CardNumber); })) { return(false); } if (_configStore.GamePlayInfoRequiredForSession) { // close game session for carded play Log.InfoV("Close GamePlay Session For CardedPlay {0:D}", request.InstallationNo); CurrentDataContext.CloseUserSessionForCardedGamePlay(request.InstallationNo); } // process the card in return(SDTMessages.Instance.ProcessPlayerCardOut(request, target as MonTgt_G2H_Status_PlayerCardOut)); }
protected bool CheckCardInSession(MonMsg_G2H request, Action <MonMsg_G2H> doWork) { // check if the card in exists in the local dictionary if (!CurrentEPIManager.EPIProcessExists(request.InstallationNo)) { // no card in, ok check in the database if (!CurrentDataContext.IsCardSessionExists(request.InstallationNo, request.CardNumber.ConvertToInt32())) { // still no card in, so exit now if (doWork != null) { doWork(request); } Log.Info("No card in .. Exiting"); return(false); } } return(true); }
protected override bool OnExecuteInternal(MonitorExecutionContext context, MonitorEntity_MsgTgt target) { Log.Info("Started Abandoned Card"); ForceMeterRead(context, target); MonMsg_G2H request = context.G2HMessage; CurrentEPIMsgProcessor.DeleteEPIMessage(request.InstallationNo); if (HandlerHelper.Current.IsGamePlayInfoRequiredForSession) { Log.Info("Close GamePlay Session For CardedPlay" + request.InstallationNo.ToString()); ExCommsDataContext.Current.CloseUserSessionForCardedGamePlay(request.InstallationNo); } if (!CurrentEPIManager.EPIProcessExists(request.InstallationNo)) { Log.Info("Abandoned card..."); return(false); } return(SDTMessages.Instance.ProcessPlayerCardOut(request, target as MonTgt_G2H_Status_PlayerCardOut)); }
protected override bool OnExecuteInternal(MonitorExecutionContext context, MonitorEntity_MsgTgt target) { MonMsg_G2H request = context.G2HMessage; Log.Info("Player Card In Started for : " + request.CardNumber); // remove the existing card in CurrentEPIManager.RemoveTimeoutsIfExists(request.InstallationNo); // delete the epi message CurrentEPIMsgProcessor.DeleteEPIMessage(request.InstallationNo); // process the card in bool result = SDTMessages.Instance.ProcessPlayerCardIn(request, target as MonTgt_G2H_Status_PlayerCardIn); // open session for carded play if (_configStore.GamePlayInfoRequiredForSession) { Log.InfoV("Open GamePlay Session For CardedPlay {0:D}", request.InstallationNo); CurrentDataContext.OpenUserSessionForCardedGamePlay(request.InstallationNo); } return(result); }