using System;

namespace XGame.Framework.Database
{
    public partial class DatabaseModule
    {
        private static DatabaseModule _instance;
        public static IDatabaseModule Instance 
        { 
            get 
            {
                if(_instance == null)
                {
                    _instance = new DatabaseModule();
                }
                return _instance; 
            }
        }
        public static void Dispose()
        {
            (_instance as IDisposable)?.Dispose();
            _instance = null;
        }
    }
}
