public static SessionInfo GetSession(this WebServer server, WebSocketContext context) #endif { return(server.SessionModule?.GetSession(context)); }
/// <summary> /// Gets the session. /// </summary> /// <param name="server">The server.</param> /// <param name="context">The context.</param> /// <returns></returns> public static SessionInfo GetSession(this WebServer server, WebSocketContext context) { return(server.SessionModule == null ? null : server.SessionModule.GetSession(context)); }
/// <summary> /// Requests the regex URL parameters. /// </summary> /// <param name="context">The context.</param> /// <param name="urlPattern">The url pattern </param> /// <returns>The params from the request.</returns> public static Dictionary <string, object> RequestRegexUrlParams(this WebSocketContext context, string urlPattern) => RequestRegexUrlParams(context.RequestUri.LocalPath, urlPattern);
/// <summary> /// Gets the session. /// </summary> /// <param name="server">The server.</param> /// <param name="context">The context.</param> /// <returns>A session info for the given websocket context.</returns> public static SessionInfo GetSession(this WebServer server, WebSocketContext context) => server.SessionModule?.GetSession(context);