Exemplo n.º 1
0
        /// <summary>
        /// Destroy the singleton
        /// Only for use with GUI configurator.
        /// </summary>
        public static void Destroy()
        {
            _instance._SQL.Close();
            _instance._SQL.Dispose();
            _instance._SQL  = null;
            _instance._file = null;

            _instance = null;

            GC.WaitForPendingFinalizers();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Singleton Static Startup Function.
 /// Warning: Use this only once...
 /// </summary>
 /// <param name="file">The location of the Conversation SQL Lite Database file.</param>
 public static void Initialize(FileInfo file)
 {
     if (file.Exists)
     {
         _instance = new Conversational(file);
     }
     else
     {
         throw new ApplicationException("Conversational was unable to find it's mind.");
     }
 }