/// <summary>
        /// Configures this instance.
        /// </summary>
        public void Configure()
        {
            // not sure on this, but i consider it (the load) a critical section
            while (!Synchronise.Start())
            {
                Synchronise.WaitTillReady();
            }

            var loadPath = GetLoadPath();

            if (!File.Exists(loadPath))
            {
                Console.Publish($"File not found: {loadPath}");
                Synchronise.Finish();
                return;
            }

            // TODO: fix this, not the right method of flow control, but stops the auto reset holding up the load if we get a de-serialisation error
            SafeActions.Try(() =>
            {
                Initialise(loadPath);
                PerformHealthCheck();
                PerformSupplmentalLoad(Configured as TConcrete);
            });

            Synchronise.Finish();
        }
コード例 #2
0
 public void Drop()
 {
     SafeActions.Try(() => SQLDatabase.Execute(GetDropTableSQL()));
 }
 public static void DropTable(string tableName)
 {
     SafeActions.Try(() => Execute($"drop table [{tableName}]"));
 }