DiscoveryClientProtocol.Errors プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DiscoveryClientProtocol.Errors プロパティの意味・解説 

DiscoveryClientProtocol.Errors プロパティ

このクラスからメソッド呼び出したときに発生した例外コレクション取得します

名前空間: System.Web.Services.Discovery
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Public ReadOnly Property
 Errors As DiscoveryExceptionDictionary
Dim instance As DiscoveryClientProtocol
Dim value As DiscoveryExceptionDictionary

value = instance.Errors
public DiscoveryExceptionDictionary Errors { get;
 }
public:
property DiscoveryExceptionDictionary^ Errors {
    DiscoveryExceptionDictionary^ get ();
}
/** @property */
public DiscoveryExceptionDictionary get_Errors ()
public function get Errors
 () : DiscoveryExceptionDictionary

プロパティ
例外の DiscoveryExceptionDictionary。

解説解説

Errors コレクションDiscover、DiscoverAny、ResolveAll、ResolveOneLevel の各メソッド呼び出し時に発生した例外から作成されます。これらのメソッド呼び出されるDiscoveryExceptionDictionaryクリアされます

使用例使用例
Dim myDiscoFile As String
 = "http://localhost/MathService_vb.vsdisco"
Dim myUrlKey As String =
 "http://localhost/MathService_vb.asmx?wsdl"
Dim myDiscoveryClientProtocol As New
 DiscoveryClientProtocol()

' Get the discovery document.
Dim myDiscoveryDocument As DiscoveryDocument
 = myDiscoveryClientProtocol.Discover(myDiscoFile)
Dim myEnumerator As IEnumerator = myDiscoveryDocument.References.GetEnumerator()
While myEnumerator.MoveNext()
  Dim myContractReference As ContractReference
 = CType(myEnumerator.Current, ContractReference)
   
  ' Get the DiscoveryClientProtocol from the ContractReference.
   myDiscoveryClientProtocol = myContractReference.ClientProtocol
   myDiscoveryClientProtocol.ResolveAll()

   Dim myExceptionDictionary As DiscoveryExceptionDictionary
 = myDiscoveryClientProtocol.Errors

   If myExceptionDictionary.Contains(myUrlKey) Then
      Console.WriteLine("System generated exceptions.")
      
      ' Get the exception from the DiscoveryExceptionDictionary.
      Dim myException As Exception = myExceptionDictionary(myUrlKey)
      
      Console.WriteLine(" Source : " & myException.Source)
      Console.WriteLine(" Exception : " & myException.Message)
      Console.WriteLine()
   End If
End While
string myDiscoFile = "http://localhost/MathService_cs.vsdisco";
string myUrlKey = "http://localhost/MathService_cs.asmx?wsdl";
DiscoveryClientProtocol myDiscoveryClientProtocol = 
      new DiscoveryClientProtocol();

// Get the discovery document.
DiscoveryDocument myDiscoveryDocument = 
   myDiscoveryClientProtocol.Discover(myDiscoFile);
IEnumerator myEnumerator = 
      myDiscoveryDocument.References.GetEnumerator();
while ( myEnumerator.MoveNext() )
{
   ContractReference myContractReference =
      (ContractReference)myEnumerator.Current;

   // Get the DiscoveryClientProtocol from the ContractReference.
   myDiscoveryClientProtocol = myContractReference.ClientProtocol;
   myDiscoveryClientProtocol.ResolveAll();

   DiscoveryExceptionDictionary myExceptionDictionary 
      = myDiscoveryClientProtocol.Errors;

   if (myExceptionDictionary.Contains(myUrlKey))
   {
      Console.WriteLine("System generated exceptions.");

      // Get the exception from the DiscoveryExceptionDictionary.
      Exception myException = myExceptionDictionary[myUrlKey];

      Console.WriteLine(" Source : " + myException.Source);
      Console.WriteLine(" Exception : " + myException.Message);
   }
}
   String^ myDiscoFile = "http://localhost/MathService_cs.vsdisco";
   String^ myUrlKey = "http://localhost/MathService_cs.asmx?wsdl";
   DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol;
   
   // Get the discovery document.
   DiscoveryDocument^ myDiscoveryDocument = myDiscoveryClientProtocol->Discover(
 myDiscoFile );
   IEnumerator^ myEnumerator = myDiscoveryDocument->References->GetEnumerator();
   while ( myEnumerator->MoveNext() )
   {
      ContractReference^ myContractReference = dynamic_cast<ContractReference^>(myEnumerator->Current);
      
      // Get the DiscoveryClientProtocol from the ContractReference.
      myDiscoveryClientProtocol = myContractReference->ClientProtocol;
      myDiscoveryClientProtocol->ResolveAll();
      DiscoveryExceptionDictionary^ myExceptionDictionary = myDiscoveryClientProtocol->Errors;
      if ( myExceptionDictionary->Contains( myUrlKey ) )
      {
         Console::WriteLine( "System generated exceptions." );
         
         // Get the exception from the DiscoveryExceptionDictionary.
         Exception^ myException = myExceptionDictionary[ myUrlKey ];
         Console::WriteLine( " Source : {0}", myException->Source );
         Console::WriteLine( " Exception : {0}", myException->Message
 );
      }
   }
}
String myDiscoFile = "http://localhost/MathService_jsl.vsdisco";
String myUrlKey = "http://localhost/MathService_jsl.asmx?wsdl";
DiscoveryClientProtocol myDiscoveryClientProtocol = 
    new DiscoveryClientProtocol();

// Get the discovery document.
DiscoveryDocument myDiscoveryDocument = myDiscoveryClientProtocol.
    Discover(myDiscoFile);
IEnumerator myEnumerator = myDiscoveryDocument.get_References().
    GetEnumerator();

while (myEnumerator.MoveNext()) {
    ContractReference myContractReference = (ContractReference)
        myEnumerator.get_Current();

    // Get the DiscoveryClientProtocol from the ContractReference.
    myDiscoveryClientProtocol = myContractReference.
        get_ClientProtocol();
    myDiscoveryClientProtocol.ResolveAll();
    DiscoveryExceptionDictionary myExceptionDictionary = 
        myDiscoveryClientProtocol.get_Errors();

    if (myExceptionDictionary.Contains(myUrlKey)) {
        Console.WriteLine("System generated exceptions.");

        // Get the exception from the DiscoveryExceptionDictionary.
        System.Exception myException = myExceptionDictionary.
            get_Item(myUrlKey);
        Console.WriteLine(" Source : " + myException.get_Source());
        Console.WriteLine(" Exception : " + myException.get_Message());
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DiscoveryClientProtocol クラス
DiscoveryClientProtocol メンバ
System.Web.Services.Discovery 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からDiscoveryClientProtocol.Errors プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDiscoveryClientProtocol.Errors プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDiscoveryClientProtocol.Errors プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「DiscoveryClientProtocol.Errors プロパティ」の関連用語

DiscoveryClientProtocol.Errors プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DiscoveryClientProtocol.Errors プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS