Nyelv

SoapHeaderCollection Osztály

Definíció

Az osztály példányainak gyűjteményét SoapHeader tartalmazza.

public ref class SoapHeaderCollection : System::Collections::CollectionBase
public class SoapHeaderCollection : System.Collections.CollectionBase
type SoapHeaderCollection = class
    inherit CollectionBase
Public Class SoapHeaderCollection
Inherits CollectionBase
Öröklődés
SoapHeaderCollection

Példák

[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

Konstruktorok

Név Description
SoapHeaderCollection()

Inicializálja a SoapHeaderCollection osztály új példányát.

Tulajdonságok

Név Description
Capacity

Lekéri vagy beállítja a tartalmazható elemek CollectionBase számát.

(Öröklődés forrása CollectionBase)
Count

Lekéri a példányban CollectionBase található elemek számát. Ez a tulajdonság nem bírálható felül.

(Öröklődés forrása CollectionBase)
InnerList

ArrayList Lekéri a példány elemeinek CollectionBase listáját.

(Öröklődés forrása CollectionBase)
Item[Int32]

Lekéri vagy beállítja a SoapHeader megadott indexet a SoapHeaderCollection.

List

IList Lekéri a példány elemeinek CollectionBase listáját.

(Öröklődés forrása CollectionBase)

Metódusok

Név Description
Add(SoapHeader)

Hozzáadja a SoapHeader-et a SoapHeaderCollection-hez.

Clear()

Eltávolítja az összes objektumot a CollectionBase példányból. Ez a metódus nem bírálható felül.

(Öröklődés forrása CollectionBase)
Contains(SoapHeader)

Meghatározza, hogy a SoapHeaderCollection fájl tartalmaz-e egy adott elemet SoapHeader.

CopyTo(SoapHeader[], Int32)

A fájl elemeit SoapHeaderCollection átmásolja egy Array, az Arrayadott indextől kezdődően.

Equals(Object)

Meghatározza, hogy a megadott objektum egyenlő-e az aktuális objektummal.

(Öröklődés forrása Object)
GetEnumerator()

Egy enumerátort ad vissza, amely a példányon keresztül CollectionBase iterál.

(Öröklődés forrása CollectionBase)
GetHashCode()

Ez az alapértelmezett kivonatoló függvény.

(Öröklődés forrása Object)
GetType()

Lekéri az Type aktuális példányt.

(Öröklődés forrása Object)
IndexOf(SoapHeader)

Meghatározza a benne lévő SoapHeaderindexetSoapHeaderCollection.

Insert(Int32, SoapHeader)

Beszúr egy értéket SoapHeader a SoapHeaderCollection megadott indexbe.

MemberwiseClone()

Az aktuális Objectpéldány sekély másolatát hozza létre.

(Öröklődés forrása Object)
OnClear()

További egyéni folyamatokat hajt végre a példány tartalmának CollectionBase törlésekor.

(Öröklődés forrása CollectionBase)
OnClearComplete()

További egyéni folyamatokat hajt végre a példány tartalmának CollectionBase törlése után.

(Öröklődés forrása CollectionBase)
OnInsert(Int32, Object)

További egyéni folyamatokat hajt végre, mielőtt új elemet szúr be a CollectionBase példányba.

(Öröklődés forrása CollectionBase)
OnInsertComplete(Int32, Object)

További egyéni folyamatokat hajt végre, miután beszúrt egy új elemet a CollectionBase példányba.

(Öröklődés forrása CollectionBase)
OnRemove(Int32, Object)

További egyéni folyamatokat hajt végre, amikor eltávolít egy elemet a CollectionBase példányból.

(Öröklődés forrása CollectionBase)
OnRemoveComplete(Int32, Object)

További egyéni folyamatokat hajt végre, miután eltávolított egy elemet a CollectionBase példányból.

(Öröklődés forrása CollectionBase)
OnSet(Int32, Object, Object)

További egyéni folyamatokat hajt végre, mielőtt beállít egy értéket a CollectionBase példányban.

(Öröklődés forrása CollectionBase)
OnSetComplete(Int32, Object, Object)

További egyéni folyamatokat hajt végre, miután beállított egy értéket a CollectionBase példányban.

(Öröklődés forrása CollectionBase)
OnValidate(Object)

További egyéni folyamatokat hajt végre egy érték ellenőrzésekor.

(Öröklődés forrása CollectionBase)
Remove(SoapHeader)

Eltávolítja egy adott SoapHeader esemény első előfordulását a SoapHeaderCollectionfájlból.

RemoveAt(Int32)

Eltávolítja az elemet a példány megadott indexéből CollectionBase . Ez a módszer nem bírálható felül.

(Öröklődés forrása CollectionBase)
ToString()

Az aktuális objektumot jelképező sztringet ad vissza.

(Öröklődés forrása Object)

Explicit interfész-implementációk

Név Description
ICollection.CopyTo(Array, Int32)

A teljes CollectionBase példányt egy kompatibilis egydimenziósra Arraymásolja a céltömb megadott indexétől kezdve.

(Öröklődés forrása CollectionBase)
ICollection.IsSynchronized

Beolvas egy értéket, amely jelzi, hogy a CollectionBase hozzáférés szinkronizálva van-e (a szál biztonságos).

(Öröklődés forrása CollectionBase)
ICollection.SyncRoot

Lekéri az objektumot, amely a hozzáférés szinkronizálására használható.CollectionBase

(Öröklődés forrása CollectionBase)
IList.Add(Object)

Objektumot ad hozzá a CollectionBasevégéhez.

(Öröklődés forrása CollectionBase)
IList.Contains(Object)

Meghatározza, hogy az CollectionBase adott elem tartalmaz-e.

(Öröklődés forrása CollectionBase)
IList.IndexOf(Object)

Megkeresi a megadott Object értéket, és a teljes első CollectionBaseelőfordulás nulla alapú indexét adja vissza.

(Öröklődés forrása CollectionBase)
IList.Insert(Int32, Object)

Elemet szúr be a CollectionBase megadott indexbe.

(Öröklődés forrása CollectionBase)
IList.IsFixedSize

Egy értéket kap, amely jelzi, hogy a CollectionBase méret rögzített-e.

(Öröklődés forrása CollectionBase)
IList.IsReadOnly

Beolvas egy értéket, amely jelzi, hogy az CollectionBase írásvédett-e.

(Öröklődés forrása CollectionBase)
IList.Item[Int32]

Lekéri vagy beállítja az elemet a megadott indexen.

(Öröklődés forrása CollectionBase)
IList.Remove(Object)

Eltávolítja egy adott objektum első előfordulását a CollectionBase.

(Öröklődés forrása CollectionBase)

Bővítő metódusok

Név Description
AsParallel(IEnumerable)

Lehetővé teszi a lekérdezés párhuzamosítását.

AsQueryable(IEnumerable)

Átalakítja az egyiket IEnumerableIQueryable.

Cast<TResult>(IEnumerable)

Egy elem elemeit IEnumerable a megadott típusra veti.

OfType<TResult>(IEnumerable)

Egy adott típus alapján szűri IEnumerable egy adott elem elemeit.

A következőre érvényes:

Lásd még