Exemple #1
0
 /// <summary>
 /// Indicates if <paramref name="exception"/> does not include an exception from <see cref="ServerBasedExceptions"/>
 /// and so is client based.
 /// </summary>
 public static bool IsClientBasedFault(this WrappedServerErrorException exception)
 {
     return(!exception.IsServerBasedFault());
 }
Exemple #2
0
 /// <summary>
 /// Indicates if <paramref name="exception"/> includes an exception of type <typeparam name="T" />
 /// </summary>
 public static bool IncludesExceptionOfType <T>(this WrappedServerErrorException exception)
 {
     return(string.Equals(exception?.Error?.ExceptionType, typeof(T).ToString(), StringComparison.Ordinal));
 }
Exemple #3
0
 /// <summary>
 /// Indicates if <paramref name="exception"/> includes an exception from <see cref="ServerBasedExceptions"/>
 /// and so is server based.
 /// </summary>
 public static bool IsServerBasedFault(this WrappedServerErrorException exception)
 {
     return(exception?.Error?.ExceptionType != null && InternalServerBasedExceptions.ContainsValue(exception.Error.ExceptionType));
 }
Exemple #4
0
 /// <summary>
 /// Indicates if <paramref name="exception"/> includes an <see cref="EndpointNotFoundException"/>
 /// </summary>
 public static bool IncludesNotFoundException(this WrappedServerErrorException exception)
 {
     return(exception.IncludesExceptionOfType <EndpointNotFoundException>());
 }