SessionServiceCollection docs
This commit is contained in:
parent
32ecf485b9
commit
e6afe46edc
|
|
@ -7,8 +7,16 @@ using Microsoft.Framework.Internal;
|
|||
|
||||
namespace Microsoft.Framework.DependencyInjection
|
||||
{
|
||||
/// <summary>
|
||||
/// Extension methods for adding session servics to the DI container.
|
||||
/// </summary>
|
||||
public static class SessionServiceCollectionExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds services required for application session.
|
||||
/// </summary>
|
||||
/// <param name="services">The <see cref="IServiceCollection"/> to add the services to.</param>
|
||||
/// <returns>The <see cref="IServiceCollection"/>.</returns>
|
||||
public static IServiceCollection AddSession([NotNull] this IServiceCollection services)
|
||||
{
|
||||
services.AddOptions();
|
||||
|
|
@ -16,6 +24,11 @@ namespace Microsoft.Framework.DependencyInjection
|
|||
return services;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configures the session.
|
||||
/// </summary>
|
||||
/// <param name="services">The <see cref="IServiceCollection"/> to configure the services.</param>
|
||||
/// <param name="configure">The session options to configure the middleware with.</param>
|
||||
public static void ConfigureSession(
|
||||
[NotNull] this IServiceCollection services,
|
||||
[NotNull] Action<SessionOptions> configure)
|
||||
|
|
|
|||
Loading…
Reference in New Issue