コード例 #1
0
ファイル: DatabaseManager.cs プロジェクト: Dextan/Estrella
 /// <summary>
 /// Constructs a DatabaseManager for a given DatabaseServer and Database.
 /// </summary>
 /// <param name="pServer">The DatabaseServer for this database proxy.</param>
 /// <param name="pDatabase">The Database for this database proxy.</param>
 public DatabaseManager(DatabaseServer pServer, Database pDatabase, int MaxCacheQuerysPerClientCount, int Overloadflags)
 {
     this.MaxCacheQuerysPerClient = MaxCacheQuerysPerClientCount;
     this.overloadflags = Overloadflags;
     mServer = pServer;
     mDatabase = pDatabase;
     mLockObject = new object();
 }
コード例 #2
0
ファイル: DatabaseManager.cs プロジェクト: Dextan/Estrella
 /// <summary>
 /// Constructs a DatabaseManager for given database server and database details.
 /// </summary>
 /// <param name="sServer">The network host of the database server, eg 'localhost' or '85.214.55.189'.</param>
 /// <param name="Port">The network port of the database server as an unsigned 32 bit integer.</param>
 /// <param name="sUser">The username to use when connecting to the database.</param>
 /// <param name="sPassword">The password to use in combination with the username when connecting to the database.</param>
 /// <param name="sDatabase">The name of the database to connect to.</param>
 /// <param name="minPoolSize">The minimum connection pool size for the database.</param>
 /// <param name="maxPoolSize">The maximum connection pool size for the database.</param>
 public DatabaseManager(string sServer, uint Port, string sUser, string sPassword, string sDatabase, uint minPoolSize, uint maxPoolSize, int MaxQueryCountPerClient,int OverloadFlags)
 {
     mServer = new DatabaseServer(sServer, Port, sUser, sPassword);
     mDatabase = new Database(sDatabase, minPoolSize, maxPoolSize);
     this.MaxCacheQuerysPerClient = MaxQueryCountPerClient;
     overloadflags = OverloadFlags;
     mClientMonitor = new Task(MonitorClientsLoop);
     //mClientMonitor.Priority = ThreadPriority.Lowest;
     mLockObject = new object();
     mClientMonitor.Start();
 }