diff --git a/build/dependencies.props b/build/dependencies.props
index 87455c487f..cc21468618 100644
--- a/build/dependencies.props
+++ b/build/dependencies.props
@@ -22,11 +22,11 @@
2.1.0-preview2-30319
2.1.0-preview2-30319
2.1.0-preview2-30319
- 2.1.0-a-preview2-move-transfer-format-17581
+ 2.1.0-a-preview2-connection-items-17583
2.1.0-preview2-30319
2.1.0-preview2-30319
0.5.0-preview2-30319
- 2.1.0-a-preview2-move-transfer-format-17581
+ 2.1.0-a-preview2-connection-items-17583
2.1.0-preview2-30319
2.1.0-preview2-30319
2.1.0-preview2-30319
diff --git a/client-ts/FunctionalTests/TestHub.cs b/client-ts/FunctionalTests/TestHub.cs
index 6867cb6604..e8a9d12b0c 100644
--- a/client-ts/FunctionalTests/TestHub.cs
+++ b/client-ts/FunctionalTests/TestHub.cs
@@ -55,7 +55,7 @@ namespace FunctionalTests
public string GetActiveTransportName()
{
- return Context.Connection.Metadata[ConnectionMetadataNames.Transport].ToString();
+ return Context.Connection.Items[ConnectionMetadataNames.Transport].ToString();
}
public ComplexObject EchoComplexObject(ComplexObject complexObject)
diff --git a/samples/SocialWeather/PersistentConnectionLifeTimeManager.cs b/samples/SocialWeather/PersistentConnectionLifeTimeManager.cs
index 7924a6e61b..00d625ff5c 100644
--- a/samples/SocialWeather/PersistentConnectionLifeTimeManager.cs
+++ b/samples/SocialWeather/PersistentConnectionLifeTimeManager.cs
@@ -23,9 +23,9 @@ namespace SocialWeather
public void OnConnectedAsync(ConnectionContext connection)
{
- connection.Features.Get().Metadata["groups"] = new HashSet();
+ connection.Items["groups"] = new HashSet();
var format = connection.GetHttpContext().Request.Query["formatType"].ToString();
- connection.Features.Get().Metadata["format"] = format;
+ connection.Items["format"] = format;
if (string.Equals(format, "protobuf", StringComparison.OrdinalIgnoreCase))
{
var transferFormatFeature = connection.Features.Get();
@@ -47,7 +47,7 @@ namespace SocialWeather
foreach (var connection in _connectionList)
{
var context = connection.GetHttpContext();
- var formatter = _formatterResolver.GetFormatter((string)connection.Features.Get().Metadata["format"]);
+ var formatter = _formatterResolver.GetFormatter((string)connection.Items["format"]);
var ms = new MemoryStream();
await formatter.WriteAsync(data, ms);
@@ -72,7 +72,7 @@ namespace SocialWeather
public void AddGroupAsync(ConnectionContext connection, string groupName)
{
- var groups = (HashSet)connection.Features.Get().Metadata["groups"];
+ var groups = (HashSet)connection.Items["groups"];
lock (groups)
{
groups.Add(groupName);
@@ -81,7 +81,7 @@ namespace SocialWeather
public void RemoveGroupAsync(ConnectionContext connection, string groupName)
{
- var groups = (HashSet)connection.Features.Get().Metadata["groups"];
+ var groups = (HashSet)connection.Items["groups"];
if (groups != null)
{
lock (groups)
diff --git a/samples/SocialWeather/SocialWeatherEndPoint.cs b/samples/SocialWeather/SocialWeatherEndPoint.cs
index d8a4e1b80a..f6f5c58b6c 100644
--- a/samples/SocialWeather/SocialWeatherEndPoint.cs
+++ b/samples/SocialWeather/SocialWeatherEndPoint.cs
@@ -35,7 +35,7 @@ namespace SocialWeather
public async Task ProcessRequests(ConnectionContext connection)
{
var formatter = _formatterResolver.GetFormatter(
- (string)connection.Features.Get().Metadata["format"]);
+ (string)connection.Items["format"]);
while (true)
{
diff --git a/samples/SocketsSample/EndPoints/MessagesEndPoint.cs b/samples/SocketsSample/EndPoints/MessagesEndPoint.cs
index 7b2c9a7c79..038e8873fa 100644
--- a/samples/SocketsSample/EndPoints/MessagesEndPoint.cs
+++ b/samples/SocketsSample/EndPoints/MessagesEndPoint.cs
@@ -19,7 +19,7 @@ namespace SocketsSample.EndPoints
{
Connections.Add(connection);
- await Broadcast($"{connection.ConnectionId} connected ({connection.Features.Get().Metadata[ConnectionMetadataNames.Transport]})");
+ await Broadcast($"{connection.ConnectionId} connected ({connection.Items[ConnectionMetadataNames.Transport]})");
try
{
@@ -52,7 +52,7 @@ namespace SocketsSample.EndPoints
{
Connections.Remove(connection);
- await Broadcast($"{connection.ConnectionId} disconnected ({connection.Features.Get().Metadata[ConnectionMetadataNames.Transport]})");
+ await Broadcast($"{connection.ConnectionId} disconnected ({connection.Items[ConnectionMetadataNames.Transport]})");
}
}
diff --git a/src/Microsoft.AspNetCore.SignalR.Core/HubConnectionContext.cs b/src/Microsoft.AspNetCore.SignalR.Core/HubConnectionContext.cs
index 8ac0995832..c07d8b4280 100644
--- a/src/Microsoft.AspNetCore.SignalR.Core/HubConnectionContext.cs
+++ b/src/Microsoft.AspNetCore.SignalR.Core/HubConnectionContext.cs
@@ -52,7 +52,7 @@ namespace Microsoft.AspNetCore.SignalR
public virtual IFeatureCollection Features => _connectionContext.Features;
- public virtual IDictionary