Add ISession.Id
This commit is contained in:
parent
15649b7e31
commit
1f754f65d3
|
|
@ -8,6 +8,10 @@ namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public interface ISession
|
public interface ISession
|
||||||
{
|
{
|
||||||
|
string Id { get; }
|
||||||
|
|
||||||
|
IEnumerable<string> Keys { get; }
|
||||||
|
|
||||||
Task LoadAsync();
|
Task LoadAsync();
|
||||||
|
|
||||||
Task CommitAsync();
|
Task CommitAsync();
|
||||||
|
|
@ -19,7 +23,5 @@ namespace Microsoft.AspNetCore.Http.Features
|
||||||
void Remove(string key);
|
void Remove(string key);
|
||||||
|
|
||||||
void Clear();
|
void Clear();
|
||||||
|
|
||||||
IEnumerable<string> Keys { get; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -288,6 +288,8 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
private Dictionary<string, byte[]> _store
|
private Dictionary<string, byte[]> _store
|
||||||
= new Dictionary<string, byte[]>(StringComparer.OrdinalIgnoreCase);
|
= new Dictionary<string, byte[]>(StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
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