Esempio n. 1
0
 public static bool SupportsWebSockets(this HostContext context)
 {
     // The server needs to implement IWebSocketRequest for websockets to be supported.
     // It also needs to set the flag in the items collection.
     return(context.GetValue <bool>(HostConstants.SupportsWebSockets) &&
            context.Request is IWebSocketRequest);
 }
Esempio n. 2
0
 public static string InstanceName(this HostContext context)
 {
     return(context.GetValue <string>(HostConstants.InstanceName));
 }
Esempio n. 3
0
 public static CancellationToken HostShutdownToken(this HostContext context)
 {
     return(context.GetValue <CancellationToken>(HostConstants.ShutdownToken));
 }
Esempio n. 4
0
 public static string WebSocketServerUrl(this HostContext context)
 {
     return(context.GetValue <string>(HostConstants.WebSocketServerUrl));
 }
Esempio n. 5
0
 public static bool IsDebuggingEnabled(this HostContext context)
 {
     return(context.GetValue <bool>(HostConstants.DebugMode));
 }