Udostępnij za pośrednictwem


ServerlessHub Class

Definition

When a class derived from ServerlessHub, all the methods in the class are identified as using class based model. HubName is resolved from class name. Event is resolved from method name. Category is determined by the method name. Only OnConnected and OnDisconnected will be considered as Connections and others will be Messages. ParameterNames will be automatically resolved by all the parameters of the method in order, except the parameter which belongs to a binding parameter, or has the type of ILogger or CancellationToken, or marked by SignalRIgnoreAttribute. Note that SignalRTriggerAttribute MUST use parameterless constructor in class based model.

public abstract class ServerlessHub : IDisposable
type ServerlessHub = class
    interface IDisposable
Public MustInherit Class ServerlessHub
Implements IDisposable
Inheritance
ServerlessHub
Implements

Constructors

ServerlessHub(IServiceHubContext, IServiceManager)

Leave the parameters to be null when called by Azure Function infrastructure. Or you can pass in your parameters in testing.

Properties

ClientManager

Get the client manager of this hub.

Clients

Gets an object that can be used to invoke methods on the clients connected to this hub.

Groups

Get the group manager of this hub.

HubName

Get the hub name of this hub.

UserGroups

Get the user group manager of this hub.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Dispose(Boolean)
GetClaims(String)

Get claim list from a JWT.

Negotiate(String, IList<Claim>, Nullable<TimeSpan>)

Gets client endpoint access information object for SignalR hub connections to connect to Azure SignalR Service

NegotiateAsync(NegotiationOptions)

Gets client endpoint access information object for SignalR hub connections to connect to Azure SignalR Service

Applies to