Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DI issue in EndpointRouterDecorator #1845

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Collections.Generic;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options;

namespace Microsoft.Azure.SignalR
{
Expand All @@ -15,6 +16,11 @@ public EndpointRouterDecorator(IEndpointRouter router = null)
_inner = router ?? new DefaultEndpointRouter(null);
}

public EndpointRouterDecorator(IEndpointRouter router = null, IOptions<ServiceOptions> options = null)
Copy link
Member

@vicancy vicancy Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to ctors without default value?

public EndpointRouterDecorator()
public EndpointRouterDecorator(IEndpointRouter router)
public EndpointRouterDecorator(IEndpointRouter router, IOptions<ServiceOptions> options)

{
_inner = router ?? new DefaultEndpointRouter(options);
}

public virtual ServiceEndpoint GetNegotiateEndpoint(HttpContext context, IEnumerable<ServiceEndpoint> endpoints)
{
return _inner.GetNegotiateEndpoint(context, endpoints);
Expand Down
Loading