Fix accidental obsolete (#22065)
This commit is contained in:
parent
756227f0ce
commit
b277dab236
|
|
@ -188,8 +188,7 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
public Microsoft.AspNetCore.SignalR.Hub Hub { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.Reflection.MethodInfo HubMethod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.Collections.Generic.IReadOnlyList<object> HubMethodArguments { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
[System.ObsoleteAttribute("This property is obsolete and will be removed in a future version. Use HubMethod.Name instead.")]
|
||||
public string HubMethodName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string HubMethodName { get { throw null; } }
|
||||
public System.IServiceProvider ServiceProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
public sealed partial class HubLifetimeContext
|
||||
|
|
|
|||
|
|
@ -31,10 +31,6 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
HubMethod = hubMethod;
|
||||
HubMethodArguments = hubMethodArguments;
|
||||
Context = context;
|
||||
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
HubMethodName = HubMethod.Name;
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -68,8 +64,7 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
/// <summary>
|
||||
/// Gets the name of the Hub method being invoked.
|
||||
/// </summary>
|
||||
[Obsolete("This property is obsolete and will be removed in a future version. Use HubMethod.Name instead.")]
|
||||
public string HubMethodName { get; }
|
||||
public string HubMethodName => HubMethod.Name;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the arguments provided by the client.
|
||||
|
|
|
|||
|
|
@ -2233,9 +2233,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests
|
|||
Assert.NotNull(context.Resource);
|
||||
var resource = Assert.IsType<HubInvocationContext>(context.Resource);
|
||||
Assert.Equal(typeof(MethodHub), resource.Hub.GetType());
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
Assert.Equal(nameof(MethodHub.MultiParamAuthMethod), resource.HubMethodName);
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
Assert.Equal(2, resource.HubMethodArguments?.Count);
|
||||
Assert.Equal("Hello", resource.HubMethodArguments[0]);
|
||||
Assert.Equal("World!", resource.HubMethodArguments[1]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue