Add IsAvailable property to ISession #634
This commit is contained in:
parent
504a825406
commit
6d91a160b6
|
|
@ -27,3 +27,4 @@ nuget.exe
|
||||||
project.lock.json
|
project.lock.json
|
||||||
.build/
|
.build/
|
||||||
.testPublish/
|
.testPublish/
|
||||||
|
/.vs/
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,11 @@ namespace Microsoft.AspNetCore.Http
|
||||||
{
|
{
|
||||||
public interface ISession
|
public interface ISession
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Indicate whether the current session has loaded correctly.
|
||||||
|
/// </summary>
|
||||||
|
bool IsAvailable { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A unique identifier for the current session. This is not the same as the session cookie
|
/// 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.
|
/// since the cookie lifetime may not be the same as the session entry lifetime in the data store.
|
||||||
|
|
|
||||||
|
|
@ -288,6 +288,8 @@ namespace Microsoft.AspNetCore.Http
|
||||||
|
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
public bool IsAvailable { get; } = true;
|
||||||
|
|
||||||
public IEnumerable<string> Keys { get { return _store.Keys; } }
|
public IEnumerable<string> Keys { get { return _store.Keys; } }
|
||||||
|
|
||||||
public void Clear()
|
public void Clear()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue