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 に変換します。 |
適用対象
こちらもご覧ください
.NET