DiscoveryClientResultCollection.Add(DiscoveryClientResult) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a DiscoveryClientResult to the DiscoveryClientResultCollection.
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
Parameters
- value
- DiscoveryClientResult
The DiscoveryClientResult to add to the DiscoveryClientResultCollection.
Returns
The position into which the DiscoveryClientResult was inserted.
Examples
// 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)
Applies to
See also
Collaborer avec nous sur GitHub
La source de ce contenu se trouve sur GitHub, où vous pouvez également créer et examiner les problèmes et les demandes de tirage. Pour plus d’informations, consultez notre guide du contributeur.