src/packages/EmbedIO/WebServerExtensions-SessionManager.cs
/// <summary>
/// <para>Creates a <see cref="LocalSessionManager"/> with all properties set to their default values
/// and sets it as session manager on an <see cref="IWebServer"/>.</para>
/// </summary>
/// <typeparam name="TWebServer">The type of the web server.</typeparam>
/// <param name="this">The <see cref="IWebServer"/> on which this method is called.</param>
/// <param name="configure">A callback used to configure the session manager.</param>
/// <returns><paramref name="this"/> with the session manager set.</returns>
/// <exception cref="NullReferenceException"><paramref name="this"/> is <see langword="null"/>.</exception>
/// <exception cref="InvalidOperationException">The web server has already been started.</exception>
Creates a  with all properties set to their default values
and sets it as session manager on an .
Creates a with all properties set to their default values and sets it as session manager on an .
public static TWebServer WithLocalSessionManager<TWebServer>(this TWebServer @this, Action<LocalSessionManager>? configure = null)
            where TWebServer : IWebServer
        {
            var sessionManager = new LocalSessionManager();
            configure?.Invoke(sessionManager);
            @this.SessionManager = sessionManager;
            return @this;
        }
public static TWebServer WithLocalSessionManager < TWebServer > ( this TWebServer @this , Action < LocalSessionManager > ? configure = null ) where TWebServer : IWebServer { var sessionManager = new LocalSessionManager ( ) ; configure ? . Invoke ( sessionManager ) ; @this . SessionManager = sessionManager ; return @this ; }
Creates a  with all properties set to their default values
and sets it as session manager on an .
Creates a with all properties set to their default values and sets it as session manager on an .
with the session manager set.
with the session manager set .
None
The web server has already been started.
The web server has already been started .
TWebServer
this
configure
Action<LocalSessionManager>?
A callback used to configure the session manager.
A callback used to configure the session manager .
this
The  on which this method is called.
The on which this method is called .
typeparam
The type of the web server.
The type of the web server .