WebFaultException<T> 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 WebFaultException<T> 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| WebFaultException<T>(SerializationInfo, StreamingContext) |
使用指定的WebFaultException<T>和 SerializationInfo. 初始化类的新实例StreamingContext。 |
| WebFaultException<T>(T, HttpStatusCode) |
使用指定的异常详细信息和WebFaultException<T>返回到调用方初始化类的新实例WebFaultException(HttpStatusCode)。 |
| WebFaultException<T>(T, HttpStatusCode, IEnumerable<Type>) |
使用指定的异常详细信息和WebFaultException<T>返回到调用方初始化类的新实例StatusCode。 |
WebFaultException<T>(SerializationInfo, StreamingContext)
使用指定的WebFaultException<T>和 SerializationInfo. 初始化类的新实例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)
参数
- info
- SerializationInfo
序列化信息。
- context
- StreamingContext
流式处理上下文。
适用于
WebFaultException<T>(T, HttpStatusCode)
使用指定的异常详细信息和WebFaultException<T>返回到调用方初始化类的新实例WebFaultException(HttpStatusCode)。
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)
参数
- detail
- T
错误。
- statusCode
- HttpStatusCode
在响应消息上设置的 HTTP 状态代码。
适用于
WebFaultException<T>(T, HttpStatusCode, IEnumerable<Type>)
使用指定的异常详细信息和WebFaultException<T>返回到调用方初始化类的新实例StatusCode。
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))
参数
- detail
- T
错误。
- statusCode
- HttpStatusCode
在响应消息上设置的 HTTP 状态代码。
- knownTypes
- IEnumerable<Type>
用于序列化和反序列化的已知类型集。