ContractReference.Url Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit l'URL de la description du service référencé.
public:
virtual property System::String ^ Url { System::String ^ get(); void set(System::String ^ value); };
public override string Url { get; set; }
member this.Url : string with get, set
Public Overrides Property Url As String
Valeur de propriété
URL de la description du service référencé.
Exemples
DiscoveryClientProtocol^ myProtocol = gcnew DiscoveryClientProtocol;
// Get the DiscoveryDocument.
DiscoveryDocument^ myDiscoveryDocument = myProtocol->Discover( "http://localhost/ContractReference/test_cs.disco" );
ArrayList^ myArrayList = dynamic_cast<ArrayList^>(myDiscoveryDocument->References);
// Get the ContractReference.
ContractReference^ myContractRefrence = dynamic_cast<ContractReference^>(myArrayList[ 0 ]);
// Get the DefaultFileName associated with the .disco file.
String^ myFileName = myContractRefrence->DefaultFilename;
// Get the URL associated with the .disco file.
String^ myUrl = myContractRefrence->Url;
Console::WriteLine( "The DefaulFilename is: {0}", myUrl );
Console::WriteLine( "The URL is: {0}", myUrl );
DiscoveryClientProtocol myProtocol = new DiscoveryClientProtocol();
// Get the DiscoveryDocument.
DiscoveryDocument myDiscoveryDocument =
myProtocol.Discover("http://localhost/ContractReference/test_cs.disco");
ArrayList myArrayList = (ArrayList)myDiscoveryDocument.References;
// Get the ContractReference.
ContractReference myContractRefrence = (ContractReference)myArrayList[0];
// Get the DefaultFileName associated with the .disco file.
String myFileName = myContractRefrence.DefaultFilename;
// Get the URL associated with the .disco file.
String myUrl = myContractRefrence.Url;
Console.WriteLine("The DefaulFilename is: " + myUrl);
Console.WriteLine("The URL is: " + myUrl);
Dim myProtocol As New DiscoveryClientProtocol()
' Get the DiscoveryDocument.
Dim myDiscoveryDocument As DiscoveryDocument = _
myProtocol.Discover("http://localhost/ContractReference/Test_vb.disco")
Dim myArrayList As ArrayList = _
CType(myDiscoveryDocument.References, ArrayList)
' Get the ContractReference.
Dim myContractRefrence As ContractReference = _
CType(myArrayList(0), ContractReference)
' Get the DefaultFileName associated with the .disco file.
Dim myFileName As String = myContractRefrence.DefaultFilename
' Get the URL associated with the .disco file.
Dim myUrl As String = myContractRefrence.Url
Console.WriteLine("The DefaulFilename is: " + myUrl)
Console.WriteLine("The URL is: " + myUrl)
Remarques
Pour la ContractReference classe, la Url propriété retourne la valeur de la Ref propriété .
S’applique à
Voir aussi
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.