コード例 #1
0
        public WrappedHttpListenerContext(IServerInfo serverInfo, HttpListenerContext listenerContext)
        {
            ServerInfo = serverInfo;
            Request = new WrappedHttpListenerRequest(listenerContext.Request);
            Response = new WrappedHttpListenerResponse(listenerContext.Response);

            InitializeSession();
        }
コード例 #2
0
ファイル: UpdaterViewModel.cs プロジェクト: kib357/Ester2
        public UpdaterViewModel(IEventAggregator eventAggregator, IDataTransport dataTransport, IServerInfo serverInfo, ISessionInfo sessionInfo)
        {
            _eventAggregator = eventAggregator;

            _serverInfo = serverInfo;
            _sessionInfo = sessionInfo;

            // _isVisible = Visibility.Visible;
            _isVisible = Visibility.Collapsed;
            LastTime = AutoRestartTime;

            _dataTransport = dataTransport;

            RestartAppCommand = new DelegateCommand<object>(RestartApp);
            WaitForUpdateCommand = new DelegateCommand<object>(UpdateAbortedByUser);

            _checkTimer = new DispatcherTimer { Interval = new TimeSpan(0, 0, _serverInfo.UpdateInterval, 0) };
            _checkTimer.Tick += StartCheckUpdatesThread;
            _restartTimer = new DispatcherTimer { Interval = new TimeSpan(0, 0, 0, 1) };
            _restartTimer.Tick += RestartTimerTick;
        }
コード例 #3
0
 public ResultBuilder(Statement statement, Action receiveOneAction, IServerInfo server, IResultResourceHandler resourceHandler = null)
 {
     _summaryBuilder  = new SummaryBuilder(statement, server);
     _resourceHandler = resourceHandler;
     SetReceiveOneAction(receiveOneAction);
 }
コード例 #4
0
ファイル: MainTest.cs プロジェクト: ypeng-ming/SuperSocket
 public MyLocalTestService(IServerInfo server)
 {
     Server = server;
 }
コード例 #5
0
 public ResultCursorBuilder(string statement, IDictionary <string, object> parameters,
                            Func <Task> receiveOneFunc, IServerInfo server, IResultResourceHandler resourceHandler = null)
     : this(new Statement(statement, parameters), receiveOneFunc, server, resourceHandler)
 {
 }
コード例 #6
0
 partial void IsSupported_PreCondition(IServerInfo instance, ref String feature);
コード例 #7
0
 partial void Features_SetCondition(ref IServerInfo instance, ref IEnumerable <String> setValue);
コード例 #8
0
 public TextInterfaceModule(IServerControl control, IServerInfo info)
     : base("Text Interface", "Text Interface")
 {
     Data.Control = control;
     Data.Info    = info;
 }
コード例 #9
0
        public UpdaterViewModel(IEventAggregator eventAggregator, IDataTransport dataTransport, IServerInfo serverInfo, ISessionInfo sessionInfo)
        {
            _eventAggregator = eventAggregator;

            _serverInfo  = serverInfo;
            _sessionInfo = sessionInfo;

            // _isVisible = Visibility.Visible;
            _isVisible = Visibility.Collapsed;
            LastTime   = AutoRestartTime;

            _dataTransport = dataTransport;

            RestartAppCommand    = new DelegateCommand <object>(RestartApp);
            WaitForUpdateCommand = new DelegateCommand <object>(UpdateAbortedByUser);

            _checkTimer = new DispatcherTimer {
                Interval = new TimeSpan(0, 0, _serverInfo.UpdateInterval, 0)
            };
            _checkTimer.Tick += StartCheckUpdatesThread;
            _restartTimer     = new DispatcherTimer {
                Interval = new TimeSpan(0, 0, 0, 1)
            };
            _restartTimer.Tick += RestartTimerTick;
        }
コード例 #10
0
 public SummaryBuilder(Query query, IServerInfo serverInfo)
 {
     Query  = query;
     Server = serverInfo;
 }
コード例 #11
0
 public SummaryCollector(Statement statement, IServerInfo server)
 {
     _summaryBuilder = new SummaryBuilder(statement, server);
 }
コード例 #12
0
 // Token: 0x06001821 RID: 6177 RVA: 0x00088E1A File Offset: 0x0008721A
 public void connect(IServerInfo newServerInfo)
 {
     this.serverInfo = newServerInfo;
 }
コード例 #13
0
 void IAppSession.Initialize(IServerInfo server, IChannel channel)
 {
     Server    = server;
     StartTime = DateTime.Now;
     _channel  = channel;
 }
コード例 #14
0
 public SummaryCollectorV3(Statement statement, IServerInfo server) : base(statement, server)
 {
 }
コード例 #15
0
ファイル: LoginViewModel.cs プロジェクト: kib357/Ester2
        public LoginViewModel(IEventAggregator eventAggregator, IDataTransport dataTransport, IServerInfo serverInfo, EsterBootstrapper esterBootstrapper)
        {
            _esterBootstrapper = esterBootstrapper;
            _esterBootstrapper.BootProgressChangedEvent += OnBootProgressChanged;
            _eventAggregator = eventAggregator;
            _dataTransport = dataTransport;
            _serverInfo = serverInfo;

            LoginCommand = new DelegateCommand<object>(Login);
            LoginAdUserCommand = new DelegateCommand<object>(LoginAdUser);

            Language = InputLanguageManager.Current.CurrentInputLanguage.TwoLetterISOLanguageName.ToUpper();
            InputLanguageManager.Current.InputLanguageChanged += InputLanguageChanged;

            _eventAggregator.GetEvent<ApplicationLoadedEvent>().Subscribe(OnApplicationLoaded, ThreadOption.UIThread);

            ////todo: убрать на продакшн
            UserName = "******";
        }
コード例 #16
0
 public ResultBuilder(Statement statement, Action receiveOneAction, IServerInfo server, IResultResourceHandler resourceHandler = null)
     : base(statement, server)
 {
     SetReceiveOneAction(receiveOneAction);
     _resourceHandler = resourceHandler;
 }
コード例 #17
0
 public DataTransport(IServerInfo serverInfo, ISessionInfo sessionInfo)
 {
     _sessionInfo = sessionInfo;
     _serverInfo  = serverInfo;
 }
コード例 #18
0
 public GetServerInfo(
     IServerInfo serverInfo)
 {
     ServerInfo = serverInfo;
 }
コード例 #19
0
 public SummaryBuilder(Statement statement, IServerInfo serverInfo)
 {
     Statement = statement;
     Server    = serverInfo;
 }
コード例 #20
0
        protected override string ProcessMessage(string nick, string message)
        {
            var m = Regex.Match(message, @"~(gs|gameservers)\s*(?<server>.+)?", RegexOptions.Compiled | RegexOptions.IgnoreCase);

            if (m.Success)
            {
                if (String.IsNullOrEmpty(m.Groups["server"].Value))
                {
                    bool first   = true;
                    var  servers = new StringBuilder("Gameservers: ");
                    foreach (var s in this.config.Servers)
                    {
                        if (first)
                        {
                            first = false;
                        }
                        else
                        {
                            servers.Append(", ");
                        }

                        servers.Append(s.Name);
                        servers.Append(" [");
                        servers.Append(s.Host);
                        servers.Append(":");
                        servers.Append(s.Port);
                        servers.Append("][");
                        servers.Append(this.GetServer(s.Name).GetType().Name);
                        servers.Append("]");
                    }

                    return(servers.ToString());
                }
                else
                {
                    var server = this.GetServer(m.Groups["server"].Value);
                    if (server != null)
                    {
                        try
                        {
                            if (!server.IsConnected)
                            {
                                server.Connect();
                            }

                            IServerInfo           serverInfo = server.GetServerInfo();
                            IEnumerable <IPlayer> players    = server.GetPlayers();

                            var serverMessage = new StringBuilder(serverInfo.ServerName);
                            serverMessage.Append(" playing ");
                            serverMessage.Append(serverInfo.MapName);
                            serverMessage.Append(" Players [");
                            serverMessage.Append(serverInfo.NumPlayers);
                            serverMessage.Append("/");
                            serverMessage.Append(serverInfo.MaxPlayers);
                            serverMessage.Append("]: ");

                            bool first = true;
                            foreach (var player in players)
                            {
                                if (first)
                                {
                                    first = false;
                                }
                                else
                                {
                                    serverMessage.Append(", ");
                                }

                                serverMessage.Append(player.Name);
                            }

                            return(serverMessage.ToString());
                        }
                        catch (GameServerException ex)
                        {
                            return("Querying '" + server.Host + "' failed: " + ex.Message);
                        }
                    }
                }
            }

            return(null);
        }
コード例 #21
0
 public QualityDefinitionService(IServerInfo serverInfo)
 {
     _serverInfo = serverInfo;
 }
コード例 #22
0
 public void Initialize(IServerInfo server, IChannel channel)
 {
     Server    = server;
     StartTime = DateTimeOffset.Now;
     _channel  = channel;
 }
コード例 #23
0
 partial void IsSupported_PostValidate(IServerInfo instance, String feature);
コード例 #24
0
 /// <summary>
 /// 注册客户端通道
 /// </summary>
 /// <param name="server"></param>
 public static void RegisterClientChannel(IServerInfo server)
 {
     RegisterClientChannel(server.Protocal);
 }
コード例 #25
0
 public ResultCursorBuilder(Statement statement, Func <Task> receiveOneFunc, IServerInfo server, IResultResourceHandler resourceHandler = null)
     : base(statement, server)
 {
     SetReceiveOneFunc(receiveOneFunc);
     _resourceHandler = resourceHandler;
 }
コード例 #26
0
        /// <summary>
        /// 注册通道的服务
        /// </summary>
        /// <param name="server"></param>
        public static void RegisterService(IServerInfo server)
        {
            TaskRequest request = new TaskRequest();

            JinRi.Notify.Frame.RegisterService.TaskRequestService.Register(request, server.ServerCode);
        }
コード例 #27
0
 internal static SocketConnection NewSocketConnection(ISocketClient socketClient = null, IMessageResponseHandler handler = null, IServerInfo server = null)
 {
     socketClient = socketClient ?? SocketClient;
     server       = server ?? Server;
     return(new SocketConnection(socketClient, AuthToken, UserAgent, Logger, server, handler));
 }
コード例 #28
0
 /// <summary>
 /// 注销通道的服务
 /// </summary>
 /// <param name="server"></param>
 public static void UnregisterService(IServerInfo server)
 {
     JinRi.Notify.Frame.RegisterService.TaskRequestService.Unregister(server.ServerCode);
 }
コード例 #29
0
 public QualityProfileService(IServerInfo serverInfo)
 {
     _serverInfo = serverInfo;
 }
コード例 #30
0
ファイル: SonarrApi.cs プロジェクト: aelfa/trash-updater
 public SonarrApi(IServerInfo serverInfo)
 {
     _serverInfo = serverInfo;
 }
コード例 #31
0
 public ResultBuilder(string statement, IDictionary <string, object> parameters,
                      Action receiveOneAction, IServerInfo server, IResultResourceHandler resourceHandler = null)
     : this(new Statement(statement, parameters), receiveOneAction, server, resourceHandler)
 {
 }
コード例 #32
0
 public CustomFormatService(IServerInfo serverInfo)
 {
     _serverInfo = serverInfo;
 }
コード例 #33
0
ファイル: DatabaseInfo.cs プロジェクト: zhh007/CKGen
 internal DatabaseInfo(ServerInfo server)
 {
     this._server = server;
     this.loader = server.Loader;
 }
コード例 #34
0
 /// <summary>
 /// 分布式任务分配算法
 /// </summary>
 /// <param name="taskInfo">任务信息</param>
 /// <param name="info">服务器信息</param>
 /// <returns>是否在此服务器上执行任务(true:是,false:否)</returns>
 public bool Alloc(ITaskInfo taskInfo, IServerInfo info)
 {
     return(true);
 }