protected ScriptBase(ScriptInfo pScript, ISession pSession, CallStatistics pCallStatistics) { Script = pScript; session = pSession; callStatistics = pCallStatistics; account = new Account(); promptManager = new PromptManager(Script); callState = CallState.Initializing; cdr = new CallRecord(session); outboundAttempt = 1; }
public SessionScriptBase(RbrResult pInitResult, ISession pSession, ScriptInfo pScriptInfo) { session = pSession; scriptInfo = pScriptInfo; promptManager = new PromptManager(scriptInfo); leg1Length = 0; cardLength = scriptInfo.PinLength; neverUsed = false; startingBalance = currentBalance = decimal.Zero; currentBonusBalance = 0; serialNumber = string.Empty; callState = CallState.Initializing; }
protected override void ExecuteScript() { //REFACTOR: needs new implementation! T.LogRbr(LogSeverity.Error, "NumberRoutingCallScript.ExecuteScript", "Not Activated!, reject"); throw new Exception("Number Routing Not Activeted!"); if (callCount > 2) { T.LogRbr(LogSeverity.Debug, "NumberRoutingCallScript.ExecuteScript", "More then 2 calls active!, reject"); return; } Interlocked.Increment(ref callCount); try { #region TODO: /* * if ((DateTime.Now.Minutes % 5 == 0) { * reloadMapingTable(); * } */ #endregion string[] _mappingFields = getMappingFields(); if (_mappingFields != null) { T.LogRbr(LogSeverity.Debug, "NumberRoutingCallScript.ExecuteScript", "Main menu choice"); if (GetUserChoice(PromptManager.MainMenuChoicePrompt(pressOneMenuChoice), pressOneMenuChoice, 1) == 1) { T.LogRbr(LogSeverity.Debug, "NumberRoutingCallScript.ExecuteScript", "Making Call out"); MakeCall(); } T.LogRbr(LogSeverity.Debug, "NumberRoutingCallScript.ExecuteScript", "Call ended"); } else { T.LogRbr(LogSeverity.Error, "NumberRoutingCallScript.ExecuteScript", "RoutingTable is EMPTY"); } } finally { Interlocked.Decrement(ref callCount); } }