From e6afe46edca09b23320957ed6224ce00a3e081b8 Mon Sep 17 00:00:00 2001 From: Hisham Abdullah Bin Ateya Date: Fri, 26 Jun 2015 04:05:55 +0300 Subject: [PATCH 1/2] SessionServiceCollection docs --- .../SessionServiceCollectionExtensions.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Microsoft.AspNet.Session/SessionServiceCollectionExtensions.cs b/src/Microsoft.AspNet.Session/SessionServiceCollectionExtensions.cs index 2fd488820d..6e9e57d274 100644 --- a/src/Microsoft.AspNet.Session/SessionServiceCollectionExtensions.cs +++ b/src/Microsoft.AspNet.Session/SessionServiceCollectionExtensions.cs @@ -7,8 +7,16 @@ using Microsoft.Framework.Internal; namespace Microsoft.Framework.DependencyInjection { + /// + /// Extension methods for adding session servics to the DI container. + /// public static class SessionServiceCollectionExtensions { + /// + /// Adds services required for application session. + /// + /// The to add the services to. + /// The . public static IServiceCollection AddSession([NotNull] this IServiceCollection services) { services.AddOptions(); @@ -16,6 +24,11 @@ namespace Microsoft.Framework.DependencyInjection return services; } + /// + /// Configures the session. + /// + /// The to configure the services. + /// The session options to configure the middleware with. public static void ConfigureSession( [NotNull] this IServiceCollection services, [NotNull] Action configure) From 93490c4750d309d3a07371feade904cdc6b4c7d2 Mon Sep 17 00:00:00 2001 From: Hisham Abdullah Bin Ateya Date: Fri, 26 Jun 2015 04:06:03 +0300 Subject: [PATCH 2/2] SessionMiddleware docs Fix docs for SessionMiddleware Fix typos Fix docs --- src/Microsoft.AspNet.Session/SessionMiddleware.cs | 15 +++++++++++++++ .../SessionMiddlewareExtensions.cs | 8 ++++++++ .../SessionServiceCollectionExtensions.cs | 4 ++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNet.Session/SessionMiddleware.cs b/src/Microsoft.AspNet.Session/SessionMiddleware.cs index 57c1d8f5b9..da20fb3cbb 100644 --- a/src/Microsoft.AspNet.Session/SessionMiddleware.cs +++ b/src/Microsoft.AspNet.Session/SessionMiddleware.cs @@ -15,6 +15,9 @@ using Microsoft.Framework.OptionsModel; namespace Microsoft.AspNet.Session { + /// + /// Enables the session state for the application. + /// public class SessionMiddleware { private static readonly RandomNumberGenerator CryptoRandom = RandomNumberGenerator.Create(); @@ -25,6 +28,13 @@ namespace Microsoft.AspNet.Session private readonly ILogger _logger; private readonly ISessionStore _sessionStore; + /// + /// Creates a new . + /// + /// The representing the next middleware in the pipeline. + /// The representing the factory that used to create logger instances. + /// The representing the session store. + /// The session configuration options. public SessionMiddleware( [NotNull] RequestDelegate next, [NotNull] ILoggerFactory loggerFactory, @@ -38,6 +48,11 @@ namespace Microsoft.AspNet.Session _sessionStore.Connect(); } + /// + /// Invokes the logic of the middleware. + /// + /// The . + /// A that completes when the middleware has completed processing. public async Task Invoke(HttpContext context) { var isNewSessionKey = false; diff --git a/src/Microsoft.AspNet.Session/SessionMiddlewareExtensions.cs b/src/Microsoft.AspNet.Session/SessionMiddlewareExtensions.cs index 89273bc2fc..d4a2e322f9 100644 --- a/src/Microsoft.AspNet.Session/SessionMiddlewareExtensions.cs +++ b/src/Microsoft.AspNet.Session/SessionMiddlewareExtensions.cs @@ -6,8 +6,16 @@ using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Builder { + /// + /// Extension methods for adding the to an application. + /// public static class SessionMiddlewareExtensions { + /// + /// Adds the to automatically enable session state for the application. + /// + /// The . + /// The . public static IApplicationBuilder UseSession([NotNull] this IApplicationBuilder app) { return app.UseMiddleware(); diff --git a/src/Microsoft.AspNet.Session/SessionServiceCollectionExtensions.cs b/src/Microsoft.AspNet.Session/SessionServiceCollectionExtensions.cs index 6e9e57d274..04f73dbd41 100644 --- a/src/Microsoft.AspNet.Session/SessionServiceCollectionExtensions.cs +++ b/src/Microsoft.AspNet.Session/SessionServiceCollectionExtensions.cs @@ -8,12 +8,12 @@ using Microsoft.Framework.Internal; namespace Microsoft.Framework.DependencyInjection { /// - /// Extension methods for adding session servics to the DI container. + /// Extension methods for adding session services to the DI container. /// public static class SessionServiceCollectionExtensions { /// - /// Adds services required for application session. + /// Adds services required for application session state. /// /// The to add the services to. /// The .