Skip to content

Commit ad2a64f

Browse files
authored
Merge pull request #29 from sebastiano1972/master
Added a set of key-values pairs to SSEClient
2 parents e3a980e + 31a1143 commit ad2a64f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Lib.AspNetCore.ServerSentEvents/IServerSentEventsClient.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections.Generic;
23
using System.Threading;
34
using System.Threading.Tasks;
45
using System.Security.Claims;
@@ -25,6 +26,11 @@ public interface IServerSentEventsClient
2526
/// Gets the value indicating if client is connected.
2627
/// </summary>
2728
bool IsConnected { get; }
29+
30+
/// <summary>
31+
/// A set of key-values pairs to store pieces of information that can be used to select clients when sending events.
32+
/// </summary>
33+
IDictionary<string, string> Properties { get; }
2834
#endregion
2935

3036
#region Methods

Lib.AspNetCore.ServerSentEvents/ServerSentEventsClient.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections.Generic;
23
using System.Threading;
34
using System.Threading.Tasks;
45
using System.Security.Claims;
@@ -30,6 +31,11 @@ public sealed class ServerSentEventsClient : IServerSentEventsClient
3031
/// Gets the value indicating if client is connected.
3132
/// </summary>
3233
public bool IsConnected { get; internal set; }
34+
35+
/// <summary>
36+
/// A set of key-values pairs to store pieces of information that can be used to select clients when sending events.
37+
/// </summary>
38+
public IDictionary<string, string> Properties { get; } = new Dictionary<string, string>();
3339
#endregion
3440

3541
#region Constructor

0 commit comments

Comments
 (0)