Example #1
0
        public static SessionInfo GetSession(this WebServer server, WebSocketContext context)
#endif
        {
            return(server.SessionModule?.GetSession(context));
        }
Example #2
0
 /// <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));
 }
Example #3
0
 /// <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);
Example #4
0
 /// <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);