public async Task Any(PostObjectToChannel request) { if (request.ToUserId != null) { if (request.CustomType != null) { await ServerEvents.NotifyUserIdAsync(request.ToUserId, request.Selector ?? Selector.Id <CustomType>(), request.CustomType); } if (request.SetterType != null) { await ServerEvents.NotifyUserIdAsync(request.ToUserId, request.Selector ?? Selector.Id <SetterType>(), request.SetterType); } } else { if (request.CustomType != null) { await ServerEvents.NotifyChannelAsync(request.Channel, request.Selector ?? Selector.Id <CustomType>(), request.CustomType); } if (request.SetterType != null) { await ServerEvents.NotifyChannelAsync(request.Channel, request.Selector ?? Selector.Id <SetterType>(), request.SetterType); } } }
public void Any(PostObjectToChannel request) { if (request.ToUserId != null) { if (request.CustomType != null) ServerEvents.NotifyUserId(request.ToUserId, request.Selector ?? Selector.Id<CustomType>(), request.CustomType); if (request.SetterType != null) ServerEvents.NotifyUserId(request.ToUserId, request.Selector ?? Selector.Id<SetterType>(), request.SetterType); } else { if (request.CustomType != null) ServerEvents.NotifyChannel(request.Channel, request.Selector ?? Selector.Id<CustomType>(), request.CustomType); if (request.SetterType != null) ServerEvents.NotifyChannel(request.Channel, request.Selector ?? Selector.Id<SetterType>(), request.SetterType); } }