 | ExtensionMethodsIsHttpException Method |
Determines if exception represents an HTTP error condition
Namespace: SanteDB.Core.HttpAssembly: SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.2081-alpha+b4ae72647f2cc271f89142f76fff26ad69e00f5a
Syntaxpublic static bool IsHttpException(
this Exception exception,
out HttpStatusCode statusCode
)
<ExtensionAttribute>
Public Shared Function IsHttpException (
exception As Exception,
<OutAttribute> ByRef statusCode As HttpStatusCode
) As Boolean
public:
[ExtensionAttribute]
static bool IsHttpException(
Exception^ exception,
[OutAttribute] HttpStatusCode% statusCode
)
[<ExtensionAttribute>]
static member IsHttpException :
exception : Exception *
statusCode : HttpStatusCode byref -> bool Parameters
- exception Exception
- The exception which is to be checked
- statusCode HttpStatusCode
- The status code if the exception is a WebException
Return Value
BooleanTrue if
exception is an
WebExceptionUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Exception. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also