Share via


SoapQName Classe

Definizione

Esegue il wrapping di un tipo QName XSD.

public ref class SoapQName sealed : System::Runtime::Remoting::Metadata::W3cXsd2001::ISoapXsd
[System.Serializable]
public sealed class SoapQName : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SoapQName : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[<System.Serializable>]
type SoapQName = class
    interface ISoapXsd
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SoapQName = class
    interface ISoapXsd
Public NotInheritable Class SoapQName
Implements ISoapXsd
Ereditarietà
SoapQName
Attributi
Implementazioni

Esempio

Nell'esempio di codice seguente viene illustrato come usare i membri della SoapQName classe per convertire tra un oggetto e una SoapQName stringa XSD QName .

#using <System.Runtime.Remoting.dll>
using namespace System;
using namespace System::Runtime::Remoting::Metadata::W3cXsd2001;

int main()
{
   // Parse an XSD formatted string to create a SoapQName object.
   String^ xsdQName = L"tns:SomeName";
   SoapQName^ qName = SoapQName::Parse( xsdQName );

   // Print the value of the SoapQName object in XSD format.
   Console::WriteLine( L"The SoapQName object in XSD format is {0}.", qName );

   // Print the XSD type string of the SoapQName object.
   Console::WriteLine( L"The XSD type of the SoapQName "
   L"object is {0}.", qName->GetXsdType() );

   // Print the XSD type string of the SoapQName class.
   Console::WriteLine( L"The XSD type of the SoapQName class "
   L"is {0}.", SoapQName::XsdType );

   // Create a QName object.
   SoapQName^ soapQNameInstance = gcnew SoapQName(
      L"tns",L"SomeName",L"http://example.org" );
   
   // Print the key the SoapQName object.
   Console::WriteLine( L"The key of the SoapQName object is {0}.",
      soapQNameInstance->Key );

   // Print the name of the SoapQName object.
   Console::WriteLine( L"The name of the SoapQName "
   L"object is {0}.", soapQNameInstance->Name );

   // Print the namespace of the SoapQName class.
   Console::WriteLine( L"The namespace for this instance of SoapQName is {0}.",
      soapQNameInstance->Namespace );
}
using System;
using System.Runtime.Remoting.Metadata.W3cXsd2001;

public class Demo
{
    public static void Main(string[] args)
    {
        // Parse an XSD formatted string to create a SoapQName object.
        string xsdQName = "tns:SomeName";
        SoapQName qName = SoapQName.Parse(xsdQName);

        // Print the value of the SoapQName object in XSD format.
        Console.WriteLine(
            "The SoapQName object in XSD format is {0}.",
            qName.ToString());

        // Print the XSD type string of the SoapQName object.
        Console.WriteLine("The XSD type of the SoapQName " +
            "object is {0}.", qName.GetXsdType());

        // Print the XSD type string of the SoapQName class.
        Console.WriteLine(
            "The XSD type of the SoapQName class " +
            "is {0}.", SoapQName.XsdType);

        // Create a QName object.
        SoapQName soapQNameInstance =
            new SoapQName("tns", "SomeName", "http://example.org");

        // Print the key the SoapQName object.
        Console.WriteLine("The key of the SoapQName " +
            "object is {0}.", soapQNameInstance.Key);

        // Print the name of the SoapQName object.
        Console.WriteLine("The name of the SoapQName " +
            "object is {0}.", soapQNameInstance.Name);

        // Print the namespace of the SoapQName class.
        Console.WriteLine("The namespace for this instance of SoapQName " +
            "is {0}.", soapQNameInstance.Namespace);
    }
}

Commenti

Per altre informazioni sui tipi di dati XSD, vedere Informazioni di riferimento sui tipi di dati XML.

Costruttori

SoapQName()

Inizializza una nuova istanza della classe SoapQName.

SoapQName(String)

Inizializza una nuova istanza della classe SoapQName con la parte locale di un nome completo.

SoapQName(String, String)

Inizializza una nuova istanza della classe SoapQName con l'alias dello spazio dei nomi e la parte locale di un nome completo.

SoapQName(String, String, String)

Inizializza una nuova istanza della classe SoapQName con l'alias dello spazio dei nomi, la parte locale di un nome completo e lo spazio dei nomi a cui fa riferimento l'alias.

Proprietà

Key

Ottiene o imposta l'alias dello spazio dei nomi di un nome completo.

Name

Ottiene o imposta la parte del nome di un nome completo.

Namespace

Ottiene o imposta lo spazio dei nomi a cui fa riferimento la proprietà Key.

XsdType

Ottiene il linguaggio XSD (XML Schema Definition) del tipo SOAP corrente.

Metodi

Equals(Object)

Determina se l'oggetto specificato è uguale all'oggetto corrente.

(Ereditato da Object)
GetHashCode()

Funge da funzione hash predefinita.

(Ereditato da Object)
GetType()

Ottiene l'oggetto Type dell'istanza corrente.

(Ereditato da Object)
GetXsdType()

Restituisce l'oggetto XML Schema Definition Language (XSD) del tipo SOAP corrente.

MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.

(Ereditato da Object)
Parse(String)

Converte l'oggetto String specificato in un oggetto SoapQName.

ToString()

Restituisce il nome completo sotto forma di oggetto String.

Si applica a