コード例 #1
0
 public static Remoting GetInstance()
 {
     if (_theUniqueInstance == null)
     {
         return(_theUniqueInstance = new Remoting());
     }
     return(_theUniqueInstance);
 }
コード例 #2
0
ファイル: Timer.cs プロジェクト: logiciells/opencbs
        private void check_token_timeout(object sender, System.Timers.ElapsedEventArgs e)
        {
            System.Collections.IDictionary account_table = Remoting.GetAccountTable();

            foreach (System.Collections.DictionaryEntry cur_connec in account_table)
            {
                if (((UserRemotingContext)cur_connec.Value).Token.Timeout == _timeout)
                {
                    if (((UserRemotingContext)cur_connec.Value).Connection.State != ConnectionState.Closed)
                    {
                        Log.RemotingServiceLogger.Info("Supress the token unique string : " + ((UserRemotingContext)cur_connec.Value).Token.get_unique_string());
                        ((UserRemotingContext)cur_connec.Value).Connection.Close();
                    }
                    return;
                }
                ((UserRemotingContext)cur_connec.Value).Token.incr_timeout();
            }
        }
コード例 #3
0
 private ConnectionManager(string pLogin, string pPassword, string pServer, string pDatabase, string pTimeout)
 {
     _connectionManager = TechnicalSettings.UseOnlineMode
         ? Remoting.GetInstance()
         : Standard.GetInstance(pLogin, pPassword, pServer, pDatabase, pTimeout);
 }
コード例 #4
0
 private ConnectionManager()
 {
     _connectionManager = TechnicalSettings.UseOnlineMode ? Remoting.GetInstance() : Standard.GetInstance();
 }
コード例 #5
0
 public static bool CheckSQLServerConnection()
 {
     return(TechnicalSettings.UseOnlineMode
         ? Remoting.CheckSQLServerConnection()
         : Standard.CheckSQLServerConnection());
 }