/// <summary> /// /// </summary> protected static SQLiteADOPersistenceHelper CreatePersistenceHelper(PlatformSettings settings) { SQLiteADOPersistenceHelper helper = new SQLiteADOPersistenceHelper(); if (helper.Initialize(settings.GetMappedPath("DataStoreDBPath"), true) == false) { return(null); } if (helper.ContainsTable("DataStoreEntries") == false) {// Create the table structure. helper.ExecuteCommand(ForexPlatformPersistence.Properties.Settings.Default.DataStoreDBSchema); } helper.SetupTypeMapping(typeof(DataStoreEntry), "DataStoreEntries"); return(helper); }
/// <summary> /// Helper, creates the correspoding persistence helper. /// </summary> protected static SQLiteADOPersistenceHelper CreatePersistenceHelper(PlatformSettings settings) { SQLiteADOPersistenceHelper helper = new SQLiteADOPersistenceHelper(); if (helper.Initialize(settings.GetMappedPath("EventsDBPath"), true) == false) { return(null); } if (helper.ContainsTable("Events") == false) {// Create the table structure. object result = helper.ExecuteCommand(ForexPlatformPersistence.Properties.Settings.Default.EventsDBSchema); } helper.SetupTypeMapping(typeof(EventSource), "EventSources"); helper.SetupTypeMapping(typeof(EventBase), "Events"); return(helper); }
/// <summary> /// Helper, creates the persistence helper for the platform. /// </summary> protected static SQLiteADOPersistenceHelper CreatePlatformPersistenceHelper(PlatformSettings settings) { SQLiteADOPersistenceHelper helper = new SQLiteADOPersistenceHelper(); if (helper.Initialize(settings.GetMappedPath("PlatformDBPath"), true) == false) { return null; } if (helper.ContainsTable("Platforms") == false) {// Create the table structure. helper.ExecuteCommand(ForexPlatformPersistence.Properties.Settings.Default.PlatformDBSchema); } helper.SetupTypeMapping(typeof(Platform), "Platforms"); helper.SetupTypeMapping(typeof(PlatformComponent), "PlatformComponents"); return helper; }