MessageFault.CreateFault 方法

定义

返回新 MessageFault 对象。

重载

CreateFault(Message, Int32)

返回一个新 MessageFault 对象,该对象使用指定的 Message 和指定的消息缓冲区最大缓冲区大小。

CreateFault(FaultCode, FaultReason)

返回使用指定的 MessageFaultFaultCode 对象的新 FaultReason 对象。

CreateFault(FaultCode, String)

返回使用指定的 MessageFault 和错误原因的新 FaultCode 对象。

CreateFault(FaultCode, FaultReason, Object)

返回使用指定的 MessageFaultFaultCode 和详细信息对象的新 FaultReason 对象。

CreateFault(FaultCode, FaultReason, Object, XmlObjectSerializer)

返回一个新 MessageFault 对象,该对象使用指定的 FaultCode、、 FaultReason详细信息对象和 XmlObjectSerializer 对象。

CreateFault(FaultCode, FaultReason, Object, XmlObjectSerializer, String)

返回使用指定的 MessageFaultFaultCode、详细信息对象、FaultReason 和操作者的新 XmlObjectSerializer 对象。

CreateFault(FaultCode, FaultReason, Object, XmlObjectSerializer, String, String)

返回使用指定的 MessageFaultFaultCode、详细信息对象、FaultReason、操作者和节点值的新 XmlObjectSerializer 对象。

CreateFault(Message, Int32)

Source:
MessageFault.cs
Source:
MessageFault.cs
Source:
MessageFault.cs

返回一个新 MessageFault 对象,该对象使用指定的 Message 和指定的消息缓冲区最大缓冲区大小。

public:
 static System::ServiceModel::Channels::MessageFault ^ CreateFault(System::ServiceModel::Channels::Message ^ message, int maxBufferSize);
public static System.ServiceModel.Channels.MessageFault CreateFault (System.ServiceModel.Channels.Message message, int maxBufferSize);
static member CreateFault : System.ServiceModel.Channels.Message * int -> System.ServiceModel.Channels.MessageFault
Public Shared Function CreateFault (message As Message, maxBufferSize As Integer) As MessageFault

参数

message
Message

要用于创建 Message 对象的指定 MessageFault

maxBufferSize
Int32

消息缓冲区的指定最大缓冲区大小。

返回

具有在参数中传递的初始值的 MessageFault 对象。

适用于

CreateFault(FaultCode, FaultReason)

Source:
MessageFault.cs
Source:
MessageFault.cs
Source:
MessageFault.cs

返回使用指定的 MessageFaultFaultCode 对象的新 FaultReason 对象。

public:
 static System::ServiceModel::Channels::MessageFault ^ CreateFault(System::ServiceModel::FaultCode ^ code, System::ServiceModel::FaultReason ^ reason);
public static System.ServiceModel.Channels.MessageFault CreateFault (System.ServiceModel.FaultCode code, System.ServiceModel.FaultReason reason);
static member CreateFault : System.ServiceModel.FaultCode * System.ServiceModel.FaultReason -> System.ServiceModel.Channels.MessageFault
Public Shared Function CreateFault (code As FaultCode, reason As FaultReason) As MessageFault

参数

code
FaultCode

错误消息的错误代码。

reason
FaultReason

错误的原因。

返回

具有在参数中传递的初始值的 MessageFault 对象。

适用于

CreateFault(FaultCode, String)

Source:
MessageFault.cs
Source:
MessageFault.cs
Source:
MessageFault.cs

返回使用指定的 MessageFault 和错误原因的新 FaultCode 对象。

public:
 static System::ServiceModel::Channels::MessageFault ^ CreateFault(System::ServiceModel::FaultCode ^ code, System::String ^ reason);
public static System.ServiceModel.Channels.MessageFault CreateFault (System.ServiceModel.FaultCode code, string reason);
static member CreateFault : System.ServiceModel.FaultCode * string -> System.ServiceModel.Channels.MessageFault
Public Shared Function CreateFault (code As FaultCode, reason As String) As MessageFault

参数

code
FaultCode

错误消息的错误代码。

reason
String

错误的原因。

返回

具有在参数中传递的初始值的 MessageFault 对象。

适用于

CreateFault(FaultCode, FaultReason, Object)

Source:
MessageFault.cs
Source:
MessageFault.cs
Source:
MessageFault.cs

返回使用指定的 MessageFaultFaultCode 和详细信息对象的新 FaultReason 对象。

public:
 static System::ServiceModel::Channels::MessageFault ^ CreateFault(System::ServiceModel::FaultCode ^ code, System::ServiceModel::FaultReason ^ reason, System::Object ^ detail);
public static System.ServiceModel.Channels.MessageFault CreateFault (System.ServiceModel.FaultCode code, System.ServiceModel.FaultReason reason, object detail);
static member CreateFault : System.ServiceModel.FaultCode * System.ServiceModel.FaultReason * obj -> System.ServiceModel.Channels.MessageFault
Public Shared Function CreateFault (code As FaultCode, reason As FaultReason, detail As Object) As MessageFault

参数

code
FaultCode

错误消息的错误代码。

reason
FaultReason

错误的原因。

detail
Object

错误详细信息对象。

返回

具有在参数中传递的初始值的 MessageFault 对象。

适用于

CreateFault(FaultCode, FaultReason, Object, XmlObjectSerializer)

Source:
MessageFault.cs
Source:
MessageFault.cs
Source:
MessageFault.cs

返回一个新 MessageFault 对象,该对象使用指定的 FaultCode、、 FaultReason详细信息对象和 XmlObjectSerializer 对象。

public:
 static System::ServiceModel::Channels::MessageFault ^ CreateFault(System::ServiceModel::FaultCode ^ code, System::ServiceModel::FaultReason ^ reason, System::Object ^ detail, System::Runtime::Serialization::XmlObjectSerializer ^ serializer);
public static System.ServiceModel.Channels.MessageFault CreateFault (System.ServiceModel.FaultCode code, System.ServiceModel.FaultReason reason, object detail, System.Runtime.Serialization.XmlObjectSerializer serializer);
static member CreateFault : System.ServiceModel.FaultCode * System.ServiceModel.FaultReason * obj * System.Runtime.Serialization.XmlObjectSerializer -> System.ServiceModel.Channels.MessageFault
Public Shared Function CreateFault (code As FaultCode, reason As FaultReason, detail As Object, serializer As XmlObjectSerializer) As MessageFault

参数

code
FaultCode

错误消息的错误代码。

reason
FaultReason

错误的原因。

detail
Object

错误详细信息对象。

serializer
XmlObjectSerializer

在序列化详细信息对象时要使用的序列化程序。

返回

具有在参数中传递的初始值的 MessageFault 对象。

适用于

CreateFault(FaultCode, FaultReason, Object, XmlObjectSerializer, String)

Source:
MessageFault.cs
Source:
MessageFault.cs
Source:
MessageFault.cs

返回使用指定的 MessageFaultFaultCode、详细信息对象、FaultReason 和操作者的新 XmlObjectSerializer 对象。

public:
 static System::ServiceModel::Channels::MessageFault ^ CreateFault(System::ServiceModel::FaultCode ^ code, System::ServiceModel::FaultReason ^ reason, System::Object ^ detail, System::Runtime::Serialization::XmlObjectSerializer ^ serializer, System::String ^ actor);
public static System.ServiceModel.Channels.MessageFault CreateFault (System.ServiceModel.FaultCode code, System.ServiceModel.FaultReason reason, object detail, System.Runtime.Serialization.XmlObjectSerializer serializer, string actor);
static member CreateFault : System.ServiceModel.FaultCode * System.ServiceModel.FaultReason * obj * System.Runtime.Serialization.XmlObjectSerializer * string -> System.ServiceModel.Channels.MessageFault
Public Shared Function CreateFault (code As FaultCode, reason As FaultReason, detail As Object, serializer As XmlObjectSerializer, actor As String) As MessageFault

参数

code
FaultCode

错误消息的错误代码。

reason
FaultReason

错误的原因。

detail
Object

错误详细信息对象。

serializer
XmlObjectSerializer

在序列化详细信息对象时要使用的序列化程序。

actor
String

操作者的值。

返回

具有在参数中传递的初始值的 MessageFault 对象。

适用于

CreateFault(FaultCode, FaultReason, Object, XmlObjectSerializer, String, String)

Source:
MessageFault.cs
Source:
MessageFault.cs
Source:
MessageFault.cs

返回使用指定的 MessageFaultFaultCode、详细信息对象、FaultReason、操作者和节点值的新 XmlObjectSerializer 对象。

public:
 static System::ServiceModel::Channels::MessageFault ^ CreateFault(System::ServiceModel::FaultCode ^ code, System::ServiceModel::FaultReason ^ reason, System::Object ^ detail, System::Runtime::Serialization::XmlObjectSerializer ^ serializer, System::String ^ actor, System::String ^ node);
public static System.ServiceModel.Channels.MessageFault CreateFault (System.ServiceModel.FaultCode code, System.ServiceModel.FaultReason reason, object detail, System.Runtime.Serialization.XmlObjectSerializer serializer, string actor, string node);
static member CreateFault : System.ServiceModel.FaultCode * System.ServiceModel.FaultReason * obj * System.Runtime.Serialization.XmlObjectSerializer * string * string -> System.ServiceModel.Channels.MessageFault
Public Shared Function CreateFault (code As FaultCode, reason As FaultReason, detail As Object, serializer As XmlObjectSerializer, actor As String, node As String) As MessageFault

参数

code
FaultCode

错误消息的错误代码。

reason
FaultReason

错误的原因。

detail
Object

错误详细信息对象。

serializer
XmlObjectSerializer

在序列化详细信息对象时要使用的序列化程序。

actor
String

操作者的值。

node
String

节点的值。

返回

具有在参数中传递的初始值的 MessageFault 对象。

适用于