2 implementations of IHubProtocol
Microsoft.AspNetCore.Components.Server (1)
BlazorPack\BlazorPackHubProtocol.cs (1)
16internal sealed class BlazorPackHubProtocol : IHubProtocol
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Protocol\JsonHubProtocol.cs (1)
24public sealed class JsonHubProtocol : IHubProtocol
33 references to IHubProtocol
Microsoft.AspNetCore.Components.Server (1)
DependencyInjection\ComponentServiceCollectionExtensions.cs (1)
61services.TryAddEnumerable(ServiceDescriptor.Singleton<IHubProtocol, BlazorPackHubProtocol>());
Microsoft.AspNetCore.SignalR.Common (7)
IInvocationBinder.cs (1)
11/// Class used by <see cref="IHubProtocol"/>s to get the <see cref="Type"/>(s) expected by the hub message being deserialized.
Protocol\HandshakeProtocol.cs (1)
49public static ReadOnlySpan<byte> GetSuccessfulHandshake(IHubProtocol protocol) => _successHandshakeData.Span;
Protocol\HubProtocolExtensions.cs (2)
9/// Extension methods for <see cref="IHubProtocol"/>. 19public static byte[] GetMessageBytes(this IHubProtocol hubProtocol, HubMessage message)
Protocol\InvocationBindingFailureMessage.cs (1)
10/// message that is sent on the wire, it is returned by <see cref="IHubProtocol.TryParseMessage"/>
Protocol\RawResult.cs (1)
14/// Type returned to <see cref="IHubProtocol"/> implementations to let them know the object being deserialized should be
Protocol\StreamBindingFailureMessage.cs (1)
13/// message that is sent on the wire, it is returned by <see cref="IHubProtocol.TryParseMessage"/>
Microsoft.AspNetCore.SignalR.Core (24)
HubConnectionContext.cs (1)
169public virtual IHubProtocol Protocol { get; set; } = default!;
HubConnectionHandler.cs (1)
266var protocol = connection.Protocol;
HubLifetimeManager.cs (1)
164/// Tells <see cref="IHubProtocol"/> implementations what the expected type from a connection result is.
HubOptionsSetup.cs (3)
30/// <param name="protocols">The list of <see cref="IHubProtocol"/>s that are from Dependency Injection.</param> 31public HubOptionsSetup(IEnumerable<IHubProtocol> protocols) 33foreach (var hubProtocol in protocols)
IHubProtocolResolver.cs (4)
9/// A resolver abstraction for working with <see cref="IHubProtocol"/> instances. 16IReadOnlyList<IHubProtocol> AllProtocols { get; } 23/// <returns>A matching <see cref="IHubProtocol"/> or <c>null</c> if no matching protocol was found.</returns> 24IHubProtocol? GetProtocol(string protocolName, IReadOnlyList<string>? supportedProtocols);
Internal\DefaultHubProtocolResolver.cs (8)
14private readonly List<IHubProtocol> _hubProtocols; 15private readonly Dictionary<string, IHubProtocol> _availableProtocols; 17public IReadOnlyList<IHubProtocol> AllProtocols => _hubProtocols; 19public DefaultHubProtocolResolver(IEnumerable<IHubProtocol> availableProtocols, ILogger<DefaultHubProtocolResolver> logger) 22_availableProtocols = new Dictionary<string, IHubProtocol>(StringComparer.OrdinalIgnoreCase); 24foreach (var protocol in availableProtocols) 32public IHubProtocol? GetProtocol(string protocolName, IReadOnlyList<string>? supportedProtocols) 36if (_availableProtocols.TryGetValue(protocolName, out var protocol) && (supportedProtocols == null || supportedProtocols.Contains(protocolName, StringComparer.OrdinalIgnoreCase)))
SerializedHubMessage.cs (3)
41/// <param name="message">The hub message for the cache. This will be serialized with an <see cref="IHubProtocol"/> in <see cref="GetSerializedMessage"/> to get the message's serialized representation.</param> 50/// Gets the serialized representation of the <see cref="HubMessage"/> using the specified <see cref="IHubProtocol"/>. 54public ReadOnlyMemory<byte> GetSerializedMessage(IHubProtocol protocol)
src\aspnetcore\src\SignalR\common\Shared\MessageBuffer.cs (3)
27private readonly IHubProtocol _protocol; 64public MessageBuffer(ConnectionContext connection, IHubProtocol protocol, long bufferLimit, ILogger logger) 69public MessageBuffer(ConnectionContext connection, IHubProtocol protocol, long bufferLimit, ILogger logger, TimeProvider timeProvider)
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
JsonProtocolDependencyInjectionExtensions.cs (1)
38builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IHubProtocol, JsonHubProtocol>());