ImportCollection.Add(Import) Metod

Definition

Lägger till den angivna Import i slutet av ImportCollection.

public:
 int Add(System::Web::Services::Description::Import ^ import);
public int Add(System.Web.Services.Description.Import import);
member this.Add : System.Web.Services.Description.Import -> int
Public Function Add (import As Import) As Integer

Parametrar

import
Import

Att Import lägga till i samlingen.

Returer

Det nollbaserade index där parametern import har lagts till.

Exempel

I följande exempel visas hur metoden används Add . Mer information om metoden CreateImport som används i exemplet finns i exemplet under Import klassen .

ServiceDescription^ myServiceDescription = ServiceDescription::Read( "StockQuote_cpp.wsdl" );
myServiceDescription->Imports->Add( CreateImport( "http://localhost/stockquote/schemas", "http://localhost/stockquote/stockquote_cpp.xsd" ) );
ServiceDescription myServiceDescription =
   ServiceDescription.Read("StockQuote_cs.wsdl");
myServiceDescription.Imports.Add(
   CreateImport("http://localhost/stockquote/schemas",
   "http://localhost/stockquote/stockquote_cs.xsd"));
Dim myServiceDescription As ServiceDescription = _
   ServiceDescription.Read("StockQuote_vb.wsdl")
myServiceDescription.Imports.Add( _
   CreateImport("http://localhost/stockquote/schemas", _
   "http://localhost/stockquote/stockquote_vb.xsd"))

Gäller för