Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Commit 1f754f6

Browse files
committed
Add ISession.Id
1 parent 15649b7 commit 1f754f6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Microsoft.AspNetCore.Http.Features/ISession.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ namespace Microsoft.AspNetCore.Http.Features
88
{
99
public interface ISession
1010
{
11+
string Id { get; }
12+
13+
IEnumerable<string> Keys { get; }
14+
1115
Task LoadAsync();
1216

1317
Task CommitAsync();
@@ -19,7 +23,5 @@ public interface ISession
1923
void Remove(string key);
2024

2125
void Clear();
22-
23-
IEnumerable<string> Keys { get; }
2426
}
2527
}

test/Microsoft.AspNetCore.Http.Tests/DefaultHttpContextTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ private class TestSession : ISession
288288
private Dictionary<string, byte[]> _store
289289
= new Dictionary<string, byte[]>(StringComparer.OrdinalIgnoreCase);
290290

291+
public string Id { get; set; }
292+
291293
public IEnumerable<string> Keys { get { return _store.Keys; } }
292294

293295
public void Clear()

0 commit comments

Comments
 (0)