Reputation: 1
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?
Upvotes: 0
Views: 239
Reputation: 2440
Thank you Orhun. Posting your suggestion as an answer so that it will be helpful for other community members who face similar kind of issues.
To call the function from another function then you need to use the Azure Durable Functions. which allows you to create chain functions.
Upvotes: 0