C# Class SimpleFramework.Xml.Util.Registry

The Registry represents an object that is used to register bindings between a class and a converter implementation. Converter instances created by this registry are lazily created and cached so that they are instantiated only once. This ensures that the overhead of serialization is reduced.
Show file Open project: ngallagher/simplexml Class Usage Examples

Public Methods

Method Description
Bind ( Class type, Class converter ) : Registry

This is used to register a binding between a type and the converter used to serialize and deserialize it. During the serialization process the converters are retrieved and used to convert the object members to XML.

Bind ( Class type, Converter converter ) : Registry

This is used to register a binding between a type and the converter used to serialize and deserialize it. During the serialization process the converters are retrieved and used to convert the object properties to XML.

Create ( Class type ) : Converter

This is used to acquire a Converter instance from the registry. All instances are cached to reduce the overhead of lookups during the serialization process. Converters are lazily instantiated and so are only created if demanded.

Lookup ( Class type ) : Converter

This is used to acquire a Converter instance from the registry. All instances are cache to reduce the overhead of lookups during the serialization process. Converters are lazily instantiated and so are only created if demanded.

Registry ( ) : System

Constructor for the Registry object. This is used to create a registry between classes and the converters that should be used to serialize and deserialize the instances. All converters are instantiated once and cached for reuse.

Method Details

Bind() public method

This is used to register a binding between a type and the converter used to serialize and deserialize it. During the serialization process the converters are retrieved and used to convert the object members to XML.
public Bind ( Class type, Class converter ) : Registry
type Class /// this is the object type to bind to a converter ///
converter Class /// this is the converter class to be used ///
return Registry

Bind() public method

This is used to register a binding between a type and the converter used to serialize and deserialize it. During the serialization process the converters are retrieved and used to convert the object properties to XML.
public Bind ( Class type, Converter converter ) : Registry
type Class /// this is the object type to bind to a converter ///
converter Converter /// this is the converter instance to be used ///
return Registry

Create() public method

This is used to acquire a Converter instance from the registry. All instances are cached to reduce the overhead of lookups during the serialization process. Converters are lazily instantiated and so are only created if demanded.
public Create ( Class type ) : Converter
type Class /// this is the type to find the converter for ///
return Converter

Lookup() public method

This is used to acquire a Converter instance from the registry. All instances are cache to reduce the overhead of lookups during the serialization process. Converters are lazily instantiated and so are only created if demanded.
public Lookup ( Class type ) : Converter
type Class /// this is the type to find the converter for ///
return Converter

Registry() public method

Constructor for the Registry object. This is used to create a registry between classes and the converters that should be used to serialize and deserialize the instances. All converters are instantiated once and cached for reuse.
public Registry ( ) : System
return System