Bearbeiten

Freigeben über


WebFaultException<T> Constructors

Definition

Initializes a new instance of the WebFaultException<T> class.

Overloads

WebFaultException<T>(SerializationInfo, StreamingContext)

Initializes a new instance of the WebFaultException<T> class with the specified SerializationInfo and StreamingContext.

WebFaultException<T>(T, HttpStatusCode)

Initializes a new instance of the WebFaultException<T> class with the specified exception detail and the WebFaultException(HttpStatusCode) to return to the caller.

WebFaultException<T>(T, HttpStatusCode, IEnumerable<Type>)

Initializes a new instance of the WebFaultException<T> class with the specified exception detail and the StatusCode to return to the caller.

WebFaultException<T>(SerializationInfo, StreamingContext)

Initializes a new instance of the WebFaultException<T> class with the specified SerializationInfo and StreamingContext.

protected:
 WebFaultException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected WebFaultException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.ServiceModel.Web.WebFaultException<'T> : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.ServiceModel.Web.WebFaultException<'T>
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The serialization info.

context
StreamingContext

The streaming context.

Applies to

WebFaultException<T>(T, HttpStatusCode)

Initializes a new instance of the WebFaultException<T> class with the specified exception detail and the WebFaultException(HttpStatusCode) to return to the caller.

public:
 WebFaultException(T detail, System::Net::HttpStatusCode statusCode);
public WebFaultException (T detail, System.Net.HttpStatusCode statusCode);
new System.ServiceModel.Web.WebFaultException<'T> : 'T * System.Net.HttpStatusCode -> System.ServiceModel.Web.WebFaultException<'T>
Public Sub New (detail As T, statusCode As HttpStatusCode)

Parameters

detail
T

The fault.

statusCode
HttpStatusCode

The HTTP status code to set on the response message.

Applies to

WebFaultException<T>(T, HttpStatusCode, IEnumerable<Type>)

Initializes a new instance of the WebFaultException<T> class with the specified exception detail and the StatusCode to return to the caller.

public:
 WebFaultException(T detail, System::Net::HttpStatusCode statusCode, System::Collections::Generic::IEnumerable<Type ^> ^ knownTypes);
public WebFaultException (T detail, System.Net.HttpStatusCode statusCode, System.Collections.Generic.IEnumerable<Type> knownTypes);
new System.ServiceModel.Web.WebFaultException<'T> : 'T * System.Net.HttpStatusCode * seq<Type> -> System.ServiceModel.Web.WebFaultException<'T>
Public Sub New (detail As T, statusCode As HttpStatusCode, knownTypes As IEnumerable(Of Type))

Parameters

detail
T

The fault.

statusCode
HttpStatusCode

The HTTP status code to set on the response message.

knownTypes
IEnumerable<Type>

The set of known types that are used for serialization and deserialization.

Applies to