Merge branch 'master' into release/2.2
This commit is contained in:
commit
785200877a
|
|
@ -19,7 +19,7 @@ addons:
|
||||||
- libunwind8
|
- libunwind8
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- dev
|
- master
|
||||||
- /^release\/.*$/
|
- /^release\/.*$/
|
||||||
- /^(.*\/)?ci-.*$/
|
- /^(.*\/)?ci-.*$/
|
||||||
before_install:
|
before_install:
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ resources:
|
||||||
- repository: buildtools
|
- repository: buildtools
|
||||||
type: git
|
type: git
|
||||||
name: aspnet-BuildTools
|
name: aspnet-BuildTools
|
||||||
ref: refs/heads/release/2.2
|
ref: refs/heads/master
|
||||||
|
|
||||||
phases:
|
phases:
|
||||||
- template: .vsts-pipelines/templates/phases/default-build.yml@buildtools
|
- template: .vsts-pipelines/templates/phases/default-build.yml@buildtools
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ resources:
|
||||||
type: github
|
type: github
|
||||||
endpoint: DotNet-Bot GitHub Connection
|
endpoint: DotNet-Bot GitHub Connection
|
||||||
name: aspnet/BuildTools
|
name: aspnet/BuildTools
|
||||||
ref: refs/heads/release/2.2
|
ref: refs/heads/master
|
||||||
|
|
||||||
phases:
|
phases:
|
||||||
- template: .vsts-pipelines/templates/phases/default-build.yml@buildtools
|
- template: .vsts-pipelines/templates/phases/default-build.yml@buildtools
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
"Client": "SignalR",
|
"Client": "SignalR",
|
||||||
"Source": {
|
"Source": {
|
||||||
"Repository": "https://github.com/aspnet/SignalR.git",
|
"Repository": "https://github.com/aspnet/SignalR.git",
|
||||||
"BranchOrCommit": "release/2.2",
|
"BranchOrCommit": "dev",
|
||||||
"Project": "benchmarkapps/BenchmarkServer/BenchmarkServer.csproj"
|
"Project": "benchmarkapps/BenchmarkServer/BenchmarkServer.csproj"
|
||||||
},
|
},
|
||||||
"Connections": 10,
|
"Connections": 10,
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks
|
||||||
{
|
{
|
||||||
public string Name { get; }
|
public string Name { get; }
|
||||||
public int Version => 1;
|
public int Version => 1;
|
||||||
|
public int MinorVersion => 0;
|
||||||
public TransferFormat TransferFormat { get; }
|
public TransferFormat TransferFormat { get; }
|
||||||
|
|
||||||
public bool IsVersionSupported(int version)
|
public bool IsVersionSupported(int version)
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,7 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks
|
||||||
public string Name => _name;
|
public string Name => _name;
|
||||||
|
|
||||||
public int Version => _innerProtocol.Version;
|
public int Version => _innerProtocol.Version;
|
||||||
|
public int MinorVersion => _innerProtocol.MinorVersion;
|
||||||
|
|
||||||
public TransferFormat TransferFormat => _innerProtocol.TransferFormat;
|
public TransferFormat TransferFormat => _innerProtocol.TransferFormat;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,7 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks
|
||||||
public string Name { get; }
|
public string Name { get; }
|
||||||
|
|
||||||
public int Version => 1;
|
public int Version => 1;
|
||||||
|
public int MinorVersion => 0;
|
||||||
|
|
||||||
public TransferFormat TransferFormat => TransferFormat.Text;
|
public TransferFormat TransferFormat => TransferFormat.Text;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,72 +5,72 @@
|
||||||
<PropertyGroup Label="Package Versions">
|
<PropertyGroup Label="Package Versions">
|
||||||
<BenchmarkDotNetPackageVersion>0.10.13</BenchmarkDotNetPackageVersion>
|
<BenchmarkDotNetPackageVersion>0.10.13</BenchmarkDotNetPackageVersion>
|
||||||
<GoogleProtobufPackageVersion>3.1.0</GoogleProtobufPackageVersion>
|
<GoogleProtobufPackageVersion>3.1.0</GoogleProtobufPackageVersion>
|
||||||
<InternalAspNetCoreAnalyzersPackageVersion>2.2.0-preview1-34823</InternalAspNetCoreAnalyzersPackageVersion>
|
<InternalAspNetCoreAnalyzersPackageVersion>3.0.0-alpha1-10173</InternalAspNetCoreAnalyzersPackageVersion>
|
||||||
<InternalAspNetCoreSdkPackageVersion>2.2.0-preview1-17102</InternalAspNetCoreSdkPackageVersion>
|
<InternalAspNetCoreSdkPackageVersion>3.0.0-alpha1-10015</InternalAspNetCoreSdkPackageVersion>
|
||||||
<MessagePackPackageVersion>1.7.3.4</MessagePackPackageVersion>
|
<MessagePackPackageVersion>1.7.3.4</MessagePackPackageVersion>
|
||||||
<MicrosoftAspNetCoreAllPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreAllPackageVersion>
|
<MicrosoftAspNetCoreAllPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreAllPackageVersion>
|
||||||
<MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>
|
<MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>
|
||||||
<MicrosoftAspNetCoreAuthenticationCorePackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreAuthenticationCorePackageVersion>
|
<MicrosoftAspNetCoreAuthenticationCorePackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreAuthenticationCorePackageVersion>
|
||||||
<MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>
|
<MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>
|
||||||
<MicrosoftAspNetCoreAuthorizationPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreAuthorizationPackageVersion>
|
<MicrosoftAspNetCoreAuthorizationPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreAuthorizationPackageVersion>
|
||||||
<MicrosoftAspNetCoreAuthorizationPolicyPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreAuthorizationPolicyPackageVersion>
|
<MicrosoftAspNetCoreAuthorizationPolicyPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreAuthorizationPolicyPackageVersion>
|
||||||
<MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>
|
<MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>
|
||||||
<MicrosoftAspNetCoreConnectionsAbstractionsPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreConnectionsAbstractionsPackageVersion>
|
<MicrosoftAspNetCoreConnectionsAbstractionsPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreConnectionsAbstractionsPackageVersion>
|
||||||
<MicrosoftAspNetCoreCorsPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreCorsPackageVersion>
|
<MicrosoftAspNetCoreCorsPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreCorsPackageVersion>
|
||||||
<MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>
|
<MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>
|
||||||
<MicrosoftAspNetCoreDiagnosticsPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreDiagnosticsPackageVersion>
|
<MicrosoftAspNetCoreDiagnosticsPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreDiagnosticsPackageVersion>
|
||||||
<MicrosoftAspNetCoreHostingAbstractionsPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreHostingAbstractionsPackageVersion>
|
<MicrosoftAspNetCoreHostingAbstractionsPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreHostingAbstractionsPackageVersion>
|
||||||
<MicrosoftAspNetCoreHostingPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreHostingPackageVersion>
|
<MicrosoftAspNetCoreHostingPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreHostingPackageVersion>
|
||||||
<MicrosoftAspNetCoreHttpAbstractionsPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreHttpAbstractionsPackageVersion>
|
<MicrosoftAspNetCoreHttpAbstractionsPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreHttpAbstractionsPackageVersion>
|
||||||
<MicrosoftAspNetCoreHttpFeaturesPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreHttpFeaturesPackageVersion>
|
<MicrosoftAspNetCoreHttpFeaturesPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreHttpFeaturesPackageVersion>
|
||||||
<MicrosoftAspNetCoreHttpPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreHttpPackageVersion>
|
<MicrosoftAspNetCoreHttpPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreHttpPackageVersion>
|
||||||
<MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>
|
<MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>
|
||||||
<MicrosoftAspNetCoreMvcPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreMvcPackageVersion>
|
<MicrosoftAspNetCoreMvcPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreMvcPackageVersion>
|
||||||
<MicrosoftAspNetCoreRoutingPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreRoutingPackageVersion>
|
<MicrosoftAspNetCoreRoutingPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreRoutingPackageVersion>
|
||||||
<MicrosoftAspNetCoreServerIISIntegrationPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreServerIISIntegrationPackageVersion>
|
<MicrosoftAspNetCoreServerIISIntegrationPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreServerIISIntegrationPackageVersion>
|
||||||
<MicrosoftAspNetCoreServerKestrelPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreServerKestrelPackageVersion>
|
<MicrosoftAspNetCoreServerKestrelPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreServerKestrelPackageVersion>
|
||||||
<MicrosoftAspNetCoreStaticFilesPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreStaticFilesPackageVersion>
|
<MicrosoftAspNetCoreStaticFilesPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreStaticFilesPackageVersion>
|
||||||
<MicrosoftAspNetCoreTestHostPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreTestHostPackageVersion>
|
<MicrosoftAspNetCoreTestHostPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreTestHostPackageVersion>
|
||||||
<MicrosoftAspNetCoreTestingPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreTestingPackageVersion>
|
<MicrosoftAspNetCoreTestingPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreTestingPackageVersion>
|
||||||
<MicrosoftAspNetCoreWebSocketsPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreWebSocketsPackageVersion>
|
<MicrosoftAspNetCoreWebSocketsPackageVersion>3.0.0-alpha1-10173</MicrosoftAspNetCoreWebSocketsPackageVersion>
|
||||||
<MicrosoftCSharpPackageVersion>4.5.0</MicrosoftCSharpPackageVersion>
|
<MicrosoftCSharpPackageVersion>4.6.0-preview1-26727-04</MicrosoftCSharpPackageVersion>
|
||||||
<MicrosoftEntityFrameworkCoreDesignPackageVersion>2.2.0-preview1-34823</MicrosoftEntityFrameworkCoreDesignPackageVersion>
|
<MicrosoftEntityFrameworkCoreDesignPackageVersion>3.0.0-alpha1-10173</MicrosoftEntityFrameworkCoreDesignPackageVersion>
|
||||||
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>2.2.0-preview1-34823</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
|
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>3.0.0-alpha1-10173</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
|
||||||
<MicrosoftEntityFrameworkCoreToolsPackageVersion>2.2.0-preview1-34823</MicrosoftEntityFrameworkCoreToolsPackageVersion>
|
<MicrosoftEntityFrameworkCoreToolsPackageVersion>3.0.0-alpha1-10173</MicrosoftEntityFrameworkCoreToolsPackageVersion>
|
||||||
<MicrosoftExtensionsBuffersTestingSourcesPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsBuffersTestingSourcesPackageVersion>
|
<MicrosoftExtensionsBuffersTestingSourcesPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsBuffersTestingSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsClosedGenericMatcherSourcesPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsClosedGenericMatcherSourcesPackageVersion>
|
<MicrosoftExtensionsClosedGenericMatcherSourcesPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsClosedGenericMatcherSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
|
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
|
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
|
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
|
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
|
||||||
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
|
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
|
||||||
<MicrosoftExtensionsDependencyInjectionPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsDependencyInjectionPackageVersion>
|
<MicrosoftExtensionsDependencyInjectionPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsDependencyInjectionPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
|
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingConfigurationPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsLoggingConfigurationPackageVersion>
|
<MicrosoftExtensionsLoggingConfigurationPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsLoggingConfigurationPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingConsolePackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsLoggingConsolePackageVersion>
|
<MicrosoftExtensionsLoggingConsolePackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsLoggingConsolePackageVersion>
|
||||||
<MicrosoftExtensionsLoggingDebugPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsLoggingDebugPackageVersion>
|
<MicrosoftExtensionsLoggingDebugPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsLoggingDebugPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsLoggingPackageVersion>
|
<MicrosoftExtensionsLoggingPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsLoggingPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingTestingPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsLoggingTestingPackageVersion>
|
<MicrosoftExtensionsLoggingTestingPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsLoggingTestingPackageVersion>
|
||||||
<MicrosoftExtensionsObjectMethodExecutorSourcesPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsObjectMethodExecutorSourcesPackageVersion>
|
<MicrosoftExtensionsObjectMethodExecutorSourcesPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsObjectMethodExecutorSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsOptionsPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsOptionsPackageVersion>
|
<MicrosoftExtensionsOptionsPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsOptionsPackageVersion>
|
||||||
<MicrosoftExtensionsSecurityHelperSourcesPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsSecurityHelperSourcesPackageVersion>
|
<MicrosoftExtensionsSecurityHelperSourcesPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsSecurityHelperSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsValueStopwatchSourcesPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsValueStopwatchSourcesPackageVersion>
|
<MicrosoftExtensionsValueStopwatchSourcesPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsValueStopwatchSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsWebEncodersSourcesPackageVersion>2.2.0-preview1-34823</MicrosoftExtensionsWebEncodersSourcesPackageVersion>
|
<MicrosoftExtensionsWebEncodersSourcesPackageVersion>3.0.0-alpha1-10173</MicrosoftExtensionsWebEncodersSourcesPackageVersion>
|
||||||
<MicrosoftNETCoreApp22PackageVersion>2.2.0-preview1-26618-02</MicrosoftNETCoreApp22PackageVersion>
|
<MicrosoftNETCoreApp22PackageVersion>2.2.0-preview1-26618-02</MicrosoftNETCoreApp22PackageVersion>
|
||||||
<MicrosoftNETTestSdkPackageVersion>15.6.1</MicrosoftNETTestSdkPackageVersion>
|
<MicrosoftNETTestSdkPackageVersion>15.6.1</MicrosoftNETTestSdkPackageVersion>
|
||||||
<MoqPackageVersion>4.7.49</MoqPackageVersion>
|
<MoqPackageVersion>4.7.49</MoqPackageVersion>
|
||||||
<NETStandardLibrary20PackageVersion>2.0.3</NETStandardLibrary20PackageVersion>
|
<NETStandardLibrary20PackageVersion>2.0.3</NETStandardLibrary20PackageVersion>
|
||||||
<NewtonsoftJsonPackageVersion>11.0.2</NewtonsoftJsonPackageVersion>
|
<NewtonsoftJsonPackageVersion>11.0.2</NewtonsoftJsonPackageVersion>
|
||||||
<StackExchangeRedisStrongNamePackageVersion>1.2.6</StackExchangeRedisStrongNamePackageVersion>
|
<StackExchangeRedisStrongNamePackageVersion>1.2.6</StackExchangeRedisStrongNamePackageVersion>
|
||||||
<SystemBuffersPackageVersion>4.5.0</SystemBuffersPackageVersion>
|
<SystemBuffersPackageVersion>4.6.0-preview1-26727-04</SystemBuffersPackageVersion>
|
||||||
<SystemIOPipelinesPackageVersion>4.5.0</SystemIOPipelinesPackageVersion>
|
<SystemIOPipelinesPackageVersion>4.6.0-preview1-26727-04</SystemIOPipelinesPackageVersion>
|
||||||
<SystemMemoryPackageVersion>4.5.1</SystemMemoryPackageVersion>
|
<SystemMemoryPackageVersion>4.6.0-preview1-26717-04</SystemMemoryPackageVersion>
|
||||||
<SystemNumericsVectorsPackageVersion>4.5.0</SystemNumericsVectorsPackageVersion>
|
<SystemNumericsVectorsPackageVersion>4.6.0-preview1-26727-04</SystemNumericsVectorsPackageVersion>
|
||||||
<SystemReactiveLinqPackageVersion>3.1.1</SystemReactiveLinqPackageVersion>
|
<SystemReactiveLinqPackageVersion>3.1.1</SystemReactiveLinqPackageVersion>
|
||||||
<SystemReflectionEmitPackageVersion>4.3.0</SystemReflectionEmitPackageVersion>
|
<SystemReflectionEmitPackageVersion>4.3.0</SystemReflectionEmitPackageVersion>
|
||||||
<SystemRuntimeCompilerServicesUnsafePackageVersion>4.5.1</SystemRuntimeCompilerServicesUnsafePackageVersion>
|
<SystemRuntimeCompilerServicesUnsafePackageVersion>4.6.0-preview1-26727-04</SystemRuntimeCompilerServicesUnsafePackageVersion>
|
||||||
<SystemThreadingChannelsPackageVersion>4.5.0</SystemThreadingChannelsPackageVersion>
|
<SystemThreadingChannelsPackageVersion>4.6.0-preview1-26727-04</SystemThreadingChannelsPackageVersion>
|
||||||
<SystemThreadingTasksExtensionsPackageVersion>4.5.1</SystemThreadingTasksExtensionsPackageVersion>
|
<SystemThreadingTasksExtensionsPackageVersion>4.6.0-preview1-26727-04</SystemThreadingTasksExtensionsPackageVersion>
|
||||||
<XunitAssertPackageVersion>2.3.1</XunitAssertPackageVersion>
|
<XunitAssertPackageVersion>2.3.1</XunitAssertPackageVersion>
|
||||||
<XunitExtensibilityCorePackageVersion>2.3.1</XunitExtensibilityCorePackageVersion>
|
<XunitExtensibilityCorePackageVersion>2.3.1</XunitExtensibilityCorePackageVersion>
|
||||||
<XunitPackageVersion>2.3.1</XunitPackageVersion>
|
<XunitPackageVersion>2.3.1</XunitPackageVersion>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||||
<LineupPackageVersion>2.2.0-*</LineupPackageVersion>
|
|
||||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ export interface HandshakeRequestMessage {
|
||||||
|
|
||||||
export interface HandshakeResponseMessage {
|
export interface HandshakeResponseMessage {
|
||||||
readonly error: string;
|
readonly error: string;
|
||||||
|
readonly minorVersion: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class HandshakeProtocol {
|
export class HandshakeProtocol {
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
version:2.2.0-preview1-17102
|
version:3.0.0-alpha1-10015
|
||||||
commithash:e7e2b5a97ca92cfc6acc4def534cb0901a6d1eb9
|
commithash:3f36e5c2f061712f76f2766c435d2555681d5c55
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/release/2.2/tools/korebuild.schema.json",
|
"$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json",
|
||||||
"channel": "release/2.2",
|
"channel": "master",
|
||||||
"toolsets": {
|
"toolsets": {
|
||||||
"nodejs": {
|
"nodejs": {
|
||||||
"required": true,
|
"required": true,
|
||||||
|
|
|
||||||
6
run.ps1
6
run.ps1
|
|
@ -52,8 +52,8 @@ in the file are overridden by command line parameters.
|
||||||
Example config file:
|
Example config file:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json",
|
"$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json",
|
||||||
"channel": "dev",
|
"channel": "master",
|
||||||
"toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools"
|
"toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
@ -192,7 +192,7 @@ if (!$DotNetHome) {
|
||||||
else { Join-Path $PSScriptRoot '.dotnet'}
|
else { Join-Path $PSScriptRoot '.dotnet'}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$Channel) { $Channel = 'dev' }
|
if (!$Channel) { $Channel = 'master' }
|
||||||
if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' }
|
if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' }
|
||||||
|
|
||||||
# Execute
|
# Execute
|
||||||
|
|
|
||||||
2
run.sh
2
run.sh
|
|
@ -248,7 +248,7 @@ if [ -f "$config_file" ]; then
|
||||||
[ ! -z "${config_tools_source:-}" ] && tools_source="$config_tools_source"
|
[ ! -z "${config_tools_source:-}" ] && tools_source="$config_tools_source"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "$channel" ] && channel='dev'
|
[ -z "$channel" ] && channel='master'
|
||||||
[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools'
|
[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools'
|
||||||
|
|
||||||
get_korebuild
|
get_korebuild
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ namespace Microsoft.AspNetCore.SignalR.Client
|
||||||
|
|
||||||
// Transient state to a connection
|
// Transient state to a connection
|
||||||
private ConnectionState _connectionState;
|
private ConnectionState _connectionState;
|
||||||
|
private int _serverProtocolMinorVersion;
|
||||||
|
|
||||||
public event Func<Exception, Task> Closed;
|
public event Func<Exception, Task> Closed;
|
||||||
|
|
||||||
|
|
@ -721,6 +722,8 @@ namespace Microsoft.AspNetCore.SignalR.Client
|
||||||
$"Unable to complete handshake with the server due to an error: {message.Error}");
|
$"Unable to complete handshake with the server due to an error: {message.Error}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_serverProtocolMinorVersion = message.MinorVersion;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -739,11 +742,12 @@ namespace Microsoft.AspNetCore.SignalR.Client
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// shutdown if we're unable to read handshake
|
||||||
// Ignore HubException because we throw it when we receive a handshake response with an error
|
// Ignore HubException because we throw it when we receive a handshake response with an error
|
||||||
// And we don't need to log that the handshake failed
|
// And because we already have the error, we don't need to log that the handshake failed
|
||||||
catch (Exception ex) when (!(ex is HubException))
|
catch (Exception ex) when (!(ex is HubException))
|
||||||
{
|
{
|
||||||
// shutdown if we're unable to read handshake
|
|
||||||
Log.ErrorReceivingHandshakeResponse(_logger, ex);
|
Log.ErrorReceivingHandshakeResponse(_logger, ex);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
@ -816,7 +820,7 @@ namespace Microsoft.AspNetCore.SignalR.Client
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
// The buffer was sliced up to where it was consumed, so we can just advance to the start.
|
// The buffer was sliced up to where it was consumed, so we can just advance to the start.
|
||||||
// We mark examined as buffer.End so that if we didn't receive a full frame, we'll wait for more data
|
// We mark examined as `buffer.End` so that if we didn't receive a full frame, we'll wait for more data
|
||||||
// before yielding the read again.
|
// before yielding the read again.
|
||||||
connectionState.Connection.Transport.Input.AdvanceTo(buffer.Start, buffer.End);
|
connectionState.Connection.Transport.Input.AdvanceTo(buffer.Start, buffer.End);
|
||||||
}
|
}
|
||||||
|
|
@ -865,7 +869,6 @@ namespace Microsoft.AspNetCore.SignalR.Client
|
||||||
// There is no need to start a new task if there is no Closed event registered
|
// There is no need to start a new task if there is no Closed event registered
|
||||||
if (closed != null)
|
if (closed != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Fire-and-forget the closed event
|
// Fire-and-forget the closed event
|
||||||
_ = RunClosedEvent(closed, connectionState.CloseException);
|
_ = RunClosedEvent(closed, connectionState.CloseException);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Buffers;
|
using System.Buffers;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
using Microsoft.AspNetCore.Internal;
|
using Microsoft.AspNetCore.Internal;
|
||||||
using Microsoft.AspNetCore.SignalR.Internal;
|
using Microsoft.AspNetCore.SignalR.Internal;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
@ -17,26 +19,31 @@ namespace Microsoft.AspNetCore.SignalR.Protocol
|
||||||
{
|
{
|
||||||
private const string ProtocolPropertyName = "protocol";
|
private const string ProtocolPropertyName = "protocol";
|
||||||
private const string ProtocolVersionPropertyName = "version";
|
private const string ProtocolVersionPropertyName = "version";
|
||||||
|
private const string MinorVersionPropertyName = "minorVersion";
|
||||||
private const string ErrorPropertyName = "error";
|
private const string ErrorPropertyName = "error";
|
||||||
private const string TypePropertyName = "type";
|
private const string TypePropertyName = "type";
|
||||||
|
|
||||||
/// <summary>
|
private static ConcurrentDictionary<IHubProtocol, ReadOnlyMemory<byte>> _messageCache = new ConcurrentDictionary<IHubProtocol, ReadOnlyMemory<byte>>();
|
||||||
/// The serialized representation of a success handshake.
|
|
||||||
/// </summary>
|
|
||||||
public static ReadOnlyMemory<byte> SuccessHandshakeData;
|
|
||||||
|
|
||||||
static HandshakeProtocol()
|
public static ReadOnlySpan<byte> GetSuccessfulHandshake(IHubProtocol protocol)
|
||||||
{
|
{
|
||||||
var memoryBufferWriter = MemoryBufferWriter.Get();
|
ReadOnlyMemory<byte> result;
|
||||||
try
|
if(!_messageCache.TryGetValue(protocol, out result))
|
||||||
{
|
{
|
||||||
WriteResponseMessage(HandshakeResponseMessage.Empty, memoryBufferWriter);
|
var memoryBufferWriter = MemoryBufferWriter.Get();
|
||||||
SuccessHandshakeData = memoryBufferWriter.ToArray();
|
try
|
||||||
}
|
{
|
||||||
finally
|
WriteResponseMessage(new HandshakeResponseMessage(protocol.MinorVersion), memoryBufferWriter);
|
||||||
{
|
result = memoryBufferWriter.ToArray();
|
||||||
MemoryBufferWriter.Return(memoryBufferWriter);
|
_messageCache.TryAdd(protocol, result);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
MemoryBufferWriter.Return(memoryBufferWriter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return result.Span;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -87,6 +94,9 @@ namespace Microsoft.AspNetCore.SignalR.Protocol
|
||||||
writer.WriteValue(responseMessage.Error);
|
writer.WriteValue(responseMessage.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
writer.WritePropertyName(MinorVersionPropertyName);
|
||||||
|
writer.WriteValue(responseMessage.MinorVersion);
|
||||||
|
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
writer.Flush();
|
writer.Flush();
|
||||||
}
|
}
|
||||||
|
|
@ -122,6 +132,7 @@ namespace Microsoft.AspNetCore.SignalR.Protocol
|
||||||
JsonUtils.CheckRead(reader);
|
JsonUtils.CheckRead(reader);
|
||||||
JsonUtils.EnsureObjectStart(reader);
|
JsonUtils.EnsureObjectStart(reader);
|
||||||
|
|
||||||
|
int? minorVersion = null;
|
||||||
string error = null;
|
string error = null;
|
||||||
|
|
||||||
var completed = false;
|
var completed = false;
|
||||||
|
|
@ -141,6 +152,9 @@ namespace Microsoft.AspNetCore.SignalR.Protocol
|
||||||
case ErrorPropertyName:
|
case ErrorPropertyName:
|
||||||
error = JsonUtils.ReadAsString(reader, ErrorPropertyName);
|
error = JsonUtils.ReadAsString(reader, ErrorPropertyName);
|
||||||
break;
|
break;
|
||||||
|
case MinorVersionPropertyName:
|
||||||
|
minorVersion = JsonUtils.ReadAsInt32(reader, MinorVersionPropertyName);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
reader.Skip();
|
reader.Skip();
|
||||||
break;
|
break;
|
||||||
|
|
@ -154,7 +168,7 @@ namespace Microsoft.AspNetCore.SignalR.Protocol
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
responseMessage = (error != null) ? new HandshakeResponseMessage(error) : HandshakeResponseMessage.Empty;
|
responseMessage = new HandshakeResponseMessage(minorVersion, error);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,20 +11,41 @@ namespace Microsoft.AspNetCore.SignalR.Protocol
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An empty response message with no error.
|
/// An empty response message with no error.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly HandshakeResponseMessage Empty = new HandshakeResponseMessage(null);
|
public static readonly HandshakeResponseMessage Empty = new HandshakeResponseMessage(error: null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the optional error message.
|
/// Gets the optional error message.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Error { get; }
|
public string Error { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Highest minor protocol version that the server supports.
|
||||||
|
/// </summary>
|
||||||
|
public int MinorVersion { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="HandshakeResponseMessage"/> class.
|
||||||
|
/// An error response does need a minor version. Since the handshake has failed, any extra data will be ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="error">Error encountered by the server, indicating why the handshake has failed.</param>
|
||||||
|
public HandshakeResponseMessage(string error) : this(null, error) { }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="HandshakeResponseMessage"/> class.
|
||||||
|
/// A reponse with a minor version indicates success, and doesn't require an error field.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="minorVersion">The highest protocol minor version that the server supports.</param>
|
||||||
|
public HandshakeResponseMessage(int minorVersion) : this(minorVersion, null) { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="HandshakeResponseMessage"/> class.
|
/// Initializes a new instance of the <see cref="HandshakeResponseMessage"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="error">An optional response error message. A <c>null</c> error message indicates a succesful handshake.</param>
|
/// <param name="error">Error encountered by the server, indicating why the handshake has failed.</param>
|
||||||
public HandshakeResponseMessage(string error)
|
/// <param name="minorVersion">The highest protocol minor version that the server supports.</param>
|
||||||
|
public HandshakeResponseMessage(int? minorVersion, string error)
|
||||||
{
|
{
|
||||||
// Note that a response with an empty string for error in the JSON is considered an errored response
|
// MinorVersion defaults to 0, because old servers don't send a minor version
|
||||||
|
MinorVersion = minorVersion ?? 0;
|
||||||
Error = error;
|
Error = error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,15 @@ namespace Microsoft.AspNetCore.SignalR.Protocol
|
||||||
string Name { get; }
|
string Name { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the version of the protocol.
|
/// Gets the major version of the protocol.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
int Version { get; }
|
int Version { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the minor version of the protocol.
|
||||||
|
/// </summary>
|
||||||
|
int MinorVersion { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the transfer format of the protocol.
|
/// Gets the transfer format of the protocol.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"TypeId": "public static class Microsoft.AspNetCore.SignalR.Protocol.HandshakeProtocol",
|
||||||
|
"MemberId": "public static System.ReadOnlyMemory<System.Byte> SuccessHandshakeData",
|
||||||
|
"Kind": "Removal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TypeId": "public interface Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol",
|
||||||
|
"MemberId": "System.Int32 get_MinorVersion()",
|
||||||
|
"Kind": "Addition"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
@ -301,10 +301,9 @@ namespace Microsoft.AspNetCore.SignalR
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (message == HandshakeResponseMessage.Empty)
|
if (message.Error == null)
|
||||||
{
|
{
|
||||||
// success response is always an empty object so send cached data
|
_connectionContext.Transport.Output.Write(HandshakeProtocol.GetSuccessfulHandshake(Protocol));
|
||||||
_connectionContext.Transport.Output.Write(HandshakeProtocol.SuccessHandshakeData.Span);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -419,7 +418,8 @@ namespace Microsoft.AspNetCore.SignalR
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.HandshakeComplete(_logger, Protocol.Name);
|
Log.HandshakeComplete(_logger, Protocol.Name);
|
||||||
await WriteHandshakeResponseAsync(HandshakeResponseMessage.Empty);
|
|
||||||
|
await WriteHandshakeResponseAsync(new HandshakeResponseMessage(Protocol.MinorVersion));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ namespace Microsoft.AspNetCore.SignalR.Protocol
|
||||||
|
|
||||||
private static readonly string ProtocolName = "json";
|
private static readonly string ProtocolName = "json";
|
||||||
private static readonly int ProtocolVersion = 1;
|
private static readonly int ProtocolVersion = 1;
|
||||||
|
private static readonly int ProtocolMinorVersion = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the serializer used to serialize invocation arguments and return values.
|
/// Gets the serializer used to serialize invocation arguments and return values.
|
||||||
|
|
@ -60,6 +61,9 @@ namespace Microsoft.AspNetCore.SignalR.Protocol
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public int Version => ProtocolVersion;
|
public int Version => ProtocolVersion;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public int MinorVersion => ProtocolMinorVersion;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public TransferFormat TransferFormat => TransferFormat.Text;
|
public TransferFormat TransferFormat => TransferFormat.Text;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,13 +29,17 @@ namespace Microsoft.AspNetCore.SignalR.Protocol
|
||||||
|
|
||||||
private static readonly string ProtocolName = "messagepack";
|
private static readonly string ProtocolName = "messagepack";
|
||||||
private static readonly int ProtocolVersion = 1;
|
private static readonly int ProtocolVersion = 1;
|
||||||
|
private static readonly int ProtocolMinorVersion = 0;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public string Name => ProtocolName;
|
public string Name => ProtocolName;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public int Version => ProtocolVersion;
|
public int Version => ProtocolVersion;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public int MinorVersion => ProtocolMinorVersion;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public TransferFormat TransferFormat => TransferFormat.Binary;
|
public TransferFormat TransferFormat => TransferFormat.Binary;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
|
||||||
public string Name => _innerProtocol.Name;
|
public string Name => _innerProtocol.Name;
|
||||||
public int Version => _version;
|
public int Version => _version;
|
||||||
public TransferFormat TransferFormat => _innerProtocol.TransferFormat;
|
public TransferFormat TransferFormat => _innerProtocol.TransferFormat;
|
||||||
|
public int MinorVersion => 0; // not used in this test class, just for interface conformance
|
||||||
|
|
||||||
public bool TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, out HubMessage message)
|
public bool TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, out HubMessage message)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,28 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ClientIsOkayReceivingMinorVersionInHandshake()
|
||||||
|
{
|
||||||
|
// We're just testing that the client doesn't fail when a minor version is added to the handshake
|
||||||
|
// The client doesn't actually use that version anywhere yet so there's nothing else to test at this time
|
||||||
|
|
||||||
|
var connection = new TestConnection(autoHandshake: false);
|
||||||
|
var hubConnection = CreateHubConnection(connection);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var startTask = hubConnection.StartAsync();
|
||||||
|
var message = await connection.ReadHandshakeAndSendResponseAsync(56);
|
||||||
|
|
||||||
|
await startTask;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
await hubConnection.DisposeAsync().OrTimeout();
|
||||||
|
await connection.DisposeAsync().OrTimeout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task InvokeSendsAnInvocationMessage()
|
public async Task InvokeSendsAnInvocationMessage()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests
|
||||||
|
|
||||||
public string Name => "MockHubProtocol";
|
public string Name => "MockHubProtocol";
|
||||||
public int Version => 1;
|
public int Version => 1;
|
||||||
|
public int MinorVersion => 1;
|
||||||
|
|
||||||
public TransferFormat TransferFormat => TransferFormat.Binary;
|
public TransferFormat TransferFormat => TransferFormat.Binary;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<string> ReadHandshakeAndSendResponseAsync()
|
public async Task<string> ReadHandshakeAndSendResponseAsync(int minorVersion = 0)
|
||||||
{
|
{
|
||||||
var s = await ReadSentTextMessageAsync();
|
var s = await ReadSentTextMessageAsync();
|
||||||
|
|
||||||
|
|
@ -87,7 +87,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests
|
||||||
var output = MemoryBufferWriter.Get();
|
var output = MemoryBufferWriter.Get();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
HandshakeProtocol.WriteResponseMessage(HandshakeResponseMessage.Empty, output);
|
HandshakeProtocol.WriteResponseMessage(new HandshakeResponseMessage(minorVersion), output);
|
||||||
response = output.ToArray();
|
response = output.ToArray();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,17 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol
|
||||||
Assert.Equal(error, response.Error);
|
Assert.Equal(error, response.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Theory]
|
||||||
|
[InlineData("{\"error\":\"\",\"minorVersion\":34}\u001e", 34)]
|
||||||
|
[InlineData("{\"error\":\"flump flump flump\",\"minorVersion\":112}\u001e", 112)]
|
||||||
|
public void ParsingResponseMessageGivesMinorVersion(string json, int version)
|
||||||
|
{
|
||||||
|
var message = new ReadOnlySequence<byte>(Encoding.UTF8.GetBytes(json));
|
||||||
|
|
||||||
|
Assert.True(HandshakeProtocol.TryParseResponseMessage(ref message, out var response));
|
||||||
|
Assert.Equal(version, response.MinorVersion);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void ParsingHandshakeRequestNotCompleteReturnsFalse()
|
public void ParsingHandshakeRequestNotCompleteReturnsFalse()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests
|
||||||
|
|
||||||
public string Name { get; }
|
public string Name { get; }
|
||||||
public int Version => 1;
|
public int Version => 1;
|
||||||
|
public int MinorVersion => 0;
|
||||||
public TransferFormat TransferFormat => TransferFormat.Text;
|
public TransferFormat TransferFormat => TransferFormat.Text;
|
||||||
|
|
||||||
public DummyHubProtocol(string name, Action onWrite = null)
|
public DummyHubProtocol(string name, Action onWrite = null)
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests
|
||||||
private List<(Action<object> handler, object state)> _heartbeatHandlers;
|
private List<(Action<object> handler, object state)> _heartbeatHandlers;
|
||||||
|
|
||||||
private static int _id;
|
private static int _id;
|
||||||
private readonly IHubProtocol _protocol;
|
private IHubProtocol _protocol;
|
||||||
private readonly IInvocationBinder _invocationBinder;
|
private readonly IInvocationBinder _invocationBinder;
|
||||||
private readonly CancellationTokenSource _cts;
|
private readonly CancellationTokenSource _cts;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,9 +64,9 @@ namespace Microsoft.AspNetCore.SignalR.Tests
|
||||||
return services.BuildServiceProvider();
|
return services.BuildServiceProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Connections.ConnectionHandler GetHubConnectionHandler(Type hubType)
|
public static Connections.ConnectionHandler GetHubConnectionHandler(Type hubType, Action<ServiceCollection> addServices = null)
|
||||||
{
|
{
|
||||||
var serviceProvider = CreateServiceProvider();
|
var serviceProvider = CreateServiceProvider(addServices);
|
||||||
return (Connections.ConnectionHandler)serviceProvider.GetService(GetConnectionHandlerType(hubType));
|
return (Connections.ConnectionHandler)serviceProvider.GetService(GetConnectionHandlerType(hubType));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2381,6 +2381,30 @@ namespace Microsoft.AspNetCore.SignalR.Tests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ServerReportsProtocolMinorVersion()
|
||||||
|
{
|
||||||
|
var testProtocol = new Mock<IHubProtocol>();
|
||||||
|
testProtocol.Setup(m => m.Name).Returns("CustomProtocol");
|
||||||
|
testProtocol.Setup(m => m.MinorVersion).Returns(112);
|
||||||
|
testProtocol.Setup(m => m.IsVersionSupported(It.IsAny<int>())).Returns(true);
|
||||||
|
testProtocol.Setup(m => m.TransferFormat).Returns(TransferFormat.Binary);
|
||||||
|
|
||||||
|
var connectionHandler = HubConnectionHandlerTestUtils.GetHubConnectionHandler(typeof(HubT),
|
||||||
|
(services) => services.AddSingleton<IHubProtocol>(testProtocol.Object));
|
||||||
|
|
||||||
|
using (var client = new TestClient(protocol: testProtocol.Object))
|
||||||
|
{
|
||||||
|
var connectionHandlerTask = await client.ConnectAsync(connectionHandler);
|
||||||
|
|
||||||
|
Assert.NotNull(client.HandshakeResponseMessage);
|
||||||
|
Assert.Equal(112, client.HandshakeResponseMessage.MinorVersion);
|
||||||
|
|
||||||
|
client.Dispose();
|
||||||
|
await connectionHandlerTask.OrTimeout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private class CustomHubActivator<THub> : IHubActivator<THub> where THub : Hub
|
private class CustomHubActivator<THub> : IHubActivator<THub> where THub : Hub
|
||||||
{
|
{
|
||||||
public int ReleaseCount;
|
public int ReleaseCount;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.1.0</VersionPrefix>
|
|
||||||
<JavaClientVersion>0.1.0-preview1</JavaClientVersion>
|
<JavaClientVersion>0.1.0-preview1</JavaClientVersion>
|
||||||
<VersionSuffix>preview1</VersionSuffix>
|
<VersionPrefix>3.0.0</VersionPrefix>
|
||||||
|
<VersionSuffix>alpha1</VersionSuffix>
|
||||||
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' == 'rtm' ">$(VersionPrefix)</PackageVersion>
|
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' == 'rtm' ">$(VersionPrefix)</PackageVersion>
|
||||||
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' != 'rtm' ">$(VersionPrefix)-$(VersionSuffix)-final</PackageVersion>
|
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' != 'rtm' ">$(VersionPrefix)-$(VersionSuffix)-final</PackageVersion>
|
||||||
<BuildNumber Condition="'$(BuildNumber)' == ''">t000</BuildNumber>
|
<BuildNumber Condition="'$(BuildNumber)' == ''">t000</BuildNumber>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue