public ConfigServerHeartBeatTask(string cluster, ConfigurationServer configServer, int heartBeatInterval, int interval)
 {
     _configServer = configServer;
     _interval     = interval;
     _cluster      = cluster;
     _maxInterval  = 3 * (heartBeatInterval == 0 ? 10 : heartBeatInterval);
 }
Example #2
0
        static void Main(string[] args)
        {
            try
            {
                IUnityContainer container = new UnityContainer();

                ConfigServer _ConfigServer = ConfigurationServer.ReadConfigFromFile("user.json");

                container.RegisterSingleton <GeneralChatInfo>(new InjectionConstructor(1, "General", "Server"));

                container.RegisterSingleton <IHandlerRequestFromClient, HandlerRequestFromClient>();

                container.RegisterSingleton <ITransportServer, WsServer>(new InjectionConstructor(new IPEndPoint(IPAddress.Any, _ConfigServer.Port), container.Resolve <IHandlerRequestFromClient>()));

                container.RegisterType <IHandlerRequestToData, RequestManagerDb>();

                container.RegisterSingleton <HandlerConnection>();
                container.RegisterSingleton <HandlerChat>();
                container.RegisterSingleton <HandlerMessage>();

                container.Resolve <HandlerMessage>();

                Console.ReadLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                Console.ReadLine();
            }
        }
 public DifferentialRestoreJobInfo(ClusterRecoveryJob jobInfo, ConfigurationServer configurationServer)
 {
     Cluster = string.Empty;
     Shard   = string.Empty;
     _job    = jobInfo;
     _parent = configurationServer;
 }
Example #4
0
        private void ServerChanged()
        {
            long startTicks = Log.VIEW("Enter", Common.PROJECT_NAME);

            try
            {
                if (ConfigurationServer != null)
                {
                    ConfigurationServer.Dispose();
                }

                // TODO(crhodes)
                // This might be the place to handle authentication.

                ConfigurationServer = VNCTFS.Helper.Get_ConfigurationServer(serverProvider.Uri);

                btnLoad_TFS_Collections.Visibility = Visibility.Visible;

                liTeamProjectCollection.Visibility  = Visibility.Hidden;
                liTeamProjectCollection2.Visibility = Visibility.Hidden;

                Common.EventAggregator.GetEvent <EnableMainUIEvent>().Publish(Visibility.Hidden);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }

            Log.VIEW("Exit", Common.PROJECT_NAME, startTicks);
        }
Example #5
0
 public ConfigrationMonitorSession(ConfigurationServer server, UserCredentials credentials)
 {
     this.configServer = server;
     //ConfigurationProvider.Provider = this;
     this._sessionStartTime = DateTime.Now;
     _sessionid             = Guid.NewGuid().ToString();
     _rpcService            = new Common.RPCFramework.RPCService <ConfigrationMonitorSession>(new TargetObject <ConfigrationMonitorSession>(this));
 }
Example #6
0
 public ConfigurationHost()
 {
     _sessionManager = new SessionManager();
     ManagementHost.RegisterCompactTypes();
     _configurationServer = new ConfigurationServer();
     Initialize();
     _sessionManager.ConfigServer = _configurationServer;
 }
Example #7
0
 private void barButtonItem7_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         cs = new ConfigurationServer();
         cs.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
        public ShardConfigurationSession(ConfigurationServer service, string cluster, string shard, ServerNode server)
        {
            this.service          = service;
            this.cluster          = cluster;
            this.shard            = shard;
            this.server           = server;
            this.sessionStartTime = DateTime.Now;
            this.sessionId        = Guid.NewGuid().ToString();

            this.ConfigurationProvider = new ConfigurationProvider();

            this._traceProvider = new TraceProvider();
        }
        public Database()
        {
            ConfigurationServer configurationServer = new ConfigurationServer();
            List <string>       parametrs           = configurationServer.connectionString();

            this.ip       = parametrs[0];
            this.port     = parametrs[1];
            this.database = parametrs[2];
            this.username = parametrs[3];
            this.password = parametrs[4];
            observers     = new List <IObserver>();
            dInfo         = new DatabaseInfo();
        }
Example #10
0
        public void Init()
        {
            try
            {
                Configuration = new Config();
                Configuration.Init();
                TfsUri = new Uri(Configuration.ServerUrl); //new Uri(@"http://localhost:8088/tfs/");
                var credentials = new NetworkCredential(Configuration.TfsUserName, Configuration.TfsPassword);
                ConfigurationServer             = TfsConfigurationServerFactory.GetConfigurationServer(TfsUri);
                ConfigurationServer.Credentials = credentials;
                ConfigurationServer.Authenticate();
                _tfsHelpers = new TfsHelpers(ConfigurationServer);

                //               _topLevelStatsTimer = new Timer(PrintTopLevelStats, null, 0, 30*1000);
            }
            catch (Exception e)
            {
                e.Error();
                throw;
            }
        }
 public void Connect(string serviceURI, SessionTypes sessionType)
 {
     _server = new ConfigurationServer();
     _server.Start();
 }
Example #12
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ConfigurationServer c = new ConfigurationServer();

            c.Show();
        }
Example #13
0
 public ConfigurationCluster(string localServerIP, ConfigurationServer server)
 {
     _localServerIP     = localServerIP;
     _reconnectInterval = new TimeSpan(0, 0, 5);
     _cfgServer         = server;
 }
Example #14
0
 public void Initialize(ConfigurationServer configurationServer)
 {
     ConfigurationServer = configurationServer;
 }