DotNetWorkQueue.Transport.Redis.Basic.RedisErrorTracking.GetExceptionCount C# (CSharp) Метод

GetExceptionCount() публичный Метод

Gets the exception count.
public GetExceptionCount ( string exceptionType ) : int
exceptionType string Type of the exception.
Результат int
        public int GetExceptionCount(string exceptionType)
        {
            return !Errors.ContainsKey(exceptionType) ? 0 : Errors[exceptionType];
        }

Usage Example

 public void Exception_Count_Increment()
 {
     var test = new RedisErrorTracking();
     test.IncrementExceptionCount("test");
     var value = test.GetExceptionCount("test");
     Assert.Equal(1, value);
     value = test.GetExceptionCount("test_no_value");
     Assert.Equal(0, value);
     test.IncrementExceptionCount("test");
     value = test.GetExceptionCount("test");
     Assert.Equal(2, value);
 }
All Usage Examples Of DotNetWorkQueue.Transport.Redis.Basic.RedisErrorTracking::GetExceptionCount