Поделиться через


SoapAnyUri Класс

Определение

Заключает в оболочку тип XSD anyURI.

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
Наследование
SoapAnyUri
Атрибуты
Реализации

Примеры

В следующем примере кода показано, как использовать члены класса SoapAnyUri для преобразования между SoapAnyUri объектом и строкой 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);
    }
}

Комментарии

Дополнительные сведения о типах данных XSD см. в справочнике по типам данных XML.

Конструкторы

SoapAnyUri()

Инициализирует новый экземпляр класса SoapAnyUri.

SoapAnyUri(String)

Инициализирует новый экземпляр класса SoapAnyUri с заданным универсальным кодом ресурса.

Свойства

Value

Получает или задает URI.

XsdType

Получает язык определения XML-схемы (XSD) текущего типа SOAP.

Методы

Equals(Object)

Определяет, равен ли указанный объект текущему объекту.

(Унаследовано от Object)
GetHashCode()

Служит хэш-функцией по умолчанию.

(Унаследовано от Object)
GetType()

Возвращает объект Type для текущего экземпляра.

(Унаследовано от Object)
GetXsdType()

Возвращает язык определения XML-схемы (XSD) текущего типа SOAP.

MemberwiseClone()

Создает неполную копию текущего объекта Object.

(Унаследовано от Object)
Parse(String)

Преобразует заданный String в объект SoapAnyUri.

ToString()

Возвращает Value как String.

Применяется к