Ejemplo n.º 1
0
        /// <inheritdoc />
        public async Task <T> Invoke <T>(string serviceName, string serviceMethod, params INextApiArgument[] arguments)
        {
            var command = NextApiClientUtils.PrepareCommand(serviceName, serviceMethod, arguments);

            if (TransportType == NextApiTransport.Http || arguments.Any(a => a is NextApiFileArgument) ||
                typeof(T) == typeof(NextApiFileResponse))
            {
                return(await InvokeHttp <T>(command));
            }

            return(await InvokeSignalR <T>(command));
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public async Task Invoke(string serviceName, string serviceMethod, params INextApiArgument[] arguments)
        {
            var command = NextApiClientUtils.PrepareCommand(serviceName, serviceMethod, arguments);

            if (TransportType == NextApiTransport.Http || arguments.Any(a => a is NextApiFileArgument))
            {
                await InvokeHttp <object>(command);

                return;
            }

            await InvokeSignalR <object>(command);
        }