Skip to content

Allow internal hubs #9760

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

Closed
rynowak opened this issue Apr 25, 2019 · 5 comments
Closed

Allow internal hubs #9760

rynowak opened this issue Apr 25, 2019 · 5 comments
Labels
area-signalr Includes: SignalR clients and servers

Comments

@rynowak
Copy link
Member

rynowak commented Apr 25, 2019

For server-side Blazor we register a hub to handle communication with the client, but we want to treat this hub like an implementation detail.

It would be really nice if the type could make the hub internal. We don't want to expose the following API surface publicly, but SignalR requires it.

This is our contract with our client-side code and we will want to evolve it.

public sealed class ComponentHub : Hub
    {
        //
        // Summary:
        //     /// Gets the default endpoint path for incoming connections. ///
        public static PathString DefaultPath
        {
            [CompilerGenerated]
            get
            {
                throw null;
            }
        }

        //
        // Summary:
        //     /// Intended for framework use only. Applications should not instantiate ///
        //     this class directly. ///
        public ComponentHub(IServiceProvider services, ILogger<ComponentHub> logger)
        {
        }

        //
        // Summary:
        //     /// Intended for framework use only. Applications should not call this method
        //     directly. ///
        public void BeginInvokeDotNetFromJS(string callId, string assemblyName, string methodIdentifier, long dotNetObjectId, string argsJson)
        {
        }

        //
        // Summary:
        //     /// Intended for framework use only. Applications should not call this method
        //     directly. ///
        [DebuggerStepThrough]
        public Task<bool> ConnectCircuit(string circuitId)
        {
            throw null;
        }

        //
        // Summary:
        //     /// Intended for framework use only. Applications should not call this method
        //     directly. ///
        public override Task OnDisconnectedAsync(Exception exception)
        {
            throw null;
        }

        //
        // Summary:
        //     /// Intended for framework use only. Applications should not call this method
        //     directly. ///
        public void OnRenderCompleted(long renderId, string errorMessageOrNull)
        {
        }

        //
        // Summary:
        //     /// Intended for framework use only. Applications should not call this method
        //     directly. ///
        public string StartCircuit(string uriAbsolute, string baseUriAbsolute)
        {
            throw null;
        }
    }
@Eilon Eilon added the area-signalr Includes: SignalR clients and servers label Apr 25, 2019
@analogrelay
Copy link
Contributor

👍 Sounds good to me. Should be a quick and easy change too.

@BrennanConroy
Copy link
Member

It would be really nice if the type could make the hub internal.

@rynowak Did you try this out? I gave this a quick try in a test app and making the hub internal looked like it worked.

@rynowak
Copy link
Member Author

rynowak commented Apr 30, 2019

hmmm headscratch. I'll try it and make sure

@BrennanConroy
Copy link
Member

@rynowak Looks like you figured it out? #9998

@rynowak
Copy link
Member Author

rynowak commented May 6, 2019

Ya, let's close this BAD BOY

@rynowak rynowak closed this as completed May 6, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-signalr Includes: SignalR clients and servers
Projects
None yet
Development

No branches or pull requests

4 participants