XmlSerializer.Deserialize 메서드

정의

XML 문서를 역직렬화합니다.

오버로드

Deserialize(Stream)

지정된 Stream에 포함된 XML 문서를 역직렬화합니다.

Deserialize(TextReader)

지정된 TextReader에 포함된 XML 문서를 역직렬화합니다.

Deserialize(XmlSerializationReader)

지정된 XmlSerializationReader에 포함된 XML 문서를 역직렬화합니다.

Deserialize(XmlReader)

지정된 XmlReader에 포함된 XML 문서를 역직렬화합니다.

Deserialize(XmlReader, String)

지정된 XmlReader에 포함된 XML 문서와 인코딩 스타일을 역직렬화합니다.

Deserialize(XmlReader, XmlDeserializationEvents)

지정된 XmlReader에 포함된 XML 문서를 역직렬화하고 deserialization을 수행하는 동안 발생하는 이벤트를 재정의할 수 있도록 합니다.

Deserialize(XmlReader, String, XmlDeserializationEvents)

지정된 XmlReader에 포함된 데이터를 사용하여 개체를 역직렬화합니다.

Deserialize(Stream)

지정된 Stream에 포함된 XML 문서를 역직렬화합니다.

public:
 System::Object ^ Deserialize(System::IO::Stream ^ stream);
public object Deserialize (System.IO.Stream stream);
public object? Deserialize (System.IO.Stream stream);
member this.Deserialize : System.IO.Stream -> obj
Public Function Deserialize (stream As Stream) As Object

매개 변수

stream
Stream

역직렬화할 XML 문서를 포함하는 Stream입니다.

반환

Object

역직렬화되는 Object입니다.

예제

다음 예제에서는 개체를 사용하여 Stream 개체를 역직렬화합니다.

#using <System.Xml.dll>
#using <System.dll>

using namespace System;
using namespace System::IO;
using namespace System::Xml::Serialization;

// This is the class that will be deserialized.
public ref class OrderedItem
{
public:

    [XmlElement(Namespace="http://www.cpandl.com")]
    String^ ItemName;

    [XmlElement(Namespace="http://www.cpandl.com")]
    String^ Description;

    [XmlElement(Namespace="http://www.cohowinery.com")]
    Decimal UnitPrice;

    [XmlElement(Namespace="http://www.cpandl.com")]
    int Quantity;

    [XmlElement(Namespace="http://www.cohowinery.com")]
    Decimal LineTotal;

    // A custom method used to calculate price per item.
    void Calculate()
    {
        LineTotal = UnitPrice * Quantity;
    }
};

void DeserializeObject(String^ filename)
{
    Console::WriteLine("Reading with Stream");

    // Create an instance of the XmlSerializer.
    XmlSerializer^ serializer = gcnew XmlSerializer(OrderedItem::typeid);

    // Declare an object variable of the type to be deserialized.
    OrderedItem^ i;
    
    // Reading the XML document requires a FileStream.
    Stream^ reader = gcnew FileStream(filename, FileMode::Open);

    try
    {
        // Call the Deserialize method to restore the object's state.
        i = dynamic_cast<OrderedItem^>(serializer->Deserialize(reader));
    }
    finally
    {
        delete reader;
    }

    // Write out the properties of the object.
    Console::Write("{0}\t{1}\t{2}\t{3}\t{4}", i->ItemName, i->Description, i->UnitPrice, i->Quantity, i->LineTotal);
}

int main()
{
    // Read a purchase order.
    DeserializeObject( "simple.xml" );
}
using System;
using System.IO;
using System.Xml.Serialization;

// This is the class that will be deserialized.
public class OrderedItem
{
    [XmlElement(Namespace = "http://www.cpandl.com")]
    public string ItemName;
    [XmlElement(Namespace = "http://www.cpandl.com")]
    public string Description;
    [XmlElement(Namespace="http://www.cohowinery.com")]
    public decimal UnitPrice;
    [XmlElement(Namespace = "http://www.cpandl.com")]
    public int Quantity;
    [XmlElement(Namespace="http://www.cohowinery.com")]
    public decimal LineTotal;
    // A custom method used to calculate price per item.
    public void Calculate()
    {
        LineTotal = UnitPrice * Quantity;
    }
}

public class Test
{
    public static void Main()
    {
        Test t = new Test();
        // Read a purchase order.
        t.DeserializeObject("simple.xml");
    }

    private void DeserializeObject(string filename)
    {
        Console.WriteLine("Reading with Stream");
        // Create an instance of the XmlSerializer.
        XmlSerializer serializer =
        new XmlSerializer(typeof(OrderedItem));

        // Declare an object variable of the type to be deserialized.
        OrderedItem i;

        using (Stream reader = new FileStream(filename, FileMode.Open))
        {
            // Call the Deserialize method to restore the object's state.
            i = (OrderedItem)serializer.Deserialize(reader);
        }

        // Write out the properties of the object.
        Console.Write(
        i.ItemName + "\t" +
        i.Description + "\t" +
        i.UnitPrice + "\t" +
        i.Quantity + "\t" +
        i.LineTotal);
    }
}
Imports System.IO
Imports System.Xml.Serialization

' This is the class that will be deserialized.
Public Class OrderedItem
    <XmlElement(Namespace := "http://www.cpandl.com")> _
    Public ItemName As String

    <XmlElement(Namespace := "http://www.cpandl.com")> _
    Public Description As String
    
    <XmlElement(Namespace := "http://www.cohowinery.com")> _
    Public UnitPrice As Decimal
    
    <XmlElement(Namespace := "http://www.cpandl.com")> _
    Public Quantity As Integer
    
    <XmlElement(Namespace := "http://www.cohowinery.com")> _
    Public LineTotal As Decimal
    
    'A custom method used to calculate price per item.
    Public Sub Calculate()
        LineTotal = UnitPrice * Quantity
    End Sub
End Class

Public Class Test
    
    Public Shared Sub Main()
        Dim t As New Test()
        ' Read a purchase order.
        t.DeserializeObject("simple.xml")
    End Sub
        
    Private Sub DeserializeObject(ByVal filename As String)
        Console.WriteLine("Reading with Stream")
        ' Create an instance of the XmlSerializer.
        Dim serializer As New XmlSerializer(GetType(OrderedItem))       
        
        ' Declare an object variable of the type to be deserialized.
        Dim i As OrderedItem

        Using reader As New Filestream(filename, FileMode.Open)

            ' Call the Deserialize method to restore the object's state.
            i = CType(serializer.Deserialize(reader), OrderedItem)
        End Using

        ' Write out the properties of the object.
        Console.Write(i.ItemName & ControlChars.Tab & _
                      i.Description & ControlChars.Tab & _
                      i.UnitPrice & ControlChars.Tab & _
                      i.Quantity & ControlChars.Tab & _
                      i.LineTotal)
    End Sub
End Class
<?xml version="1.0"?>
 <OrderedItem xmlns:inventory="http://www.cpandl.com" xmlns:money="http://www.cohowinery.com">
   <inventory:ItemName>Widget</inventory:ItemName>
   <inventory:Description>Regular Widget</inventory:Description>
   <money:UnitPrice>2.3</money:UnitPrice>
   <inventory:Quantity>10</inventory:Quantity>
   <money:LineTotal>23</money:LineTotal>
 </OrderedItem>

설명

역직렬화는 XML 문서를 읽고 문서의 XSD(XML 스키마)에 강력한 형식의 개체를 생성하는 프로세스입니다.

역직렬화 XmlSerializer 하기 전에 역직렬화되는 개체의 형식을 사용하여 생성해야 합니다.

매개 변수를 stream 사용하여 스트림에 쓰도록 설계된 클래스에서 Stream 파생되는 개체를 지정합니다. 파생 된 클래스는 Stream 클래스를 포함 합니다.

참고

XmlSerializer 배열 및 배열 ArrayList List<T>은 역직렬화할 수 없습니다.

추가 정보

적용 대상

Deserialize(TextReader)

지정된 TextReader에 포함된 XML 문서를 역직렬화합니다.

public:
 System::Object ^ Deserialize(System::IO::TextReader ^ textReader);
public object Deserialize (System.IO.TextReader textReader);
public object? Deserialize (System.IO.TextReader textReader);
member this.Deserialize : System.IO.TextReader -> obj
Public Function Deserialize (textReader As TextReader) As Object

매개 변수

textReader
TextReader

역직렬화할 XML 문서를 포함하는 TextReader입니다.

반환

Object

역직렬화되는 Object입니다.

예외

deserialization 중 오류가 발생했습니다. InnerException 속성을 사용하여 원래 예외를 사용할 수 있습니다.

예제

다음 예제에서는 개체를 사용하여 TextReader 개체를 역직렬화합니다.

#using <System.Xml.dll>
#using <System.dll>

using namespace System;
using namespace System::IO;
using namespace System::Text;
using namespace System::Xml::Serialization;

// This is the class that will be deserialized.
public ref class OrderedItem
{
public:
    String^ ItemName;
    String^ Description;
    Decimal UnitPrice;
    int Quantity;
    Decimal LineTotal;

    // A custom method used to calculate price per item.
    void Calculate()
    {
        LineTotal = UnitPrice * Quantity;
    }
};

void DeserializeObject( String^ filename )
{
    Console::WriteLine( "Reading with TextReader" );

    // Create an instance of the XmlSerializer specifying type.
    XmlSerializer^ serializer = gcnew XmlSerializer( OrderedItem::typeid );

    /* Create a TextReader to read the file. Specify an
       Encoding to use. */
    TextReader^ reader = gcnew StreamReader( filename,Encoding::Unicode );

    // Declare an object variable of the type to be deserialized.
    OrderedItem^ i;

    // Use the Deserialize method to restore the object's state.
    i = dynamic_cast<OrderedItem^>(serializer->Deserialize( reader ));

    // Write out the properties of the object.
    Console::Write( "{0}\t{1}\t{2}\t{3}\t{4}", i->ItemName, i->Description, i->UnitPrice, i->Quantity, i->LineTotal );
}

int main()
{
    // Read a purchase order.
    DeserializeObject( "simple.xml" );
}
using System;
using System.IO;
using System.Text;
using System.Xml.Serialization;

// This is the class that will be deserialized.
public class OrderedItem
{
    [XmlElement(Namespace = "http://www.cpandl.com")]
    public string ItemName;
    [XmlElement(Namespace = "http://www.cpandl.com")]
    public string Description;
    [XmlElement(Namespace = "http://www.cohowinery.com")]
    public decimal UnitPrice;
    [XmlElement(Namespace = "http://www.cpandl.com")]
    public int Quantity;
    [XmlElement(Namespace = "http://www.cohowinery.com")]
    public decimal LineTotal;
    // A custom method used to calculate price per item.
    public void Calculate()
    {
        LineTotal = UnitPrice * Quantity;
    }
}

public class Test
{
   public static void Main()
    {
        Test t = new Test();
        // Read a purchase order.
        t.DeserializeObject("simple.xml");
    }

    private void DeserializeObject(string filename)
    {
        Console.WriteLine("Reading with TextReader");

        // Create an instance of the XmlSerializer specifying type.
        XmlSerializer serializer =
        new XmlSerializer(typeof(OrderedItem));

        // Create a TextReader to read the file.
        FileStream fs = new FileStream(filename, FileMode.OpenOrCreate);
        TextReader reader = new StreamReader(fs);

        // Declare an object variable of the type to be deserialized.
        OrderedItem i;

        // Use the Deserialize method to restore the object's state.
        i = (OrderedItem) serializer.Deserialize(reader);

        // Write out the properties of the object.
        Console.Write(
            i.ItemName + "\t" +
            i.Description + "\t" +
            i.UnitPrice + "\t" +
            i.Quantity + "\t" +
            i.LineTotal);
    }
}
Imports System.IO
Imports System.Text
Imports System.Xml.Serialization

' This is the class that will be deserialized.
Public Class OrderedItem
    <XmlElement(Namespace := "http://www.cpandl.com")> _
    Public ItemName As String

    <XmlElement(Namespace := "http://www.cpandl.com")> _
    Public Description As String
    
    <XmlElement(Namespace := "http://www.cohowinery.com")> _
    Public UnitPrice As Decimal
    
    <XmlElement(Namespace := "http://www.cpandl.com")> _
    Public Quantity As Integer
    
    <XmlElement(Namespace := "http://www.cohowinery.com")> _
    Public LineTotal As Decimal
    ' A custom method used to calculate price per item.
    Public Sub Calculate()
        LineTotal = UnitPrice * Quantity
    End Sub
End Class
Public Class Test
    
    Public Shared Sub Main()
        Dim t As New Test()
        ' Read a purchase order.
        t.DeserializeObject("simple.xml")
    End Sub
    
    Private Sub DeserializeObject(filename As String)
        Console.WriteLine("Reading with TextReader")
        
        ' Create an instance of the XmlSerializer specifying type.
        Dim serializer As New XmlSerializer(GetType(OrderedItem))
        
        ' Create a TextReader to read the file. 
        Dim fs as New FileStream(filename, FileMode.OpenOrCreate)
        Dim reader As New StreamReader(fs)
        
        ' Declare an object variable of the type to be deserialized.
        Dim i As OrderedItem
        
        ' Use the Deserialize method to restore the object's state.
        i = CType(serializer.Deserialize(reader), OrderedItem)
        
        ' Write out the properties of the object.
        Console.Write(i.ItemName & ControlChars.Tab & _
                      i.Description & ControlChars.Tab & _
                      i.UnitPrice & ControlChars.Tab & _
                      i.Quantity & ControlChars.Tab & _
                      i.LineTotal)
    End Sub
End Class

설명

역직렬화는 XML 문서의 인스턴스를 읽고 문서의 XSD(XML 스키마)에 강력한 형식의 개체를 생성하는 프로세스입니다.

역직렬화 XmlSerializer 하기 전에 역직렬화되는 개체의 형식을 사용하여 생성해야 합니다.

include StringReaderStreamReader.에서 TextReader 상속되는 클래스입니다. 개체를 StreamReader 역직렬화하는 데 사용하는 경우 적절한 Encoding개체를 StreamReader 사용하여 구성해야 합니다. XML 문서에서 지정한 인코딩은 무시됩니다.

참고

XML 문서에서 지정한 인코딩을 사용하려면 대신 오버로드를 XmlReader 사용합니다Deserialize. XML XmlReader 문서에서 지정한 인코딩을 자동으로 검색하고 사용합니다.

참고

XmlSerializer 배열 및 배열 ArrayList List<T>은 역직렬화할 수 없습니다.

추가 정보

적용 대상

Deserialize(XmlSerializationReader)

지정된 XmlSerializationReader에 포함된 XML 문서를 역직렬화합니다.

protected:
 virtual System::Object ^ Deserialize(System::Xml::Serialization::XmlSerializationReader ^ reader);
protected virtual object Deserialize (System.Xml.Serialization.XmlSerializationReader reader);
abstract member Deserialize : System.Xml.Serialization.XmlSerializationReader -> obj
override this.Deserialize : System.Xml.Serialization.XmlSerializationReader -> obj
Protected Overridable Function Deserialize (reader As XmlSerializationReader) As Object

매개 변수

reader
XmlSerializationReader

역직렬화할 XML 문서를 포함하는 XmlSerializationReader입니다.

반환

Object

역직렬화된 개체입니다.

예외

하위 클래스에서 재정의되지 않은 메서드에 액세스하려는 경우

적용 대상

Deserialize(XmlReader)

지정된 XmlReader에 포함된 XML 문서를 역직렬화합니다.

public:
 System::Object ^ Deserialize(System::Xml::XmlReader ^ xmlReader);
public object Deserialize (System.Xml.XmlReader xmlReader);
public object? Deserialize (System.Xml.XmlReader xmlReader);
member this.Deserialize : System.Xml.XmlReader -> obj
Public Function Deserialize (xmlReader As XmlReader) As Object

매개 변수

xmlReader
XmlReader

역직렬화할 XML 문서를 포함하는 XmlReader입니다.

반환

Object

역직렬화되는 Object입니다.

예외

deserialization 중 오류가 발생했습니다. InnerException 속성을 사용하여 원래 예외를 사용할 수 있습니다.

예제

다음 예제에서는 .을 사용하여 XmlReader개체를 역직렬화합니다.

#using <System.Xml.dll>
#using <System.dll>

using namespace System;
using namespace System::IO;
using namespace System::Text;
using namespace System::Xml;
using namespace System::Xml::Serialization;

// This is the class that will be deserialized.
public ref class OrderedItem
{
public:
    String^ ItemName;
    String^ Description;
    Decimal UnitPrice;
    int Quantity;
    Decimal LineTotal;

    // A custom method used to calculate price per item.
    void Calculate()
    {
        LineTotal = UnitPrice * Quantity;
    }
};

void DeserializeObject( String^ filename )
{
    Console::WriteLine( "Reading with XmlReader" );

    // Create an instance of the XmlSerializer specifying type and namespace.
    XmlSerializer^ serializer = gcnew XmlSerializer( OrderedItem::typeid );

    // A FileStream is needed to read the XML document.
    FileStream^ fs = gcnew FileStream( filename,FileMode::Open );
    XmlReader^ reader = gcnew XmlTextReader( fs );

    // Declare an object variable of the type to be deserialized.
    OrderedItem^ i;

    // Use the Deserialize method to restore the object's state.
    i = dynamic_cast<OrderedItem^>(serializer->Deserialize( reader ));

    // Write out the properties of the object.
    Console::Write( "{0}\t{1}\t{2}\t{3}\t{4}", i->ItemName, i->Description, i->UnitPrice, i->Quantity, i->LineTotal );
}

int main()
{
    // Read a purchase order.
    DeserializeObject( "simple.xml" );
}
using System;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Serialization;

// This is the class that will be deserialized.
public class OrderedItem
{
    public string ItemName;
    public string Description;
    public decimal UnitPrice;
    public int Quantity;
    public decimal LineTotal;

    // A custom method used to calculate price per item.
    public void Calculate()
    {
        LineTotal = UnitPrice * Quantity;
    }
}
public class Test
{
    public static void Main(string[] args)
    {
        Test t = new Test();
        // Read a purchase order.
        t.DeserializeObject("simple.xml");
    }

    private void DeserializeObject(string filename)
    {
        Console.WriteLine("Reading with XmlReader");

        // Create an instance of the XmlSerializer specifying type and namespace.
        XmlSerializer serializer = new
        XmlSerializer(typeof(OrderedItem));

        // A FileStream is needed to read the XML document.
        FileStream fs = new FileStream(filename, FileMode.Open);
        XmlReader reader = XmlReader.Create(fs);

        // Declare an object variable of the type to be deserialized.
        OrderedItem i;

        // Use the Deserialize method to restore the object's state.
        i = (OrderedItem)serializer.Deserialize(reader);
        fs.Close();

        // Write out the properties of the object.
        Console.Write(
        i.ItemName + "\t" +
        i.Description + "\t" +
        i.UnitPrice + "\t" +
        i.Quantity + "\t" +
        i.LineTotal);
    }
}
Imports System.IO
Imports System.Text
Imports System.Xml
Imports System.Xml.Serialization

' This is the class that will be deserialized.
Public Class OrderedItem
    Public ItemName As String
    Public Description As String
    Public UnitPrice As Decimal
    Public Quantity As Integer
    Public LineTotal As Decimal
        
    ' A custom method used to calculate price per item.
    Public Sub Calculate()
        LineTotal = UnitPrice * Quantity
    End Sub
End Class

Public Class Test
    
    Public Shared Sub Main()
        Dim t As New Test()
        ' Read a purchase order.
        t.DeserializeObject("simple.xml")
    End Sub
      
    Private Sub DeserializeObject(ByVal filename As String)
        Console.WriteLine("Reading with XmlReader")
        
        ' Create an instance of the XmlSerializer specifying type and namespace.
        Dim serializer As New XmlSerializer(GetType(OrderedItem))
        
        ' A FileStream is needed to read the XML document.
        Dim fs As New FileStream(filename, FileMode.Open)
        Dim reader As XmlReader = XmlReader.Create(fs)
        
        ' Declare an object variable of the type to be deserialized.
        Dim i As OrderedItem
        
        ' Use the Deserialize method to restore the object's state.
        i = CType(serializer.Deserialize(reader), OrderedItem)
        fs.Close()

        ' Write out the properties of the object.
        Console.Write(i.ItemName & ControlChars.Tab & _
                      i.Description & ControlChars.Tab & _
                      i.UnitPrice & ControlChars.Tab & _
                      i.Quantity & ControlChars.Tab & _
                      i.LineTotal)
    End Sub
End Class
<?xml version="1.0"?>
 <OrderedItem xmlns:inventory="http://www.cpandl.com" xmlns:money="http://www.cohowinery.com">
   <inventory:ItemName>Widget</inventory:ItemName>
   <inventory:Description>Regular Widget</inventory:Description>
   <money:UnitPrice>2.3</money:UnitPrice>
   <inventory:Quantity>10</inventory:Quantity>
   <money:LineTotal>23</money:LineTotal>
 </OrderedItem>

설명

역직렬화는 XML 문서의 인스턴스를 읽고 문서의 XSD(XML 스키마)에 강력한 형식의 개체를 생성하는 프로세스입니다.

역직렬화 XmlSerializer 하기 전에 역직렬화되는 개체의 형식을 사용하여 생성해야 합니다.

XML XmlReader 문서에서 지정한 인코딩을 자동으로 검색하고 사용합니다.

참고

XmlSerializer 배열 및 배열 ArrayList List<T>은 역직렬화할 수 없습니다.

추가 정보

적용 대상

Deserialize(XmlReader, String)

지정된 XmlReader에 포함된 XML 문서와 인코딩 스타일을 역직렬화합니다.

public:
 System::Object ^ Deserialize(System::Xml::XmlReader ^ xmlReader, System::String ^ encodingStyle);
public object? Deserialize (System.Xml.XmlReader xmlReader, string? encodingStyle);
public object Deserialize (System.Xml.XmlReader xmlReader, string encodingStyle);
member this.Deserialize : System.Xml.XmlReader * string -> obj
Public Function Deserialize (xmlReader As XmlReader, encodingStyle As String) As Object

매개 변수

xmlReader
XmlReader

역직렬화할 XML 문서를 포함하는 XmlReader입니다.

encodingStyle
String

serialize된 XML의 인코딩 스타일입니다.

반환

Object

역직렬화된 개체입니다.

예외

deserialization 중 오류가 발생했습니다. InnerException 속성을 사용하여 원래 예외를 사용할 수 있습니다.

설명

역직렬화는 XML 문서의 인스턴스를 읽고 문서의 XSD(XML 스키마)에 강력한 형식의 개체를 생성하는 프로세스입니다.

역직렬화 XmlSerializer 하기 전에 역직렬화되는 개체의 형식을 사용하여 생성해야 합니다.

encodingStyle SOAP 버전 1.1 인코딩의 경우 매개 변수를 "http://schemas.xmlsoap.org/soap/encoding/"로 설정하고, 그렇지 않으면 SOAP 버전 1.2 인코딩에 대해 "http://www.w3.org/2001/12/soap-encoding"로 설정합니다.

참고XmlSerializer 배열 및 배열 ArrayList List<T>은 역직렬화할 수 없습니다.

추가 정보

적용 대상

Deserialize(XmlReader, XmlDeserializationEvents)

지정된 XmlReader에 포함된 XML 문서를 역직렬화하고 deserialization을 수행하는 동안 발생하는 이벤트를 재정의할 수 있도록 합니다.

public:
 System::Object ^ Deserialize(System::Xml::XmlReader ^ xmlReader, System::Xml::Serialization::XmlDeserializationEvents events);
public object? Deserialize (System.Xml.XmlReader xmlReader, System.Xml.Serialization.XmlDeserializationEvents events);
public object Deserialize (System.Xml.XmlReader xmlReader, System.Xml.Serialization.XmlDeserializationEvents events);
member this.Deserialize : System.Xml.XmlReader * System.Xml.Serialization.XmlDeserializationEvents -> obj
Public Function Deserialize (xmlReader As XmlReader, events As XmlDeserializationEvents) As Object

매개 변수

xmlReader
XmlReader

역직렬화할 문서가 포함된 XmlReader입니다.

events
XmlDeserializationEvents

XmlDeserializationEvents 클래스의 인스턴스입니다.

반환

Object

역직렬화되는 Object입니다.

설명

역직렬화할 개체입니다.

적용 대상

Deserialize(XmlReader, String, XmlDeserializationEvents)

지정된 XmlReader에 포함된 데이터를 사용하여 개체를 역직렬화합니다.

public:
 System::Object ^ Deserialize(System::Xml::XmlReader ^ xmlReader, System::String ^ encodingStyle, System::Xml::Serialization::XmlDeserializationEvents events);
public object? Deserialize (System.Xml.XmlReader xmlReader, string? encodingStyle, System.Xml.Serialization.XmlDeserializationEvents events);
public object Deserialize (System.Xml.XmlReader xmlReader, string encodingStyle, System.Xml.Serialization.XmlDeserializationEvents events);
member this.Deserialize : System.Xml.XmlReader * string * System.Xml.Serialization.XmlDeserializationEvents -> obj
Public Function Deserialize (xmlReader As XmlReader, encodingStyle As String, events As XmlDeserializationEvents) As Object

매개 변수

xmlReader
XmlReader

문서를 읽는 데 사용되는 XmlReader 클래스의 인스턴스입니다.

encodingStyle
String

사용되는 인코딩입니다.

events
XmlDeserializationEvents

XmlDeserializationEvents 클래스의 인스턴스입니다.

반환

Object

역직렬화할 개체입니다.

설명

이 메서드는 웹 서비스 시나리오에 대해서만 알 수 없는 헤더의 역직렬화에 필요합니다. 이 메서드를 사용하면 웹 서비스 메서드에서 이벤트 동기화를 방지할 수 있습니다.

적용 대상