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로 변환합니다. |
적용 대상
추가 정보
.NET