C# Class SimpleFramework.Xml.Util.RegistryBinder

The RegistryBinder object is used acquire converters using a binding between a type and its converter. All converters instantiated are cached internally to ensure that the overhead of acquiring a converter is reduced. Converters are created on demand to ensure they are instantiated only if required.
Show file Open project: ngallagher/simplexml Class Usage Examples

Public Methods

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

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 this binder. 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 this binder. 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.

RegistryBinder ( ) : System

Constructor for the RegistryBinder object. This is used to create bindings 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 properties to XML.
public Bind ( Class type, Class converter ) : void
type Class /// this is the object type to bind to a converter ///
converter Class /// this is the converter class to be used ///
return void

Create() public method

This is used to acquire a Converter instance from this binder. 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 this binder. 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 Lookup ( Class type ) : Converter
type Class /// this is the type to find the converter for ///
return Converter

RegistryBinder() public method

Constructor for the RegistryBinder object. This is used to create bindings 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 RegistryBinder ( ) : System
return System