Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

CustomConverterConfigurer.CustomConverters Property

The custom converters to register.

[Visual Basic]
Public WriteOnly Property CustomConverters() As IDictionary
   Public Set
   End Set
End Property
public IDictionary CustomConverters { public set; }


The IDictionary uses the type name of the class that requires conversion as the key, and an instance of the TypeConverter that will effect the conversion. Alternatively, the actual Type of the class that requires conversion can be used as the key.


IDictionary converters = new Hashtable();
converters.Add( "System.Date", new MyCustomDateConverter() );
// a System.Type instance can also be used as the key...
converters.Add( typeof(Color), new MyCustomRBGColorConverter() );

See Also

CustomConverterConfigurer Class | Spring.Objects.Factory.Config Namespace