C# Класс WebApplications.Utilities.Serialization.XmlFormatter

Наследование: IFormatter
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
CanSerialize bool
Deserialize object
DetermineValue object
GetMemberInfo IEnumerable
GetMemberValue object
GetXmlSafeElementName string
InitializeObject object
PopulateSerializationInfo void
Serialize void
WriteAttributes void
WriteValueElement void
WriteValueElement void

Открытые методы

Метод Описание
Deserialize ( [ serializationStream ) : object

Deserializes an object from the passed stream.

Serialize ( Stream serializationStream, object objectToSerialize ) : void

Serializes the specified object to the provided Stream.

XmlFormatter ( ) : System

Initializes a new instance of the XmlFormatter class. The serialization context is set be a persisted store.

XmlFormatter ( ISurrogateSelector surrogateSelector, StreamingContext streamingContext ) : System

Initializes a new instance of the XmlFormatter class.

Приватные методы

Метод Описание
CanSerialize ( [ member ) : bool

Determines whether the passed member is public, not static, and writable.

Deserialize ( [ serializationStream, Type objectType ) : object

Deserializes an object from the given Stream for the given Type.

DetermineValue ( [ reader, [ converter, [ objectType ) : object

Determines the value of an object.

GetMemberInfo ( object objectToSerialize, [ objectToSerializeType, [ converter ) : IEnumerable
GetMemberValue ( [ item, [ member ) : object

Gets the value of a member from the provided object.

GetXmlSafeElementName ( [ name ) : string
InitializeObject ( [ reader, [ converter, Type objectType ) : object

Reads an object from the XML and initializes it.

PopulateSerializationInfo ( [ reader, [ converter, [ info ) : void

Populates the serialized members in the System.Runtime.Serialization.SerializationInfo.

Serialize ( [ writer, [ converter, [ elementName, [ objectToSerialize, [ objectType ) : void

Serializes the object using the passed System.Xml.XmlTextWriter.

WriteAttributes ( [ writer, [ objectType, bool includeArrayAttribute ) : void

Writes the Type and includeArrayAttribute attributes to the element

WriteValueElement ( [ writer, CustomSerializationEntry entry ) : void

Writes a simple element to the writer. The name of the element is the name of the object Type.

WriteValueElement ( [ tagName, [ writer, CustomSerializationEntry entry ) : void

Writes a simple element to the writer.

Описание методов

Deserialize() публичный Метод

Deserializes an object from the passed stream.
public Deserialize ( [ serializationStream ) : object
serializationStream [ The stream to deserialize the object from.
Результат object

Serialize() публичный Метод

Serializes the specified object to the provided Stream.
/// is . ///
public Serialize ( Stream serializationStream, object objectToSerialize ) : void
serializationStream Stream The stream to serialize to.
objectToSerialize object The object to serialize.
Результат void

XmlFormatter() публичный Метод

Initializes a new instance of the XmlFormatter class. The serialization context is set be a persisted store.
public XmlFormatter ( ) : System
Результат System

XmlFormatter() публичный Метод

Initializes a new instance of the XmlFormatter class.
public XmlFormatter ( ISurrogateSelector surrogateSelector, StreamingContext streamingContext ) : System
surrogateSelector ISurrogateSelector /// The surrogate selector. /// This selects which surrogate to use in the serialization/deserialization process. ///
streamingContext System.Runtime.Serialization.StreamingContext The streaming context.
Результат System