示例#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());
 }
示例#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));
 }
示例#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));
 }
示例#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>());
 }