diff --git a/src/Microsoft.AspNet.Session/SessionMiddleware.cs b/src/Microsoft.AspNet.Session/SessionMiddleware.cs
index 2735aa0126..dffbe01b76 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 2fd488820d..04f73dbd41 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 services to the DI container.
+ ///
public static class SessionServiceCollectionExtensions
{
+ ///
+ /// Adds services required for application session state.
+ ///
+ /// 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)