Operation.Faults 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取由当前 Operation 定义的错误或错误信息的集合。
public:
property System::Web::Services::Description::OperationFaultCollection ^ Faults { System::Web::Services::Description::OperationFaultCollection ^ get(); };
public System.Web.Services.Description.OperationFaultCollection Faults { get; }
member this.Faults : System.Web.Services.Description.OperationFaultCollection
Public ReadOnly Property Faults As OperationFaultCollection
属性值
当前操作定义的错误或错误信息的集合。
示例
// Read the 'Operation_Faults_Input_cpp.wsdl' file as input.
ServiceDescription^ myServiceDescription = ServiceDescription::Read( "Operation_Faults_Input_cpp.wsdl" );
// Get the operation fault collection.
PortTypeCollection^ myPortTypeCollection = myServiceDescription->PortTypes;
PortType^ myPortType = myPortTypeCollection[ 0 ];
OperationCollection^ myOperationCollection = myPortType->Operations;
// Remove the operation fault with the name 'ErrorString'.
Operation^ myOperation = myOperationCollection[ 0 ];
OperationFaultCollection^ myOperationFaultCollection = myOperation->Faults;
if ( myOperationFaultCollection->Contains( myOperationFaultCollection[ "ErrorString" ] ) )
myOperationFaultCollection->Remove( myOperationFaultCollection[ "ErrorString" ] );
// Read the 'Operation_Faults_Input_CS.wsdl' file as input.
ServiceDescription myServiceDescription =
ServiceDescription.Read("Operation_Faults_Input_CS.wsdl");
// Get the operation fault collection.
PortTypeCollection myPortTypeCollection = myServiceDescription.PortTypes;
PortType myPortType = myPortTypeCollection[0];
OperationCollection myOperationCollection = myPortType.Operations;
// Remove the operation fault with the name 'ErrorString'.
Operation myOperation = myOperationCollection[0];
OperationFaultCollection myOperationFaultCollection = myOperation.Faults;
if(myOperationFaultCollection.Contains(myOperationFaultCollection["ErrorString"]))
myOperationFaultCollection.Remove(myOperationFaultCollection["ErrorString"]);
' Read the 'Operation_Faults_Input_VB.wsdl' file as input.
Dim myServiceDescription As ServiceDescription = _
ServiceDescription.Read("Operation_Faults_Input_VB.wsdl")
' Get the operation fault collection.
Dim myPortTypeCollection As PortTypeCollection = myServiceDescription.PortTypes
Dim myPortType As PortType = myPortTypeCollection(0)
Dim myOperationCollection As OperationCollection = myPortType.Operations
' Remove the operation fault with the name 'ErrorString'.
Dim myOperation As Operation = myOperationCollection(0)
Dim myOperationFaultCollection As OperationFaultCollection = myOperation.Faults
If myOperationFaultCollection.Contains(myOperationFaultCollection("ErrorString")) Then
myOperationFaultCollection.Remove(myOperationFaultCollection("ErrorString"))
End If