コード例 #1
0
ファイル: WebHandler.cs プロジェクト: BGCX261/zma-svn-to-git
        public WebHandler(MinecraftHandler mc, TcpTunnelServer tunnel)
        {
            this.tunnel = tunnel;
            this.mc = mc;
            string host = mc.Config.DatabaseHost;
            string user = mc.Config.DatabaseUser;
            string pass = mc.Config.DatabasePassword;
            string database = mc.Config.Database;
            int port = mc.Config.DatabasePort;

            sql = MySQLConnector.GetInstance();
            zma = new ZmaSQLConnection();
        }
コード例 #2
0
 public static MySQLConnector GetInstance()
 {
     // DoubleLock
     if (instance == null)
     {
         lock (m_lock)
         {
             if (instance == null)
             {
                 instance = new MySQLConnector();
             }
         }
     }
     return(instance);
 }
コード例 #3
0
 public static MySQLConnector GetInstance()
 {
     // DoubleLock
     if (instance == null)
     {
         lock (m_lock)
         {
             if (instance == null)
             {
                 instance = new MySQLConnector();
             }
         }
     }
     return instance;
 }