Beispiel #1
0
        static EnvShowFormater()
        {
            m_NumberConvertMethods = new Hashtable();
            m_NumberConvertMethods.Add(typeof(double), new GetNumberStringHandler(GetDoubleString));
            m_NumberConvertMethods.Add(typeof(decimal), new GetNumberStringHandler(GetDecimalString));
            m_NumberConvertMethods.Add(typeof(Int16), new GetNumberStringHandler(GetInt16String));
            m_NumberConvertMethods.Add(typeof(Int32), new GetNumberStringHandler(GetInt32String));
            m_NumberConvertMethods.Add(typeof(Int64), new GetNumberStringHandler(GetInt64String));
            m_NumberConvertMethods.Add(typeof(float), new GetNumberStringHandler(GetFloatString));
            m_NumberConvertMethods.Add(typeof(ushort), new GetNumberStringHandler(GetUShortString));
            m_NumberConvertMethods.Add(typeof(ulong), new GetNumberStringHandler(GetULongString));
            m_NumberConvertMethods.Add(typeof(uint), new GetNumberStringHandler(GetUIntString));

            m_CurrencyConvertMethods = new Hashtable();
            m_CurrencyConvertMethods.Add(typeof(double), new GetCurrencyStringHandler(GetDoubleCurrencyString));
            m_CurrencyConvertMethods.Add(typeof(decimal), new GetCurrencyStringHandler(GetDecimalCurrencyString));
            m_CurrencyConvertMethods.Add(typeof(Int16), new GetCurrencyStringHandler(GetInt16CurrencyString));
            m_CurrencyConvertMethods.Add(typeof(Int32), new GetCurrencyStringHandler(GetInt32CurrencyString));
            m_CurrencyConvertMethods.Add(typeof(Int64), new GetCurrencyStringHandler(GetInt64CurrencyString));
            m_CurrencyConvertMethods.Add(typeof(float), new GetCurrencyStringHandler(GetFloatCurrencyString));
            m_CurrencyConvertMethods.Add(typeof(ushort), new GetCurrencyStringHandler(GetUshortCurrencyString));
            m_CurrencyConvertMethods.Add(typeof(ulong), new GetCurrencyStringHandler(GetULongCurrencyString));
            m_CurrencyConvertMethods.Add(typeof(uint), new GetCurrencyStringHandler(GetUintCurrencyString));

            m_NumberFormatProvider = FormatManager.GetFormatProvider();
            m_DateFormatProvider   = FormatManager.GetFormatProvider("DateTimeFormatProvider");
        }
Beispiel #2
0
 static EnvConverter()
 {
     m_NumberFormatProvider = FormatManager.GetFormatProvider();
     m_DateFormatProvider   = FormatManager.GetFormatProvider("DateTimeFormatProvider");
 }