コード例 #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 <c>System.ServiceModel.EndpointNotFoundException</c>
 /// </summary>
 public static bool IncludesNotFoundException(this WrappedServerErrorException exception)
 {
     return(string.Equals(exception?.Error?.ExceptionType, "System.EndpointNotFoundException", StringComparison.Ordinal));
 }