DiscoveryClientResultCollection クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
DiscoveryClientResult オブジェクトのコレクションを含んでいます。 このクラスは継承できません。
public ref class DiscoveryClientResultCollection sealed : System::Collections::CollectionBase
public sealed class DiscoveryClientResultCollection : System.Collections.CollectionBase
type DiscoveryClientResultCollection = class
inherit CollectionBase
Public NotInheritable Class DiscoveryClientResultCollection
Inherits CollectionBase
- 継承
例
#using <System.Xml.dll>
#using <System.Web.Services.dll>
#using <System.dll>
using namespace System;
using namespace System::Reflection;
using namespace System::IO;
using namespace System::Web::Services::Discovery;
using namespace System::Xml::Schema;
using namespace System::Collections;
int main()
{
try
{
DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol;
// Get the collection of DiscoveryClientResult objects.
DiscoveryClientResultCollection^ myDiscoveryClientResultCollection =
myDiscoveryClientProtocol->ReadAll( "results.discomap" );
Console::WriteLine( "Removing a DiscoveryClientResult from the collection..." );
// Remove the first DiscoveryClientResult from the collection.
myDiscoveryClientResultCollection->Remove( myDiscoveryClientResultCollection[ 0 ] );
Console::WriteLine( "Adding a DiscoveryClientResult to the collection..." );
DiscoveryClientResult^ myDiscoveryClientResult = gcnew DiscoveryClientResult;
// Set the DiscoveryDocumentReference class as the type of
// reference in the discovery document.
myDiscoveryClientResult->ReferenceTypeName =
"System.Web.Services.Discovery.DiscoveryDocumentReference";
// Set the URL for the reference.
myDiscoveryClientResult->Url = "http://localhost/Discovery/Service1_cs.asmx?disco";
// Set the name of the file in which the reference is saved.
myDiscoveryClientResult->Filename = "Service1_cs.disco";
// Add myDiscoveryClientResult to the collection.
myDiscoveryClientResultCollection->Add( myDiscoveryClientResult );
if ( myDiscoveryClientResultCollection->Contains( myDiscoveryClientResult ) )
{
Console::WriteLine( "Instance of DiscoveryClientResult found in the Collection" );
}
}
catch ( Exception^ ex )
{
Console::WriteLine( "Error is {0}", ex->Message );
}
}
using System;
using System.Reflection;
using System.IO;
using System.Web.Services.Discovery;
using System.Xml.Schema;
using System.Collections;
public class MyDiscoveryClientResult
{
static void Main()
{
try
{
DiscoveryClientProtocol myDiscoveryClientProtocol =
new DiscoveryClientProtocol();
// Get the collection of DiscoveryClientResult objects.
DiscoveryClientResultCollection myDiscoveryClientResultCollection =
myDiscoveryClientProtocol.ReadAll("results.discomap");
Console.WriteLine(
"Removing a DiscoveryClientResult from the collection...");
// Remove the first DiscoveryClientResult from the collection.
myDiscoveryClientResultCollection.Remove(
myDiscoveryClientResultCollection[0]);
Console.WriteLine("Adding a DiscoveryClientResult" +
" to the collection...");
DiscoveryClientResult myDiscoveryClientResult =
new DiscoveryClientResult();
// Set the DiscoveryDocumentReference class as the type of
// reference in the discovery document.
myDiscoveryClientResult.ReferenceTypeName =
"System.Web.Services.Discovery.DiscoveryDocumentReference";
// Set the URL for the reference.
myDiscoveryClientResult.Url =
"http://localhost/Discovery/Service1_cs.asmx?disco";
// Set the name of the file in which the reference is saved.
myDiscoveryClientResult.Filename = "Service1_cs.disco";
// Add myDiscoveryClientResult to the collection.
myDiscoveryClientResultCollection.Add(myDiscoveryClientResult);
if(myDiscoveryClientResultCollection.Contains(myDiscoveryClientResult))
{
Console.WriteLine(
"Instance of DiscoveryClientResult found in the Collection");
}
}
catch(Exception ex)
{
Console.WriteLine("Error is "+ex.Message);
}
}
}
Imports System.Reflection
Imports System.IO
Imports System.Web.Services.Discovery
Imports System.Xml.Schema
Imports System.Collections
Public Class MyDiscoveryClientResult
Shared Sub Main()
Try
Dim myDiscoveryClientProtocol As New DiscoveryClientProtocol()
' Get the collection of DiscoveryClientResult objects.
Dim myDiscoveryClientResultCollection As _
DiscoveryClientResultCollection = _
myDiscoveryClientProtocol.ReadAll("results.discomap")
Console.WriteLine( _
"Removing a DiscoveryClientResult from the collection...")
' Remove the first DiscoveryClientResult from the collection.
myDiscoveryClientResultCollection.Remove( _
myDiscoveryClientResultCollection(0))
Console.WriteLine("Adding a DiscoveryClientResult" & _
" to the collection...")
Dim myDiscoveryClientResult As New DiscoveryClientResult()
' Set the DiscoveryDocumentReference class as the type of
' reference in the discovery document.
myDiscoveryClientResult.ReferenceTypeName = _
"System.Web.Services.Discovery.DiscoveryDocumentReference"
' Set the URL for the reference.
myDiscoveryClientResult.Url = _
"http://localhost/Discovery/Service1_vb.asmx?disco"
' Set the name of the file in which the reference is saved.
myDiscoveryClientResult.Filename = "Service1_vb.disco"
' Add myDiscoveryClientResult to the collection.
myDiscoveryClientResultCollection.Add(myDiscoveryClientResult)
If myDiscoveryClientResultCollection.Contains( _
myDiscoveryClientResult) Then
Console.WriteLine( _
"Instance of DiscoveryClientResult found in the Collection")
End If
Catch ex As Exception
Console.WriteLine("Error is " + ex.Message)
End Try
End Sub
End Class
コンストラクター
DiscoveryClientResultCollection() |
DiscoveryClientResultCollection クラスの新しいインスタンスを初期化します。 |
プロパティ
Capacity |
CollectionBase に格納できる要素の数を取得または設定します。 (継承元 CollectionBase) |
Count |
CollectionBase インスタンスに含まれる要素の数を取得します。 このプロパティはオーバーライドできません。 (継承元 CollectionBase) |
InnerList |
ArrayList インスタンス内の要素のリストを格納する CollectionBase を取得します。 (継承元 CollectionBase) |
Item[Int32] |
DiscoveryClientResult の |
List |
IList インスタンス内の要素のリストを格納する CollectionBase を取得します。 (継承元 CollectionBase) |
メソッド
明示的なインターフェイスの実装
拡張メソッド
Cast<TResult>(IEnumerable) |
IEnumerable の要素を、指定した型にキャストします。 |
OfType<TResult>(IEnumerable) |
指定された型に基づいて IEnumerable の要素をフィルター処理します。 |
AsParallel(IEnumerable) |
クエリの並列化を有効にします。 |
AsQueryable(IEnumerable) |
IEnumerable を IQueryable に変換します。 |