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
Dolgozzon együtt velünk a GitHubon
A tartalom forrása a GitHubon található, ahol létrehozhat és áttekinthet problémákat és lekéréses kérelmeket is. További információért tekintse meg a közreműködői útmutatónkat.