C# Class WebApplications.Utilities.Serialization.XmlFormatter

Inheritance: IFormatter
Afficher le fichier Open project: webappsuk/CoreLibraries

Private Properties

Свойство Type Description
CanSerialize bool
Deserialize object
DetermineValue object
GetMemberInfo IEnumerable
GetMemberValue object
GetXmlSafeElementName string
InitializeObject object
PopulateSerializationInfo void
Serialize void
WriteAttributes void
WriteValueElement void
WriteValueElement void

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

Deserialize() public méthode

Deserializes an object from the passed stream.
public Deserialize ( [ serializationStream ) : object
serializationStream [ The stream to deserialize the object from.
Résultat object

Serialize() public méthode

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.
Résultat void

XmlFormatter() public méthode

Initializes a new instance of the XmlFormatter class. The serialization context is set be a persisted store.
public XmlFormatter ( ) : System
Résultat System

XmlFormatter() public méthode

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.
Résultat System