Поделиться через


Operation.Faults Свойство

Определение

Возвращает коллекцию сбоев или сообщений об ошибке, определенных текущим объектом 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

Применяется к