Condividi tramite


SoapAnyUri Classe

Definizione

Esegue il wrapping di un tipo anyURI XSD.

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

Esempio

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

#using <System.dll>
#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 SoapAnyUri object.
   String^ xsdAnyUri = L"http://localhost:8080/WebService";
   SoapAnyUri^ anyUri = SoapAnyUri::Parse( xsdAnyUri );

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

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

   // Print the value of the SoapAnyUri object.
   Console::WriteLine( L"The value of the SoapAnyUri object is {0}.", anyUri->Value );
   
   // Print the XSD type string of the SoapAnyUri class.
   Console::WriteLine( L"The XSD type of the SoapAnyUri class "
   L"is {0}.", SoapAnyUri::XsdType );

   return 1;
}
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 SoapAnyUri object.
        string xsdAnyUri = "http://localhost:8080/WebService";
        SoapAnyUri anyUri = SoapAnyUri.Parse(xsdAnyUri);

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

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

        // Print the value of the SoapAnyUri object.
        Console.WriteLine(
            "The value of the SoapAnyUri object is {0}.",
            anyUri.Value);

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

Commenti

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

Costruttori

SoapAnyUri()

Inizializza una nuova istanza della classe SoapAnyUri.

SoapAnyUri(String)

Inizializza una nuova istanza della classe SoapAnyUri con l'URI specificato.

Proprietà

Value

Ottiene o imposta un URI.

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 SoapAnyUri.

ToString()

Restituisce la proprietà Value come String.

Si applica a