private bool EvalRestrictionData(RestrictionData restData, Channel channel, bool canRunState, bool setState, ref string error) { if (restData.ChannelRestrictions.Any()) { if (restData.ChannelRestrictions.Contains(channel.Id) == setState) { canRunState = setState; } } else { canRunState = setState; } if (restData.ErrorMessage != null) { error = restData.ErrorMessage; } return(canRunState); }
private bool EvalRestrictionData(RestrictionData restData, Channel channel, bool canRunState, bool setState, ref string error) { if (restData.ChannelRestrictions.Any()) { if (restData.ChannelRestrictions.Contains(channel.Id) == setState) canRunState = setState; } else canRunState = setState; if (restData.ErrorMessage != null) error = restData.ErrorMessage; return canRunState; }