Exemple #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
        }
Exemple #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
        }
Exemple #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
        }
Exemple #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
        }
Exemple #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
        }