Example #1
0
 static void OnMatchChanged(object sender, MatchEventArgs args)
 {
     if (sender is Script)
     {
         Console.WriteLine($"{args.CalledBy} match value is {args.Value} ");
     }
 }
Example #2
0
 private void SetISMErrorFlag(string errorMsg)
 {
     ISMError |= errorMsg.Contains("ISM");
     if (ISMError)
     {
         MatchEventArgs eArgs = new MatchEventArgs()
         {
             Value    = ISMError,
             CalledBy = "ISM Error"
         };
         MatchChanged?.Invoke(this, eArgs);
     }
 }
Example #3
0
        public void AddDashFail(string serviceCode)
        {
            if (_dashFail.IndexOf(serviceCode) == -1)
            {
                ValueChangedEventArgs args = new ValueChangedEventArgs
                {
                    OldValue = _dashFail.Count.ToString(),
                    NewValue = (_dashFail.Count + 1).ToString(),
                    CalledBy = "Dashboard fail codes"
                };
                ValueChanged?.Invoke(this, args);

                _dashFail.Add(serviceCode);
                FailCountMismatch = CompareFail();

                MatchEventArgs eArgs = new MatchEventArgs()
                {
                    Value    = FailCountMismatch,
                    CalledBy = "FailDash"
                };
                MatchChanged?.Invoke(this, eArgs);
            }
        }
Example #4
0
        public void AddDashSuccess(string serviceCode)
        {
            if (_dashSuccess.IndexOf(serviceCode) == -1)
            {
                ValueChangedEventArgs args = new ValueChangedEventArgs
                {
                    OldValue = _dashSuccess.Count.ToString(),
                    NewValue = (_dashSuccess.Count + 1).ToString(),
                    CalledBy = "Dashboard success codes"
                };
                ValueChanged?.Invoke(this, args);

                _dashSuccess.Add(serviceCode);

                SuccessCountMismatch = CompareSuccess();
                MatchEventArgs eArgs = new MatchEventArgs()
                {
                    Value    = SuccessCountMismatch,
                    CalledBy = "SuccessDash"
                };
                MatchChanged?.Invoke(this, eArgs);
            }
        }
Example #5
0
        public void AddEmailFail(string serviceCode, string errorMsg)
        {
            if (!_emailFail.ContainsKey(serviceCode))
            {
                ValueChangedEventArgs args = new ValueChangedEventArgs
                {
                    OldValue = _emailFail.Count.ToString(),
                    NewValue = (_emailFail.Count + 1).ToString(),
                    CalledBy = "Email fail codes"
                };
                ValueChanged?.Invoke(this, args);

                _emailFail[serviceCode] = errorMsg;
                FailCountMismatch       = CompareFail();
                SetISMErrorFlag(errorMsg);

                MatchEventArgs eArgs = new MatchEventArgs()
                {
                    Value    = FailCountMismatch,
                    CalledBy = "FailEmail"
                };
                MatchChanged?.Invoke(this, eArgs);
            }
        }