using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.AspNetCore.SignalR
{
public static class IClientProxyExtensions
{
///
/// Invokes a method on the connection(s) represented by the instance.
/// Does not wait for a response from the receiver.
///
/// The
/// name of the method to invoke
/// A task that represents when the data has been sent to the client.
public static Task SendAsync(this IClientProxy clientProxy, string method)
{
return clientProxy.SendCoreAsync(method, Array.Empty());
}
///
/// Invokes a method on the connection(s) represented by the instance.
/// Does not wait for a response from the receiver.
///
/// The
/// name of the method to invoke
/// The first argument
/// A task that represents when the data has been sent to the client.
public static Task SendAsync(this IClientProxy clientProxy, string method, object arg1)
{
return clientProxy.SendCoreAsync(method, new object[] { arg1 });
}
///
/// Invokes a method on the connection(s) represented by the instance.
/// Does not wait for a response from the receiver.
///
/// The
/// name of the method to invoke
/// The first argument
/// The second argument
/// A task that represents when the data has been sent to the client.
public static Task SendAsync(this IClientProxy clientProxy, string method, object arg1, object arg2)
{
return clientProxy.SendCoreAsync(method, new object[] { arg1, arg2 });
}
///
/// Invokes a method on the connection(s) represented by the instance.
/// Does not wait for a response from the receiver.
///
/// The
/// name of the method to invoke
/// The first argument
/// The second argument
/// The third argument
/// A task that represents when the data has been sent to the client.
public static Task SendAsync(this IClientProxy clientProxy, string method, object arg1, object arg2, object arg3)
{
return clientProxy.SendCoreAsync(method, new object[] { arg1, arg2, arg3 });
}
///
/// Invokes a method on the connection(s) represented by the instance.
/// Does not wait for a response from the receiver.
///
/// The
/// name of the method to invoke
/// The first argument
/// The second argument
/// The third argument
/// The fourth argument
/// A task that represents when the data has been sent to the client.
public static Task SendAsync(this IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4)
{
return clientProxy.SendCoreAsync(method, new object[] { arg1, arg2, arg3, arg4 });
}
///
/// Invokes a method on the connection(s) represented by the instance.
/// Does not wait for a response from the receiver.
///
/// The
/// name of the method to invoke
/// The first argument
/// The second argument
/// The third argument
/// The fourth argument
/// The fifth argument
/// A task that represents when the data has been sent to the client.
public static Task SendAsync(this IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4, object arg5)
{
return clientProxy.SendCoreAsync(method, new object[] { arg1, arg2, arg3, arg4, arg5 });
}
///
/// Invokes a method on the connection(s) represented by the instance.
/// Does not wait for a response from the receiver.
///
/// The
/// name of the method to invoke
/// The first argument
/// The second argument
/// The third argument
/// The fourth argument
/// The fifth argument
/// The sixth argument
/// A task that represents when the data has been sent to the client.
public static Task SendAsync(this IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6)
{
return clientProxy.SendCoreAsync(method, new object[] { arg1, arg2, arg3, arg4, arg5, arg6 });
}
///
/// Invokes a method on the connection(s) represented by the instance.
/// Does not wait for a response from the receiver.
///
/// The
/// name of the method to invoke
/// The first argument
/// The second argument
/// The third argument
/// The fourth argument
/// The fifth argument
/// The sixth argument
/// The seventh argument
/// A task that represents when the data has been sent to the client.
public static Task SendAsync(this IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7)
{
return clientProxy.SendCoreAsync(method, new object[] { arg1, arg2, arg3, arg4, arg5, arg6, arg7 });
}
///
/// Invokes a method on the connection(s) represented by the instance.
/// Does not wait for a response from the receiver.
///
/// The
/// name of the method to invoke
/// The first argument
/// The second argument
/// The third argument
/// The fourth argument
/// The fifth argument
/// The sixth argument
/// The seventh argument
/// The eigth argument
/// A task that represents when the data has been sent to the client.
public static Task SendAsync(this IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8)
{
return clientProxy.SendCoreAsync(method, new object[] { arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 });
}
///
/// Invokes a method on the connection(s) represented by the instance.
/// Does not wait for a response from the receiver.
///
/// The
/// name of the method to invoke
/// The first argument
/// The second argument
/// The third argument
/// The fourth argument
/// The fifth argument
/// The sixth argument
/// The seventh argument
/// The eigth argument
/// The ninth argument
/// A task that represents when the data has been sent to the client.
public static Task SendAsync(this IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9)
{
return clientProxy.SendCoreAsync(method, new object[] { arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 });
}
///
/// Invokes a method on the connection(s) represented by the instance.
/// Does not wait for a response from the receiver.
///
/// The
/// name of the method to invoke
/// The first argument
/// The second argument
/// The third argument
/// The fourth argument
/// The fifth argument
/// The sixth argument
/// The seventh argument
/// The eigth argument
/// The ninth argument
/// The tenth argument
/// A task that represents when the data has been sent to the client.
public static Task SendAsync(this IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9, object arg10)
{
return clientProxy.SendCoreAsync(method, new object[] { arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10 });
}
}
}