I have an Azure functions app in which I have separated my signalR code from http functions to separate logic. You can say that my functions which implement signalR functionality are internal functions. Following is an example
[FunctionName("AddToGroup")]
public static Task AddToGroup(
[SignalR(HubName ="match")]IAsyncCollector<SignalRGroupAction> signalRGroupActions,
string userId, string groupId
)
{
return signalRGroupActions.AddAsync(
new SignalRGroupAction
{
UserId = userId,
GroupName = groupId,
Action = GroupAction.Add
});
}
I want to be able to call this function such that signalRGroupActions are automatically injected by Azure just like when it is called using an HTTP trigger. However I am getting the following build error when I try to call this method.
There is no argument given that corresponds to the required formal parameter 'signalRGroupActions' of 'AddToGroup(IAsyncCollector, string, string)'
My question is how can I consume my methods like this?