Comparteix a través de


Operation.Faults Propiedad

Definición

Obtiene la colección de errores o mensajes de error definidos por el objeto Operation actual.

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

Valor de propiedad

OperationFaultCollection

Colección de errores o mensajes de error definidos por la operación actual.

Ejemplos

// 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

Se aplica a