Operation.Faults プロパティ

現在の Operation で定義されている違反またはエラー メッセージのコレクションを取得します。

Public ReadOnly Property Faults As OperationFaultCollection
[C#]
public OperationFaultCollection Faults {get;}
[C++]
public: __property OperationFaultCollection* get_Faults();
[JScript]
public function get Faults() : OperationFaultCollection;

プロパティ値

OperationFaultCollection

使用例

 
' 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

[C#] 
// 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"]);

[C++] 
// Read the 'Operation_Faults_Input_cpp.wsdl' file as input.
ServiceDescription* myServiceDescription =
   ServiceDescription::Read(S"Operation_Faults_Input_cpp.wsdl");

// Get the operation fault collection.
PortTypeCollection* myPortTypeCollection = myServiceDescription->PortTypes;
PortType* myPortType = myPortTypeCollection->Item[0];
OperationCollection* myOperationCollection = myPortType->Operations;

// Remove the operation fault with the name 'ErrorString'.
Operation* myOperation = myOperationCollection->Item[0];
OperationFaultCollection* myOperationFaultCollection = myOperation->Faults;
if (myOperationFaultCollection->Contains(myOperationFaultCollection->Item[S"ErrorString"]))
   myOperationFaultCollection->Remove(myOperationFaultCollection->Item[S"ErrorString"]);

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

Operation クラス | Operation メンバ | System.Web.Services.Description 名前空間