.NET Portable TypeCast  3.1.0.4
A, easy-to-use tested, generic, portable, runtime-extensible, arbitrary type converter library
Core.TypeCast.Converters.ConverterDefaults Class Reference

Converts between object and the most common System types in the System namespace. More...

+ Collaboration diagram for Core.TypeCast.Converters.ConverterDefaults:

Public Member Functions

 ConverterDefaults (IConverterCollection collection)
 Initializes a new instance of the ConverterDefaults class, and adds converters for the most common types of the System namespace. More...
 

Properties

NumberFormatInfo NumberFormat [get, set]
 Gets or sets the Converters NumberFormatInfo, which is copied from ConverterCollectionSettings.NumberFormat upon creating an new instance of ConverterDefaults More...
 

Detailed Description

Converts between object and the most common System types in the System namespace.

The reverse, converting from common System Types to object is not sensible as a simple boxing operation suffices.

Definition at line 23 of file ConverterDefaults.cs.

Constructor & Destructor Documentation

Core.TypeCast.Converters.ConverterDefaults.ConverterDefaults ( IConverterCollection  collection)

Initializes a new instance of the ConverterDefaults class, and adds converters for the most common types of the System namespace.

Definition at line 34 of file ConverterDefaults.cs.

34  : base(collection)
35  {
36  this.self = this.GetType();
37 
38  // use a custom number format, set in the ConverterCollection instance
39  this.NumberFormat = collection.Settings.NumberFormat as NumberFormatInfo;
40 
41  // convert from `string` to `System.T`
42  this.AddObjectConverter(collection: collection);
43  }
NumberFormatInfo NumberFormat
Gets or sets the Converters NumberFormatInfo, which is copied from ConverterCollectionSettings.NumberFormat upon creating an new instance of ConverterDefaults

Property Documentation

NumberFormatInfo Core.TypeCast.Converters.ConverterDefaults.NumberFormat
getset

Gets or sets the Converters NumberFormatInfo, which is copied from ConverterCollectionSettings.NumberFormat upon creating an new instance of ConverterDefaults

Definition at line 49 of file ConverterDefaults.cs.


The documentation for this class was generated from the following file: