Beispiel #1
0
        /// <summary>
        /// Gets the specified request.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>System.Object.</returns>
        public object Get(GetSystemInfo request)
        {
            var result = _appHost.GetSystemInfo();

            return(ToOptimizedResult(result));
        }
Beispiel #2
0
        /// <summary>
        /// Gets the specified request.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>System.Object.</returns>
        public async Task <object> Get(GetSystemInfo request)
        {
            var result = await _appHost.GetSystemInfo().ConfigureAwait(false);

            return(ToOptimizedResult(result));
        }
Beispiel #3
0
 public async Task <ActionResult <SystemInfo> > GetSystemInfo()
 {
     return(await _appHost.GetSystemInfo(CancellationToken.None).ConfigureAwait(false));
 }
 /// <summary>
 /// Gets the data to send.
 /// </summary>
 /// <param name="state">The state.</param>
 /// <returns>Task{SystemInfo}.</returns>
 protected override Task <SystemInfo> GetDataToSend(object state)
 {
     return(Task.FromResult(_appHost.GetSystemInfo()));
 }
 /// <summary>
 /// Gets the data to send.
 /// </summary>
 /// <param name="state">The state.</param>
 /// <returns>Task{SystemInfo}.</returns>
 protected override Task <SystemInfo> GetDataToSend(WebSocketListenerState state)
 {
     return(_appHost.GetSystemInfo());
 }
Beispiel #6
0
 /// <summary>
 /// Handles the HasPendingRestartChanged event of the kernel control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
 void kernel_HasPendingRestartChanged(object sender, EventArgs e)
 {
     _serverManager.SendWebSocketMessage("RestartRequired", _appHost.GetSystemInfo());
 }
Beispiel #7
0
 public ActionResult<SystemInfo> GetSystemInfo()
 {
     return _appHost.GetSystemInfo(Request);
 }
Beispiel #8
0
 public ActionResult <SystemInfo> GetSystemInfo()
 {
     return(_appHost.GetSystemInfo(Request.HttpContext.Connection.RemoteIpAddress ?? IPAddress.Loopback));
 }
Beispiel #9
0
 /// <summary>
 /// Gets the data to send.
 /// </summary>
 /// <param name="state">The state.</param>
 /// <returns>Task{SystemInfo}.</returns>
 protected override Task <SystemInfo> GetDataToSend(WebSocketListenerState state, CancellationToken cancellationToken)
 {
     return(_appHost.GetSystemInfo(cancellationToken));
 }