SoapHeaderCollection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
SoapHeader 클래스의 인스턴스에 대한 컬렉션을 포함합니다.
public ref class SoapHeaderCollection : System::Collections::CollectionBase
public class SoapHeaderCollection : System.Collections.CollectionBase
type SoapHeaderCollection = class
inherit CollectionBase
Public Class SoapHeaderCollection
Inherits CollectionBase
- 상속
예제
[System::Web::Services::WebServiceBindingAttribute(Name="MathSvcSoap",
Namespace="http://tempuri.org/")]
public ref class MathSvc: public System::Web::Services::Protocols::SoapHttpClientProtocol
{
public:
array<SoapHeader^>^ mySoapHeaders;
[SoapHeaderAttribute("mySoapHeaders",
Direction=SoapHeaderDirection::In)]
[System::Web::Services::Protocols::SoapDocumentMethodAttribute(
"http://tempuri.org/Add",
Use=System::Web::Services::Description::SoapBindingUse::Literal,
ParameterStyle=System::Web::Services::Protocols::SoapParameterStyle::Wrapped)]
[MySoapExtensionAttribute]
Single Add( Single xValue, Single yValue )
{
SoapHeaderCollection^ mySoapHeaderCollection = gcnew SoapHeaderCollection;
MySoapHeader^ mySoapHeader;
mySoapHeader = gcnew MySoapHeader;
mySoapHeader->text = "This is the first SOAP header";
mySoapHeaderCollection->Add( mySoapHeader );
mySoapHeader = gcnew MySoapHeader;
mySoapHeader->text = "This is the second SOAP header";
mySoapHeaderCollection->Add( mySoapHeader );
mySoapHeader = gcnew MySoapHeader;
mySoapHeader->text = "This header is inserted before the first header";
mySoapHeaderCollection->Insert( 0, mySoapHeader );
mySoapHeaders = gcnew array<MySoapHeader^>(mySoapHeaderCollection->Count);
mySoapHeaderCollection->CopyTo( mySoapHeaders, 0 );
array<Object^>^ temp0 = {xValue,yValue};
array<Object^>^ results = this->Invoke( "Add", temp0 );
return ( (Single)( results[ 0 ] ) );
}
[System::Diagnostics::DebuggerStepThroughAttribute]
MathSvc()
{
this->Url = "http://localhost/MathSvc_SoapHeaderCollection.cs.asmx";
}
System::IAsyncResult^ BeginAdd( Single xValue,
Single yValue, System::AsyncCallback^ callback, Object^ asyncState )
{
array<Object^>^ temp1 = {xValue,yValue};
return this->BeginInvoke( "Add", temp1, callback, asyncState );
}
Single EndAdd( System::IAsyncResult^ asyncResult )
{
array<Object^>^ results = this->EndInvoke( asyncResult );
return ( (Single)( results[ 0 ] ) );
}
};
[System.Web.Services.WebServiceBindingAttribute(Name="MathSvcSoap",
Namespace="http://tempuri.org/")]
public class MathSvc : System.Web.Services.Protocols.SoapHttpClientProtocol
{
public SoapHeader[] mySoapHeaders;
[SoapHeaderAttribute("mySoapHeaders",
Direction=SoapHeaderDirection.In)]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute(
"http://tempuri.org/Add",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[MySoapExtensionAttribute()]
public System.Single Add(System.Single xValue, System.Single yValue)
{
SoapHeaderCollection mySoapHeaderCollection = new SoapHeaderCollection();
MySoapHeader mySoapHeader;
mySoapHeader = new MySoapHeader();
mySoapHeader.text = "This is the first SOAP header";
mySoapHeaderCollection.Add(mySoapHeader);
mySoapHeader = new MySoapHeader();
mySoapHeader.text = "This is the second SOAP header";
mySoapHeaderCollection.Add(mySoapHeader);
mySoapHeader = new MySoapHeader();
mySoapHeader.text = "This header is inserted before the first header";
mySoapHeaderCollection.Insert(0, mySoapHeader);
mySoapHeaders = new MySoapHeader[mySoapHeaderCollection.Count];
mySoapHeaderCollection.CopyTo(mySoapHeaders, 0);
object[] results = this.Invoke("Add",
new object[] {xValue, yValue});
return ((System.Single)(results[0]));
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
public MathSvc()
{
this.Url = "http://localhost/MathSvc_SoapHeaderCollection.cs.asmx";
}
public System.IAsyncResult BeginAdd(System.Single xValue,
System.Single yValue, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("Add", new object[] {xValue, yValue},
callback, asyncState);
}
public System.Single EndAdd(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((System.Single)(results[0]));
}
}
<System.Web.Services.WebServiceBindingAttribute(Name := "MathSvcSoap", _
Namespace := "http://tempuri.org/")> _
Public Class MathSvc
Inherits System.Web.Services.Protocols.SoapHttpClientProtocol
Public mySoapHeaders() As SoapHeader
<SoapHeaderAttribute("mySoapHeaders", _
Direction := SoapHeaderDirection.In), _
System.Web.Services.Protocols.SoapDocumentMethodAttribute( _
"http://tempuri.org/Add", _
Use := System.Web.Services.Description.SoapBindingUse.Literal, _
ParameterStyle := System.Web.Services.Protocols.SoapParameterStyle.Wrapped), _
MySoapExtensionAttribute()> _
Public Function Add(xValue As System.Single, yValue As System.Single) _
As System.Single
Dim mySoapHeaderCollection As New SoapHeaderCollection()
Dim mySoapHeader As MySoapHeader
mySoapHeader = New MySoapHeader()
mySoapHeader.text = "This is the first SOAP header"
mySoapHeaderCollection.Add(mySoapHeader)
mySoapHeader = New MySoapHeader()
mySoapHeader.text = "This is the second SOAP header"
mySoapHeaderCollection.Add(mySoapHeader)
mySoapHeader = New MySoapHeader()
mySoapHeader.text = "This header is inserted before the first header"
mySoapHeaderCollection.Insert(0, mySoapHeader)
mySoapHeaders = New MySoapHeader(mySoapHeaderCollection.Count-1) {}
mySoapHeaderCollection.CopyTo(mySoapHeaders, 0)
Dim results() As Object = _
Me.Invoke("Add", New Object() {xValue, yValue})
Return CType(results(0), System.Single)
End Function 'Add
<System.Diagnostics.DebuggerStepThroughAttribute()> _
Public Sub New()
Me.Url = "http://localhost/MathSvc_SoapHeaderCollection.vb.asmx"
End Sub
Public Function BeginAdd(xValue As System.Single, yValue As System.Single, _
callback As System.AsyncCallback, asyncState As Object) _
As System.IAsyncResult
Return Me.BeginInvoke("Add", New Object() {xValue, yValue}, _
callback, asyncState)
End Function 'BeginAdd
Public Function EndAdd(asyncResult As System.IAsyncResult) As System.Single
Dim results As Object() = Me.EndInvoke(asyncResult)
Return CType(results(0), System.Single)
End Function 'EndAdd
End Class
생성자
SoapHeaderCollection() |
SoapHeaderCollection 클래스의 새 인스턴스를 초기화합니다. |
속성
Capacity |
CollectionBase에 포함될 수 있는 요소의 수를 가져오거나 설정합니다. (다음에서 상속됨 CollectionBase) |
Count |
CollectionBase 인스턴스에 포함된 요소 수를 가져옵니다. 이 속성은 재정의할 수 없습니다. (다음에서 상속됨 CollectionBase) |
InnerList |
ArrayList 인스턴스의 요소 목록을 포함하는 CollectionBase를 가져옵니다. (다음에서 상속됨 CollectionBase) |
Item[Int32] |
SoapHeader의 지정된 인덱스에 있는 SoapHeaderCollection를 가져오거나 설정합니다. |
List |
IList 인스턴스의 요소 목록을 포함하는 CollectionBase를 가져옵니다. (다음에서 상속됨 CollectionBase) |
메서드
명시적 인터페이스 구현
확장 메서드
Cast<TResult>(IEnumerable) |
IEnumerable의 요소를 지정된 형식으로 캐스팅합니다. |
OfType<TResult>(IEnumerable) |
지정된 형식에 따라 IEnumerable의 요소를 필터링합니다. |
AsParallel(IEnumerable) |
쿼리를 병렬화할 수 있도록 합니다. |
AsQueryable(IEnumerable) |
IEnumerable을 IQueryable로 변환합니다. |