diff --git a/src/Microsoft.Azure.SignalR.Common/Endpoints/ServiceEndpoint.cs b/src/Microsoft.Azure.SignalR.Common/Endpoints/ServiceEndpoint.cs index 6292b42f2..b5bf4cd3b 100644 --- a/src/Microsoft.Azure.SignalR.Common/Endpoints/ServiceEndpoint.cs +++ b/src/Microsoft.Azure.SignalR.Common/Endpoints/ServiceEndpoint.cs @@ -70,8 +70,6 @@ public Uri ClientEndpoint internal string AudienceBaseUrl { get; } - internal string? Version { get; } - internal IAccessKey AccessKey { get @@ -182,7 +180,6 @@ public ServiceEndpoint(ServiceEndpoint other) ConnectionString = other.ConnectionString; EndpointType = other.EndpointType; Name = other.Name; - Version = other.Version; Endpoint = other.Endpoint; AudienceBaseUrl = other.AudienceBaseUrl; diff --git a/src/Microsoft.Azure.SignalR.Common/Utilities/ConnectionStringParser.cs b/src/Microsoft.Azure.SignalR.Common/Utilities/ConnectionStringParser.cs index f4668c479..60ebc2742 100644 --- a/src/Microsoft.Azure.SignalR.Common/Utilities/ConnectionStringParser.cs +++ b/src/Microsoft.Azure.SignalR.Common/Utilities/ConnectionStringParser.cs @@ -153,7 +153,6 @@ internal static ParsedConnectionString Parse(string connectionString) { ClientEndpoint = clientEndpointUri, AccessKey = accessKey, - Version = version, ServerEndpoint = serverEndpointUri }; } diff --git a/src/Microsoft.Azure.SignalR.Common/Utilities/ParsedConnectionString.cs b/src/Microsoft.Azure.SignalR.Common/Utilities/ParsedConnectionString.cs index b84f6685c..fdc6ae07b 100644 --- a/src/Microsoft.Azure.SignalR.Common/Utilities/ParsedConnectionString.cs +++ b/src/Microsoft.Azure.SignalR.Common/Utilities/ParsedConnectionString.cs @@ -17,8 +17,6 @@ internal class ParsedConnectionString internal Uri? ServerEndpoint { get; set; } - internal string? Version { get; set; } - public ParsedConnectionString(Uri endpoint) { Endpoint = endpoint; diff --git a/src/Microsoft.Azure.SignalR/EndpointProvider/DefaultServiceEndpointGenerator.cs b/src/Microsoft.Azure.SignalR/EndpointProvider/DefaultServiceEndpointGenerator.cs index 11d9a5214..8a9f4298f 100644 --- a/src/Microsoft.Azure.SignalR/EndpointProvider/DefaultServiceEndpointGenerator.cs +++ b/src/Microsoft.Azure.SignalR/EndpointProvider/DefaultServiceEndpointGenerator.cs @@ -14,8 +14,6 @@ internal sealed class DefaultServiceEndpointGenerator : IServiceEndpointGenerato private const string ServerPath = "server"; - public string? Version { get; } - public string AudienceBaseUrl { get; } public string ClientEndpoint { get; } @@ -24,7 +22,6 @@ internal sealed class DefaultServiceEndpointGenerator : IServiceEndpointGenerato public DefaultServiceEndpointGenerator(ServiceEndpoint endpoint) { - Version = endpoint.Version; AudienceBaseUrl = endpoint.AudienceBaseUrl; ClientEndpoint = endpoint.ClientEndpoint.AbsoluteUri; ServerEndpoint = endpoint.ServerEndpoint.AbsoluteUri; diff --git a/test/Microsoft.Azure.SignalR.Common.Tests/Auth/ConnectionStringParserTests.cs b/test/Microsoft.Azure.SignalR.Common.Tests/Auth/ConnectionStringParserTests.cs index 411bcae65..66c484748 100644 --- a/test/Microsoft.Azure.SignalR.Common.Tests/Auth/ConnectionStringParserTests.cs +++ b/test/Microsoft.Azure.SignalR.Common.Tests/Auth/ConnectionStringParserTests.cs @@ -113,7 +113,6 @@ public void TestAzureApplication(string connectionString) var key = Assert.IsType(r.AccessKey); Assert.IsType(key.TokenCredential); Assert.Same(r.Endpoint, r.AccessKey.Endpoint); - Assert.Null(r.Version); Assert.Null(r.ClientEndpoint); } @@ -139,15 +138,6 @@ public void TestServerEndpoint(string connectionString, string expectedServerEnd Assert.Equal(expectedPort, r.ServerEndpoint?.Port); } - [Theory] - [ClassData(typeof(VersionTestData))] - public void TestVersion(string connectionString, string expectedVersion) - { - var r = ConnectionStringParser.Parse(connectionString); - Assert.Same(r.Endpoint, r.AccessKey.Endpoint); - Assert.Equal(expectedVersion, r.Version); - } - [Theory] [InlineData("https://aaa", "endpoint=https://aaa;AuthType=azure;clientId=xxxx;")] // should ignore the clientId [InlineData("https://aaa", "endpoint=https://aaa;AuthType=azure;tenantId=xxxx;")] // should ignore the tenantId @@ -219,16 +209,4 @@ public IEnumerator GetEnumerator() IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } - - public class VersionTestData : IEnumerable - { - public IEnumerator GetEnumerator() - { - yield return new object[] { $"endpoint={HttpEndpoint};accesskey={DefaultKey}", null }; - yield return new object[] { $"endpoint={HttpEndpoint};accesskey={DefaultKey};version=1.0", "1.0" }; - yield return new object[] { $"endpoint={HttpEndpoint};accesskey={DefaultKey};version=1.1-preview", "1.1-preview" }; - } - - IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - } } \ No newline at end of file diff --git a/test/Microsoft.Azure.SignalR.Common.Tests/ServiceEndpointFacts.cs b/test/Microsoft.Azure.SignalR.Common.Tests/ServiceEndpointFacts.cs index 7b2875f6f..013152313 100644 --- a/test/Microsoft.Azure.SignalR.Common.Tests/ServiceEndpointFacts.cs +++ b/test/Microsoft.Azure.SignalR.Common.Tests/ServiceEndpointFacts.cs @@ -116,7 +116,6 @@ public void TestCreateServiceEndpointFromAnother() Assert.Equal(serviceEndpoint.Name, cloned.Name); Assert.Equal(serviceEndpoint.ConnectionString, cloned.ConnectionString); Assert.Equal(serviceEndpoint.AudienceBaseUrl, cloned.AudienceBaseUrl); - Assert.Equal(serviceEndpoint.Version, cloned.Version); Assert.Equal(serviceEndpoint.AccessKey, cloned.AccessKey); } @@ -285,7 +284,6 @@ private static void TestCopyConstructor(ServiceEndpoint endpoint) Assert.Equal(endpoint.EndpointType, other.EndpointType); Assert.Equal(endpoint.Endpoint, other.Endpoint); Assert.Equal(endpoint.ClientEndpoint, other.ClientEndpoint); - Assert.Equal(endpoint.Version, other.Version); Assert.Equal(endpoint.AccessKey, other.AccessKey); }