SoapNormalizedString Klasa

Definicja

Opakowuje typ XML normalizedString .

C#
[System.Serializable]
public sealed class SoapNormalizedString : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
C#
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SoapNormalizedString : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
Dziedziczenie
SoapNormalizedString
Atrybuty
Implementuje

Przykłady

Poniższy przykład kodu pokazuje, jak używać składowych w SoapNormalizedString klasie do konwersji między obiektem SoapNormalizedString a XSD normalizedString.

C#
using System;
using System.Runtime.Remoting.Metadata.W3cXsd2001;

public class Demo
{
    public static void TestParse(string testString)
    {
        try
        {
            // Parse the test string.
            SoapNormalizedString normalized =
                SoapNormalizedString.Parse(testString);

            // Report that the parse succeeded if no exception was thrown.
            Console.WriteLine(
                "Parse succeeded on the string \"{0}\".",
                testString);

            // Print the string representation of the object.
            Console.WriteLine(
                "The normalized value of this string is \"{0}\".",
                normalized.ToString());

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

            // Print the value of the SoapNormalizedString object.
            Console.WriteLine(
                "The value of the SoapNormalizedString " +
                "object is \"{0}\".",
                normalized.Value);
        }
        catch(System.Runtime.Remoting.RemotingException e)
        {
            // Report the details of the exception that was thrown.
            Console.WriteLine(
                "Parse failed on the string \"{0}\".",
                testString);
            Console.WriteLine(e.Message);
        }
    }

    public static void Main(string[] args)
    {
        // Create strings to test the Parse method.
        string stringWithSpaces = "one two";
        string stringWithSpacesAndTabs = "one two\t";
        string stringWithSpacesAndLineFeed = "one two\n";
        string stringWithSpacesAndCarriageReturn = "one two\r";

        // Test the Parse method with each string.
        TestParse(stringWithSpaces);
        TestParse(stringWithSpacesAndTabs);
        TestParse(stringWithSpacesAndLineFeed);
        TestParse(stringWithSpacesAndCarriageReturn);

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

Konstruktory

SoapNormalizedString()

Inicjuje nowe wystąpienie klasy SoapNormalizedString.

SoapNormalizedString(String)

Inicjuje SoapNormalizedString nowe wystąpienie klasy z znormalizowanym ciągiem.

Właściwości

Value

Pobiera lub ustawia znormalizowany ciąg.

XsdType

Pobiera język definicji schematu XML (XSD) bieżącego typu SOAP.

Metody

Equals(Object)

Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.

(Odziedziczone po Object)
GetHashCode()

Służy jako domyślna funkcja skrótu.

(Odziedziczone po Object)
GetType()

Type Pobiera bieżące wystąpienie.

(Odziedziczone po Object)
GetXsdType()

Zwraca język definicji schematu XML (XSD) bieżącego typu SOAP.

MemberwiseClone()

Tworzy płytkią kopię bieżącego Objectelementu .

(Odziedziczone po Object)
Parse(String)

Konwertuje określony String obiekt na SoapNormalizedString obiekt.

ToString()

Zwraca Value wartość jako .String

Dotyczy

Produkt Wersje
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1