Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public static T Create <T>(IMagicOnionAwareGrpcChannel channel, MessagePackSerializerOptions serializerOptions, IClientFilter[] clientFilters)
     where T : IService <T>
 => Create <T>(channel.CreateCallInvoker(), serializerOptions, clientFilters);
Esempio n. 3
0
 public static T Create <T>(IMagicOnionAwareGrpcChannel channel)
     where T : IService <T>
 => Create <T>(channel.CreateCallInvoker());