public static async Task <TStreamingHub> ConnectAsync <TStreamingHub, TReceiver>(IMagicOnionAwareGrpcChannel channel, TReceiver receiver, string host = null, CallOptions option = default(CallOptions), MessagePackSerializerOptions serializerOptions = null, IMagicOnionClientLogger logger = null, CancellationToken cancellationToken = default) where TStreamingHub : IStreamingHub <TStreamingHub, TReceiver> { var hubClient = await ConnectAsync <TStreamingHub, TReceiver>(channel.CreateCallInvoker(), receiver, host, option, serializerOptions, logger, cancellationToken); channel.ManageStreamingHubClient(typeof(TStreamingHub), hubClient, hubClient.DisposeAsync, hubClient.WaitForDisconnect()); return(hubClient); }
public static T Create <T>(IMagicOnionAwareGrpcChannel channel, MessagePackSerializerOptions serializerOptions, IClientFilter[] clientFilters) where T : IService <T> => Create <T>(channel.CreateCallInvoker(), serializerOptions, clientFilters);
public static T Create <T>(IMagicOnionAwareGrpcChannel channel) where T : IService <T> => Create <T>(channel.CreateCallInvoker());