Operation.Faults Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the collection of faults, or error messages, defined by the current 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
Property Value
A collection of faults, or error messages, defined by the current operation.
Examples
// 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
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.