C# 클래스 DotAmf.Serialization.DataContractAmfSerializer

Serializes objects to the Action Message Format (AMF) and deserializes AMF data to objects.
This class is thread-safe and is expensive to instantiate.
상속: System.Runtime.Serialization.XmlObjectSerializer
파일 보기 프로젝트 열기: artema/DotAmf 1 사용 예제들

공개 메소드들

메소드 설명
DataContractAmfSerializer ( Type type ) : System

Initializes a new instance of the DataContractAmfSerializer class to serialize or deserialize an object of the specified type.

DataContractAmfSerializer ( Type type, AmfEncodingOptions encodingOptions ) : System

Initializes a new instance of the DataContractAmfSerializer class to serialize or deserialize an object of the specified type.

DataContractAmfSerializer ( Type type, IEnumerable knownTypes ) : System

Initializes a new instance of the DataContractAmfSerializer class to serialize or deserialize an object of the specified type, and a collection of known types that may be present in the object graph.

DataContractAmfSerializer ( Type type, IEnumerable knownTypes, AmfEncodingOptions encodingOptions ) : System

Initializes a new instance of the DataContractAmfSerializer class to serialize or deserialize an object of the specified type, and a collection of known types that may be present in the object graph.

IsStartObject ( XmlDictionaryReader reader ) : bool

Gets a value that specifies whether the XmlDictionaryReader is positioned over an AMFX element that represents an object the serializer can deserialize from.

IsStartObject ( XmlReader reader ) : bool

Gets a value that specifies whether the XmlReader is positioned over an AMFX element that represents an object the serializer can deserialize from.

ReadObject ( Stream stream ) : object

Reads a document stream in the AMF (Action Message Format) format and returns the deserialized object.

ReadObject ( XmlDictionaryReader reader ) : object

Reads the XML document mapped from AMFX (Action Message Format in XML) with an XmlDictionaryReader and returns the deserialized object.

ReadObject ( XmlDictionaryReader reader, bool verifyObjectName ) : object

Reads the AMFX document mapped from AMF with an XmlDictionaryReader and returns the deserialized object; it also enables you to specify whether the serializer should verify that it is positioned on an appropriate element before attempting to deserialize.

ReadObject ( XmlReader reader ) : object

Reads the XML document mapped from AMFX (Action Message Format in XML) with an XmlReader and returns the deserialized object.

ReadObject ( XmlReader reader, bool verifyObjectName ) : object

Reads the AMFX document mapped from AMF with an XmlReader and returns the deserialized object; it also enables you to specify whether the serializer should verify that it is positioned on an appropriate element before attempting to deserialize.

ReadObject ( Stream stream, XmlWriter output ) : void

Reads a document stream in the AMF (Action Message Format) format and writes it in the AMFX (Action Message Format in XML) format,

WriteEndObject ( XmlDictionaryWriter writer ) : void
WriteEndObject ( XmlWriter writer ) : void
WriteObject ( Stream stream, XmlReader input ) : void

Reads a specified Action Message Format in XML (AMFX) data and writes the resulting AMF data to a stream.

WriteObject ( Stream stream, object graph ) : void

Serializes a specified object to Action Message Format (AMF) data and writes the resulting AMF to a stream.

WriteObject ( XmlWriter writer, object graph ) : void

Serializes an object to XML that may be mapped to Action Message Format in XML (AMFX). Writes all the object data, including the starting XML element, content, and closing element, with an XmlWriter.

WriteObjectContent ( XmlDictionaryWriter writer, object graph ) : void

Writes the XML content that can be mapped to Action Message Format (AMF) using an XmlDictionaryWriter.

WriteObjectContent ( XmlWriter writer, object graph ) : void

Writes the XML content that can be mapped to Action Message Format (AMF) using an XmlWriter.

WriteStartObject ( XmlDictionaryWriter writer, object graph ) : void
WriteStartObject ( XmlWriter writer, object graph ) : void

비공개 메소드들

메소드 설명
CreateDecoder ( AmfEncodingOptions encodingOptions ) : IAmfDecoder

Create AMF decoder.

CreateDefaultOptions ( ) : AmfEncodingOptions

Create default AMF encoding options.

CreateEncoder ( AmfEncodingOptions encodingOptions ) : IAmfEncoder

Create AMF encoder.

Deserialize ( XmlReader reader, SerializationContext context ) : object

Deserialize AMFX data.

DeserializePacket ( XmlReader reader, SerializationContext context ) : object

Deserialize an AMFX packet.

GetAmfxType ( Type type, bool &isDataContract ) : string

Get AMFX type for a CLR type.

GetEnumValue ( SerializationContext context, Type type, object value ) : object

Get a string representation of the enum value.

PrepareDataContract ( Type type ) : DataContractDescriptor>.KeyValuePair

Prepare a data contract.

PrepareDataContracts ( IEnumerable knownTypes ) : DataContractDescriptor>.Dictionary

Prepare data contracts.

ReadArray ( XmlReader reader, SerializationContext context ) : object
ReadByteArray ( XmlReader reader, SerializationContext context ) : byte[]
ReadDate ( XmlReader reader, SerializationContext context ) : System.DateTime
ReadDouble ( XmlReader reader ) : double
ReadInteger ( XmlReader reader ) : int
ReadObject ( XmlReader reader, SerializationContext context ) : object
ReadReference ( XmlReader reader, SerializationContext context ) : object
ReadString ( XmlReader reader, SerializationContext context ) : string
ReadXml ( XmlReader reader, SerializationContext context ) : System.Xml.Linq.XDocument
Serialize ( XmlWriter writer, object value, SerializationContext context ) : void

Serialize AMFX data.

SerializePacket ( XmlWriter writer, object graph, SerializationContext context ) : void

Serialize an AMFX packet.

WriteArray ( XmlWriter writer, object value, SerializationContext context ) : void

Write an array.

WriteByteArray ( XmlWriter writer, byte value, SerializationContext context ) : void

Write a byte array.

WriteDataContract ( XmlWriter writer, object graph, Type type, SerializationContext context, bool isDataContract ) : void

Write an object.

WriteDate ( XmlWriter writer, System.DateTime value, SerializationContext context ) : void

Write a date.

WriteElement ( XmlWriter writer, string elementName, string value, string>.IEnumerable attributes = null ) : void

Write an element.

WriteEmptyElement ( XmlWriter writer, string elementName, string>.IEnumerable attributes = null ) : void

Write an empty element.

WriteString ( XmlWriter writer, string value, SerializationContext context ) : void

Write a string.

WriteXml ( XmlWriter writer, System.Xml.Linq.XDocument value, SerializationContext context ) : void

Write an XML.

메소드 상세

DataContractAmfSerializer() 공개 메소드

Initializes a new instance of the DataContractAmfSerializer class to serialize or deserialize an object of the specified type.
At least one of the types being serialized or deserialized does not conform to data contract rules. /// For example, the DataContractAttribute attribute has not been applied to the type.
public DataContractAmfSerializer ( Type type ) : System
type System.Type A Type that specifies the type of the instances that is serialized or deserialized.
리턴 System

DataContractAmfSerializer() 공개 메소드

Initializes a new instance of the DataContractAmfSerializer class to serialize or deserialize an object of the specified type.
At least one of the types being serialized or deserialized does not conform to data contract rules. /// For example, the DataContractAttribute attribute has not been applied to the type.
public DataContractAmfSerializer ( Type type, AmfEncodingOptions encodingOptions ) : System
type System.Type A Type that specifies the type of the instances that is serialized or deserialized.
encodingOptions DotAmf.Data.AmfEncodingOptions AMF encoding options.
리턴 System

DataContractAmfSerializer() 공개 메소드

Initializes a new instance of the DataContractAmfSerializer class to serialize or deserialize an object of the specified type, and a collection of known types that may be present in the object graph.
At least one of the types being serialized or deserialized does not conform to data contract rules. /// For example, the DataContractAttribute attribute has not been applied to the type.
public DataContractAmfSerializer ( Type type, IEnumerable knownTypes ) : System
type System.Type A Type that specifies the type of the instances that is serialized or deserialized.
knownTypes IEnumerable An IEnumerable of Type that contains the types that may be present in the object graph.
리턴 System

DataContractAmfSerializer() 공개 메소드

Initializes a new instance of the DataContractAmfSerializer class to serialize or deserialize an object of the specified type, and a collection of known types that may be present in the object graph.
At least one of the types being serialized or deserialized does not conform to data contract rules. /// For example, the DataContractAttribute attribute has not been applied to the type.
public DataContractAmfSerializer ( Type type, IEnumerable knownTypes, AmfEncodingOptions encodingOptions ) : System
type System.Type A Type that specifies the type of the instances that is serialized or deserialized.
knownTypes IEnumerable An IEnumerable of Type that contains the types that may be present in the object graph.
encodingOptions DotAmf.Data.AmfEncodingOptions AMF encoding options.
리턴 System

IsStartObject() 공개 메소드

Gets a value that specifies whether the XmlDictionaryReader is positioned over an AMFX element that represents an object the serializer can deserialize from.
public IsStartObject ( XmlDictionaryReader reader ) : bool
reader System.Xml.XmlDictionaryReader The XmlDictionaryReader used to read the AMFX stream mapped from AMF.
리턴 bool

IsStartObject() 공개 메소드

Gets a value that specifies whether the XmlReader is positioned over an AMFX element that represents an object the serializer can deserialize from.
public IsStartObject ( XmlReader reader ) : bool
reader XmlReader The XmlReader used to read the AMFX stream mapped from AMF.
리턴 bool

ReadObject() 공개 메소드

Reads a document stream in the AMF (Action Message Format) format and returns the deserialized object.
Unable to resolve data contracts.
public ReadObject ( Stream stream ) : object
stream Stream The Stream to be read.
리턴 object

ReadObject() 공개 메소드

Reads the XML document mapped from AMFX (Action Message Format in XML) with an XmlDictionaryReader and returns the deserialized object.
Unable to resolve data contracts.
public ReadObject ( XmlDictionaryReader reader ) : object
reader System.Xml.XmlDictionaryReader XML reader.
리턴 object

ReadObject() 공개 메소드

Reads the AMFX document mapped from AMF with an XmlDictionaryReader and returns the deserialized object; it also enables you to specify whether the serializer should verify that it is positioned on an appropriate element before attempting to deserialize.
Unable to resolve data contracts.
public ReadObject ( XmlDictionaryReader reader, bool verifyObjectName ) : object
reader System.Xml.XmlDictionaryReader An XmlDictionaryReader used to read the AMFX document mapped from AMF.
verifyObjectName bool true to check whether the enclosing XML element name and namespace /// correspond to the expected name and namespace; otherwise, false to skip the verification.
리턴 object

ReadObject() 공개 메소드

Reads the XML document mapped from AMFX (Action Message Format in XML) with an XmlReader and returns the deserialized object.
Unable to resolve data contracts.
public ReadObject ( XmlReader reader ) : object
reader XmlReader XML reader.
리턴 object

ReadObject() 공개 메소드

Reads the AMFX document mapped from AMF with an XmlReader and returns the deserialized object; it also enables you to specify whether the serializer should verify that it is positioned on an appropriate element before attempting to deserialize.
Unable to resolve data contracts.
public ReadObject ( XmlReader reader, bool verifyObjectName ) : object
reader XmlReader An XmlReader used to read the AMFX document mapped from AMF.
verifyObjectName bool true to check whether the enclosing XML element name and namespace /// correspond to the expected name and namespace; otherwise, false to skip the verification.
리턴 object

ReadObject() 공개 메소드

Reads a document stream in the AMF (Action Message Format) format and writes it in the AMFX (Action Message Format in XML) format,
Unable to resolve data contracts.
public ReadObject ( Stream stream, XmlWriter output ) : void
stream Stream The Stream to be read.
output System.Xml.XmlWriter AMFX writer.
리턴 void

WriteEndObject() 공개 메소드

public WriteEndObject ( XmlDictionaryWriter writer ) : void
writer System.Xml.XmlDictionaryWriter
리턴 void

WriteEndObject() 공개 메소드

public WriteEndObject ( XmlWriter writer ) : void
writer System.Xml.XmlWriter
리턴 void

WriteObject() 공개 메소드

Reads a specified Action Message Format in XML (AMFX) data and writes the resulting AMF data to a stream.
Unable to resolve data contracts. Error during encoding.
public WriteObject ( Stream stream, XmlReader input ) : void
stream Stream The Stream to be written.
input XmlReader AMFX reader.
리턴 void

WriteObject() 공개 메소드

Serializes a specified object to Action Message Format (AMF) data and writes the resulting AMF to a stream.
Unable to resolve data contracts. Error during encoding.
public WriteObject ( Stream stream, object graph ) : void
stream Stream The Stream that is written to.
graph object The object that contains the data to write to the stream.
리턴 void

WriteObject() 공개 메소드

Serializes an object to XML that may be mapped to Action Message Format in XML (AMFX). Writes all the object data, including the starting XML element, content, and closing element, with an XmlWriter.
Unable to serialize data contracts.
public WriteObject ( XmlWriter writer, object graph ) : void
writer System.Xml.XmlWriter XML writer.
graph object Object graph.
리턴 void

WriteObjectContent() 공개 메소드

Writes the XML content that can be mapped to Action Message Format (AMF) using an XmlDictionaryWriter.
public WriteObjectContent ( XmlDictionaryWriter writer, object graph ) : void
writer System.Xml.XmlDictionaryWriter The XmlDictionaryWriter used to write to.
graph object The object to write.
리턴 void

WriteObjectContent() 공개 메소드

Writes the XML content that can be mapped to Action Message Format (AMF) using an XmlWriter.
public WriteObjectContent ( XmlWriter writer, object graph ) : void
writer System.Xml.XmlWriter The XmlWriter used to write to.
graph object The object to write.
리턴 void

WriteStartObject() 공개 메소드

public WriteStartObject ( XmlDictionaryWriter writer, object graph ) : void
writer System.Xml.XmlDictionaryWriter
graph object
리턴 void

WriteStartObject() 공개 메소드

public WriteStartObject ( XmlWriter writer, object graph ) : void
writer System.Xml.XmlWriter
graph object
리턴 void