Freigeben über


ContractReference.Namespace Feld

Definition

XML-Namespace für Verweise auf Dienstbeschreibungen in Discoverydokumenten.

public: System::String ^ Namespace;
public const string Namespace;
val mutable Namespace : string
Public Const Namespace As String 

Feldwert

Beispiele

Im folgenden Codebeispiel wird der Wert der -Konstante an die Namespace Konsole ausgegeben.

// 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 );
myContractReference->DocRef = myAttributeCollection[ 1 ]->Value;
Console::WriteLine( "The URL implementing the referenced service description is : {0}", myContractReference->DocRef );
Console::WriteLine( "Namespace for the referenced service description is : {0}", ContractReference::Namespace );
// 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);
myContractReference.DocRef = myAttributeCollection[1].Value;
Console.WriteLine("The URL implementing the referenced service description is : {0}",myContractReference.DocRef);
Console.WriteLine("Namespace for the referenced service description is : {0}", ContractReference.Namespace);
' 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)
myContractReference.DocRef = myAttributeCollection(1).Value
Console.WriteLine("The URL implementing the referenced service description is : {0}", myContractReference.DocRef)
Console.WriteLine("Namespace for the referenced service description is : {0}", ContractReference.Namespace)

Hinweise

In einem Ermittlungsdokument ist ein Verweis auf eine Dienstbeschreibung in einem contractRef XML-Element enthalten, das Teil des xml-Namespace ist, der in der Namespace -Konstante angegeben ist.

Gilt für: