public void GetEffects(bool forAll) { if (StreamingSetup.Layers?.Count > 0) { var allEffects = EffectService.GetEffectViewModels(); if (forAll) { Clients.All.SendAsync("effects", allEffects); } else { Clients.Caller.SendAsync("effects", allEffects); } } }
public Task GetEffects(bool forAll) { if (StreamingSetup.Layers?.Count > 0) { var allEffects = EffectService.GetEffectViewModels(); if (forAll) { return(Clients.All.SendAsync("effects", allEffects)); } else { return(Clients.Caller.SendAsync("effects", allEffects)); } } return(Task.CompletedTask); }