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