diff --git a/.gitignore b/.gitignore index a2eb01c895..0f91ad1208 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ nuget.exe project.lock.json .build/ .testPublish/ +/.vs/ diff --git a/src/Microsoft.AspNetCore.Http.Features/ISession.cs b/src/Microsoft.AspNetCore.Http.Features/ISession.cs index 74b63baa62..c3e4df60e7 100644 --- a/src/Microsoft.AspNetCore.Http.Features/ISession.cs +++ b/src/Microsoft.AspNetCore.Http.Features/ISession.cs @@ -8,6 +8,11 @@ namespace Microsoft.AspNetCore.Http { public interface ISession { + /// + /// Indicate whether the current session has loaded correctly. + /// + bool IsAvailable { get; } + /// /// A unique identifier for the current session. This is not the same as the session cookie /// since the cookie lifetime may not be the same as the session entry lifetime in the data store. diff --git a/test/Microsoft.AspNetCore.Http.Tests/DefaultHttpContextTests.cs b/test/Microsoft.AspNetCore.Http.Tests/DefaultHttpContextTests.cs index b88e90a5b9..13b9ee65cc 100644 --- a/test/Microsoft.AspNetCore.Http.Tests/DefaultHttpContextTests.cs +++ b/test/Microsoft.AspNetCore.Http.Tests/DefaultHttpContextTests.cs @@ -288,6 +288,8 @@ namespace Microsoft.AspNetCore.Http public string Id { get; set; } + public bool IsAvailable { get; } = true; + public IEnumerable Keys { get { return _store.Keys; } } public void Clear()