Add IsAvailable property to ISession #634

This commit is contained in:
John Luo 2016-05-19 12:44:54 -07:00
parent 504a825406
commit 6d91a160b6
3 changed files with 8 additions and 0 deletions

1
.gitignore vendored
View File

@ -27,3 +27,4 @@ nuget.exe
project.lock.json
.build/
.testPublish/
/.vs/

View File

@ -8,6 +8,11 @@ namespace Microsoft.AspNetCore.Http
{
public interface ISession
{
/// <summary>
/// Indicate whether the current session has loaded correctly.
/// </summary>
bool IsAvailable { get; }
/// <summary>
/// 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.

View File

@ -288,6 +288,8 @@ namespace Microsoft.AspNetCore.Http
public string Id { get; set; }
public bool IsAvailable { get; } = true;
public IEnumerable<string> Keys { get { return _store.Keys; } }
public void Clear()