Esempio n. 1
0
        public static List <EntryPoint> GetYieldCurveEntryPoint(long?idYc, DateTime?settlementDate)
        {
#if _LINQXML_
            return(DataHelperLinqXml.GetYieldCurveEntryData(idYc, settlementDate));
#elif _SQLITE_
            using (var ctx = new ConnectionContextSQLite())
            {
                return(DataHelperSQLite.GetYieldCurveEntryPoint(ctx, idYc, settlementDate));
            }
#else // _MYSQL_
            using (var ctx = new ConnectionContextMySQL())
            {
                return(DataHelper.GetYieldCurveEntryData(ctx, idYc, settlementDate));
            }
#endif
        }
Esempio n. 2
0
        public static List <YieldCurveFamily> GetYieldCurveFamily(long?idYcFamily, long?idCurrency)
        {
#if _LINQXML_
            return(DataHelperLinqXml.GetYieldCurveFamily(idYcFamily, idCurrency));
#elif _SQLITE_
            using (var ctx = new ConnectionContextSQLite())
            {
                return(DataHelperSQLite.GetYieldCurveFamily(ctx, idYcFamily, idCurrency));
            }
#else // _MYSQL
            using (var ctx = new ConnectionContextMySQL())
            {
                return(DataHelper.GetYieldCurveFamily(ctx, idYcFamily, idCurrency));
            }
#endif
        }
Esempio n. 3
0
        public static List <YieldCurveData> GetYieldCurveData(long?idYc)
        {
#if _LINQXML_
            return(DataHelperLinqXml.GetYieldCurveData(idYc));
#elif _SQLITE_
            using (var ctx = new ConnectionContextSQLite())
            {
                return(DataHelperSQLite.GetYieldCurveData(ctx, idYc));
            }
#else // _MYSQL_
            using (var ctx = new ConnectionContextMySQL())
            {
                return(DataHelper.GetYieldCurveData(ctx, idYc));
            }
#endif
        }
Esempio n. 4
0
        public static List <InflationRate> GetInflationRates()
        {
#if _LINQXML_
            //      return DataHelperLinqXml.GetInflationRates(null);
#elif _SQLITE_
            using (var ctx = new ConnectionContextSQLite())
            {
                return(DataHelperSQLite.GetInflationRates(ctx, null));
            }
#else // _MYSQL_
            using (var ctx = new ConnectionContextMySQL())
            {
                return(DataHelper.GetInflationRates(ctx, null));
            }
#endif
        }
Esempio n. 5
0
        public static List <RateHistory> GetRateHistory(DateTime?settlementDate)
        {
#if _LINQXML_
//			return DataHelperLinqXml.GetRateHistory(settlementDate);
#elif _SQLITE_
            using (var ctx = new ConnectionContextSQLite())
            {
                return(DataHelperSQLite.GetRateHistory(ctx, settlementDate));
            }
#else // _MYSQL_
            using (var ctx = new ConnectionContextMySQL())
            {
                return(DataHelper.GetRateHistory(ctx, settlementDate));
            }
#endif
        }
Esempio n. 6
0
        public static List <InflationIndex> GetInflationIndex(long?idIndex)
        {
#if _LINQXML_
//			return DataHelperLinqXml.GetInflationIndex(idIndex);
#elif _SQLITE_
            using (var ctx = new ConnectionContextSQLite())
            {
                return(DataHelperSQLite.GetInflationIndex(ctx, idIndex));
            }
#else // _MYSQL_
            using (var ctx = new ConnectionContextMySQL())
            {
                return(DataHelper.GetInflationIndex(ctx, idIndex));
            }
#endif
        }
Esempio n. 7
0
        /*
         * public static DayCounter GetDayCounter(string className)
         * {
         #if _LINQXML_
         *      return DataHelperLinqXml.GetDayCounter(null, className)[0];
         #else
         * using (var ctx = new ConnectionContext())
         * {
         * return DataHelper.GetDayCounter(ctx, className);
         * }
         #endif
         * }
         */
        public static List <Calendar> GetCalendars()
        {
#if _LINQXML_
            return(DataHelperLinqXml.GetCalendars());
#elif _SQLITE_
            using (var ctx = new ConnectionContextSQLite())
            {
                return(DataHelperSQLite.GetCalendars(ctx));
            }
#else // _MYSQL_
            using (var ctx = new ConnectionContextMySQL())
            {
                return(DataHelper.GetCalendars(ctx));
            }
#endif
        }
Esempio n. 8
0
        public static List <DayCounter> GetDayCounters()
        {
#if _LINQXML_
            return(DataHelperLinqXml.GetDayCounter(null, null));
#elif _SQLITE_
            using (var ctx = new ConnectionContextSQLite())
            {
                return(DataHelperSQLite.GetDayCounter(ctx, null, null));
            }
#else // _MYSQL_
            using (var ctx = new ConnectionContextMySQL())
            {
                return(DataHelper.GetDayCounter(ctx, null, null));
            }
#endif
        }