DiscoveryClientResultCollection.Add(DiscoveryClientResult) Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Fügt der DiscoveryClientResult einen DiscoveryClientResultCollection hinzu.
public:
int Add(System::Web::Services::Discovery::DiscoveryClientResult ^ value);
public int Add (System.Web.Services.Discovery.DiscoveryClientResult value);
member this.Add : System.Web.Services.Discovery.DiscoveryClientResult -> int
Public Function Add (value As DiscoveryClientResult) As Integer
Parameter
- value
- DiscoveryClientResult
Das DiscoveryClientResult, das in DiscoveryClientResultCollection eingefügt werden soll.
Gibt zurück
Die Position, an der das DiscoveryClientResult eingefügt wurde.
Beispiele
// Initialize new instance of the DiscoveryClientResult class.
DiscoveryClientResult^ myDiscoveryClientResult = gcnew DiscoveryClientResult;
// Set the type of reference in the discovery document as
// DiscoveryDocumentReference.
myDiscoveryClientResult->ReferenceTypeName = "System.Web.Services.Discovery.DiscoveryDocumentReference";
// Set the URL for the reference.
myDiscoveryClientResult->Url = "http://localhost/Discovery/Service1_cs.asmx?disco";
// Set the name of the file in which the reference is saved.
myDiscoveryClientResult->Filename = "Service1_cs.disco";
// Add the DiscoveryClientResult to the collection.
myDiscoveryClientResultCollection->Add( myDiscoveryClientResult );
// Initialize new instance of the DiscoveryClientResult class.
DiscoveryClientResult myDiscoveryClientResult =
new DiscoveryClientResult();
// Set the type of reference in the discovery document as
// DiscoveryDocumentReference.
myDiscoveryClientResult.ReferenceTypeName =
"System.Web.Services.Discovery.DiscoveryDocumentReference";
// Set the URL for the reference.
myDiscoveryClientResult.Url =
"http://localhost/Discovery/Service1_cs.asmx?disco";
// Set the name of the file in which the reference is saved.
myDiscoveryClientResult.Filename = "Service1_cs.disco";
// Add the DiscoveryClientResult to the collection.
myDiscoveryClientResultCollection.Add(myDiscoveryClientResult);
' Initialize a new instance of the DiscoveryClientResult class.
Dim myDiscoveryClientResult As New DiscoveryClientResult()
' Set the type of reference in the discovery document as
' DiscoveryDocumentReference.
myDiscoveryClientResult.ReferenceTypeName = _
"System.Web.Services.Discovery.DiscoveryDocumentReference"
' Set the URL for the reference.
myDiscoveryClientResult.Url = _
"http://localhost/Discovery/Service1_vb.asmx?disco"
' Set the name of the file in which the reference is saved.
myDiscoveryClientResult.Filename = "Service1_vb.disco"
' Add the DiscoveryClientResult to the collection.
myDiscoveryClientResultCollection.Add(myDiscoveryClientResult)