Esempio n. 1
0
        public static List <EntryPoint> GetEntryPointByInstrument(Instrument instr)
        {
#if _LINQXML_
            DataHelperLinqXml.GetEntryPointByRateIdType(ref ep);
#elif _SQLITE_
            using (var ctx = new ConnectionContextSQLite())
            {
                return(DataHelperSQLite.GetEntryPointByInstrument(ctx, instr));
            }
#else // _MYSQL_
            using (var ctx = new ConnectionContextMySQL())
            {
                DataHelper.GetEntryPointByRateIdType(ctx, ref ep);
            }
#endif
        }
Esempio n. 2
0
        public static void UpdateEntryPoint(EntryPoint ep)
        {
#if _LINQXML_
            DataHelperLinqXml.UpdateEntryPoint(ep);
#elif _SQLITE_
            using (var ctx = new ConnectionContextSQLite())
            {
                DataHelperSQLite.UpdateEntryPoint(ctx, ep);
            }
#else // _MYSQL_
            using (var ctx = new ConnectionContextMySQL())
            {
                DataHelper.UpdateEntryPoint(ctx, ep);
            }
#endif
        }
Esempio n. 3
0
        //
        // DataFeed
        //

        public static List <YieldCurveDefinition> GetYieldCurveDef(long?idYc)
        {
#if _LINQXML_
            return(DataHelperLinqXml.GetYieldCurveDef(idYc));
#elif _SQLITE_
            using (var ctx = new ConnectionContextSQLite())
            {
                return(DataHelperSQLite.GetYieldCurveDef(ctx, idYc));
            }
#else // _MYSQL_
            using (var ctx = new ConnectionContextMySQL())
            {
                return(DataHelper.GetYieldCurveData(ctx, idYc));
            }
#endif
        }
Esempio n. 4
0
        public static List <EntryPoint> GetAllEntryPoints(bool isDemo)
        {
#if _LINQXML_
            return(DataHelperLinqXml.GetAllEntryPoints());
#elif _SQLITE_
            using (var ctx = new ConnectionContextSQLite())
            {
                return(DataHelperSQLite.GetAllEntryPoints(ctx, isDemo));
            }
#else // _MYSQL_
            using (var ctx = new ConnectionContextMySQL())
            {
                return(DataHelper.GetAllEntryPoints(ctx));
            }
#endif
        }
Esempio n. 5
0
        public static void AddEntryPointHistory(List <EntryPoint> epl)
        {
#if _LINQXML_
            DataHelperLinqXml.AddEntryPointHistory(epl);
#elif _SQLITE_
            using (var ctx = new ConnectionContextSQLite())
            {
                DataHelperSQLite.AddEntryPointHistory(ctx, epl);
            }
#else // _MYSQL_
            using (var ctx = new ConnectionContextMySQL())
            {
                DataHelper.AddEntryPointHistory(ctx, epl);
            }
#endif
        }