Aracılığıyla paylaş


ContractReference.Ref Özellik

Tanım

Başvuruda bulunan hizmet açıklamasının URL'sini alır veya ayarlar.

public:
 property System::String ^ Ref { System::String ^ get(); void set(System::String ^ value); };
public string Ref { get; set; }
member this.Ref : string with get, set
Public Property Ref As String

Özellik Değeri

Başvuruda bulunan hizmet açıklamasının URL'si.

Örnekler

Aşağıdaki kod örneği, özelliğini ContractReferenceayarlarRef.

// Call the Constructor of ContractReference.
ContractReference^ myContractReference = gcnew ContractReference;
XmlDocument^ myXmlDocument = gcnew XmlDocument;

// Read the discovery document for the 'contractRef' tag.
myXmlDocument->Load( "http://localhost/Discoverydoc.disco" );
XmlNode^ myXmlRoot = myXmlDocument->FirstChild;
XmlNode^ myXmlNode = myXmlRoot[ "scl:contractRef" ];
XmlAttributeCollection^ myAttributeCollection = myXmlNode->Attributes;
myContractReference->Ref = myAttributeCollection[ 0 ]->Value;
Console::WriteLine( "The URL to the referenced service description is : {0}", myContractReference->Ref );
// Call the Constructor of ContractReference.
ContractReference myContractReference = new ContractReference();
XmlDocument myXmlDocument = new XmlDocument();

// Read the discovery document for the 'contractRef' tag.
myXmlDocument.Load("http://localhost/Discoverydoc.disco");

XmlNode myXmlRoot = myXmlDocument.FirstChild;
XmlNode myXmlNode = myXmlRoot["scl:contractRef"];
XmlAttributeCollection myAttributeCollection = myXmlNode.Attributes;

myContractReference.Ref = myAttributeCollection[0].Value;
Console.WriteLine("The URL to the referenced service description is : {0}",myContractReference.Ref);
' Call the Constructor of ContractReference.
Dim myContractReference As New ContractReference()
Dim myXmlDocument As New XmlDocument()

' Read the discovery document for the 'contractRef' tag.
myXmlDocument.Load("http://localhost/Discoverydoc.disco")

Dim myXmlRoot As XmlNode = myXmlDocument.FirstChild
Dim myXmlNode As XmlNode = myXmlRoot("scl:contractRef")
Dim myAttributeCollection As XmlAttributeCollection = myXmlNode.Attributes

myContractReference.Ref = myAttributeCollection(0).Value
Console.WriteLine("The URL to the referenced service description is : {0}", myContractReference.Ref)

Açıklamalar

Bulma belgesinde, xml öğesinin içinde contractRef hizmet açıklamasına başvuru bulunur. XML öğesinin contractRef aşağıdaki tabloda açıklanan iki özniteliği vardır.

Öznitelik Açıklama
ref Hizmet açıklamasının URL'si. Ref özelliği özniteliğinin ref değerini temsil eder.
Docref özniteliği tarafından belirtilen hizmet açıklamasını uygulayan XML Web hizmetinin URL'si ref . DocRef özelliği özniteliğinin docRef değerini temsil eder.

Şunlara uygulanır

Ayrıca bkz.