Example #1
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>
#if NET47
        public static SessionInfo GetSession(this WebServer server, System.Net.WebSockets.WebSocketContext context)
Example #2
0
        public static SessionInfo GetSession(this WebServer server, WebSocketContext context)
#endif
        {
            return(server.SessionModule?.GetSession(context));
        }
Example #3
0
 /// <summary>
 ///     Gets the session object associated to the current context.
 ///     Returns null if the LocalSessionWebModule has not been loaded.
 /// </summary>
 /// <param name="server">The server.</param>
 /// <param name="context">The context.</param>
 /// <returns>A session info for the given server context.</returns>
 public static SessionInfo GetSession(this WebServer server, HttpListenerContext context)
 {
     return(server.SessionModule?.GetSession(context));
 }
Example #4
0
 /// <summary>
 ///     Deletes the given session object.
 /// </summary>
 /// <param name="server">The server.</param>
 /// <param name="session">The session info.</param>
 public static void DeleteSession(this WebServer server, SessionInfo session)
 {
     server.SessionModule?.DeleteSession(session);
 }
Example #5
0
 /// <summary>
 ///     Deletes the session object associated to the current context.
 /// </summary>
 /// <param name="server">The server.</param>
 /// <param name="context">The context.</param>
 public static void DeleteSession(this WebServer server, HttpListenerContext context)
 {
     server.SessionModule?.DeleteSession(context);
 }
Example #6
0
 /// <summary>
 ///     Deletes the session object associated to the current context.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="server">The server.</param>
 public static void DeleteSession(this HttpListenerContext context, WebServer server)
 {
     server.DeleteSession(context);
 }
Example #7
0
 /// <summary>
 ///     Gets the session object associated to the current context.
 ///     Returns null if the LocalSessionWebModule has not been loaded.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="server">The server.</param>
 /// <returns>A session object for the given server context.</returns>
 public static SessionInfo GetSession(this HttpListenerContext context, WebServer server)
 {
     return(server.GetSession(context));
 }