/// <summary> /// Adds instances of type handlers to the internal cache. /// </summary> static TypeHandlerFactory() { CACHE[typeof(Boolean)] = new BooleanTypeHandler(); CACHE[typeof(Char)] = new CharTypeHandler(); CACHE[typeof(DateTime)] = new DateTimeTypeHandler(); CACHE[typeof(Decimal)] = new DecimalTypeHandler(); CACHE[typeof(Double)] = new DoubleTypeHandler(); CACHE[typeof(float)] = new FloatTypeHandler(); CACHE[typeof(int)] = new IntegerTypeHandler(); CACHE[typeof(long)] = new LongTypeHandler(); CACHE[typeof(short)] = new ShortTypeHandler(); }
public void DoubleConverterTest01() { const string val = "foo123.123"; Assert.IsNull(DoubleTypeHandler.Convert(val)); }
void ITabularTextInitalizableDataItem.Initialize(string[] values) { _v1 = StringTypeHandler.Convert(DataItemUtilities.ProcessPattern(values[0], __patterns__[0])); _v2 = DoubleTypeHandler.Convert(values[1]); _v3 = StringTypeHandler.Convert(DataItemUtilities.ProcessPattern(values[2], __patterns__[1])); }
public void DoubleConverterTest00() { const string val = "123.123"; Assert.AreEqual(123.123, DoubleTypeHandler.Convert(val)); }