SessionServiceCollection docs

This commit is contained in:
Hisham Abdullah Bin Ateya 2015-06-26 04:05:55 +03:00
parent 32ecf485b9
commit e6afe46edc
1 changed files with 13 additions and 0 deletions

View File

@ -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)