ServiceDescriptionCollection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
ServiceDescription 클래스 인스턴스의 컬렉션을 나타냅니다. 이 클래스는 상속될 수 없습니다.
public ref class ServiceDescriptionCollection sealed : System::Web::Services::Description::ServiceDescriptionBaseCollection
public sealed class ServiceDescriptionCollection : System.Web.Services.Description.ServiceDescriptionBaseCollection
type ServiceDescriptionCollection = class
inherit ServiceDescriptionBaseCollection
Public NotInheritable Class ServiceDescriptionCollection
Inherits ServiceDescriptionBaseCollection
- 상속
예제
#using <System.Web.Services.dll>
#using <System.Xml.dll>
using namespace System;
using namespace System::Xml;
using namespace System::Web::Services::Description;
int main()
{
try
{
// Get ServiceDescription objects.
ServiceDescription^ myServiceDescription1 = ServiceDescription::Read( "DataTypes_cpp.wsdl" );
ServiceDescription^ myServiceDescription2 = ServiceDescription::Read( "MathService_cpp.wsdl" );
// Set the names of the ServiceDescriptions.
myServiceDescription1->Name = "DataTypes";
myServiceDescription2->Name = "MathService";
// Create a ServiceDescriptionCollection.
ServiceDescriptionCollection^ myServiceDescriptionCollection = gcnew ServiceDescriptionCollection;
// Add the ServiceDescriptions to the collection.
myServiceDescriptionCollection->Add( myServiceDescription1 );
myServiceDescriptionCollection->Add( myServiceDescription2 );
// Display the elements of the collection using the Item property.
Console::WriteLine( "Elements in the collection: " );
for ( int i = 0; i < myServiceDescriptionCollection->Count; i++ )
Console::WriteLine( myServiceDescriptionCollection[ i ]->Name );
// Construct an XML qualified name.
XmlQualifiedName^ myXmlQualifiedName = gcnew XmlQualifiedName( "MathServiceSoap","http://tempuri2.org/" );
// Get the Binding from the collection.
Binding^ myBinding = myServiceDescriptionCollection->GetBinding( myXmlQualifiedName );
Console::WriteLine( "Binding found in collection with name: {0}", myBinding->ServiceDescription->Name );
}
catch ( Exception^ e )
{
Console::WriteLine( "The following exception was raised: {0}", e->Message );
}
}
using System;
using System.Xml;
using System.Web.Services.Description;
class MyServiceDescriptionCollection
{
public static void Main()
{
try
{
// Get ServiceDescription objects.
ServiceDescription myServiceDescription1 =
ServiceDescription.Read("DataTypes_CS.wsdl");
ServiceDescription myServiceDescription2 =
ServiceDescription.Read("MathService_CS.wsdl");
// Set the names of the ServiceDescriptions.
myServiceDescription1.Name = "DataTypes";
myServiceDescription2.Name = "MathService";
// Create a ServiceDescriptionCollection.
ServiceDescriptionCollection myServiceDescriptionCollection =
new ServiceDescriptionCollection();
// Add the ServiceDescriptions to the collection.
myServiceDescriptionCollection.Add(myServiceDescription1);
myServiceDescriptionCollection.Add(myServiceDescription2);
// Display the elements of the collection using the indexer.
Console.WriteLine("Elements in the collection: ");
for(int i = 0; i < myServiceDescriptionCollection.Count; i++)
{
Console.WriteLine(myServiceDescriptionCollection[i].Name);
}
// Construct an XML qualified name.
XmlQualifiedName myXmlQualifiedName =
new XmlQualifiedName("MathServiceSoap", "http://tempuri2.org/");
// Get the Binding from the collection.
Binding myBinding =
myServiceDescriptionCollection.GetBinding(myXmlQualifiedName);
Console.WriteLine("Binding found in collection with name: " +
myBinding.ServiceDescription.Name);
}
catch(Exception e)
{
Console.WriteLine("The following exception was raised: {0}", e.Message);
}
}
}
Imports System.Xml
Imports System.Web.Services.Description
Class MyServiceDescriptionCollection
Public Shared Sub Main()
Try
' Get ServiceDescription objects.
Dim myServiceDescription1 As ServiceDescription = _
ServiceDescription.Read("DataTypes_VB.wsdl")
Dim myServiceDescription2 As ServiceDescription = _
ServiceDescription.Read("MathService_VB.wsdl")
' Set the names of the ServiceDescriptions.
myServiceDescription1.Name = "DataTypes"
myServiceDescription2.Name = "MathService"
' Create a ServiceDescriptionCollection.
Dim myServiceDescriptionCollection As _
New ServiceDescriptionCollection()
' Add the ServiceDescriptions to the collection.
myServiceDescriptionCollection.Add(myServiceDescription1)
myServiceDescriptionCollection.Add(myServiceDescription2)
' Display the elements of the collection using the Item property.
Console.WriteLine("Elements in the collection: ")
Dim i As Integer
For i = 0 To myServiceDescriptionCollection.Count - 1
Console.WriteLine(myServiceDescriptionCollection(i).Name)
Next i
' Construct an XML qualified name.
Dim myXmlQualifiedName As New XmlQualifiedName( _
"MathServiceSoap", "http://tempuri2.org/")
' Get the Binding from the collection.
Dim myBinding As Binding = _
myServiceDescriptionCollection.GetBinding(myXmlQualifiedName)
Console.WriteLine("Binding found in collection with name: " & _
myBinding.ServiceDescription.Name)
Catch e As Exception
Console.WriteLine("The following exception was raised: {0}", _
e.Message.ToString())
End Try
End Sub
End Class
생성자
ServiceDescriptionCollection() |
ServiceDescriptionCollection 클래스의 새 인스턴스를 초기화합니다. |
속성
Capacity |
CollectionBase에 포함될 수 있는 요소의 수를 가져오거나 설정합니다. (다음에서 상속됨 CollectionBase) |
Count |
CollectionBase 인스턴스에 포함된 요소 수를 가져옵니다. 이 속성은 재정의할 수 없습니다. (다음에서 상속됨 CollectionBase) |
InnerList |
ArrayList 인스턴스의 요소 목록을 포함하는 CollectionBase를 가져옵니다. (다음에서 상속됨 CollectionBase) |
Item[Int32] |
지정된 인덱스(0부터 시작)에서 ServiceDescription의 값을 가져오거나 설정합니다. |
Item[String] |
해당 ServiceDescription 속성에서 지정한 TargetNamespace을 가져옵니다. |
List |
IList 인스턴스의 요소 목록을 포함하는 CollectionBase를 가져옵니다. (다음에서 상속됨 CollectionBase) |
Table |
ServiceDescriptionBaseCollection에서 키와 값의 연결을 구현하는 인터페이스를 가져옵니다. (다음에서 상속됨 ServiceDescriptionBaseCollection) |
메서드
명시적 인터페이스 구현
확장 메서드
Cast<TResult>(IEnumerable) |
IEnumerable의 요소를 지정된 형식으로 캐스팅합니다. |
OfType<TResult>(IEnumerable) |
지정된 형식에 따라 IEnumerable의 요소를 필터링합니다. |
AsParallel(IEnumerable) |
쿼리를 병렬화할 수 있도록 합니다. |
AsQueryable(IEnumerable) |
IEnumerable을 IQueryable로 변환합니다. |
적용 대상
.NET