public void Send <TNotification>(TNotification notification, string identCode) { Type type = typeof(TNotification); List <ActionIdentifier> typeActionIdentifiers = _references[type]; foreach (ActionIdentifier actionIdentifier in typeActionIdentifiers) { if (actionIdentifier.IdentificationCode == identCode) { IActionParameter actionParameter = actionIdentifier.Action as IActionParameter; if (actionParameter != null) { actionParameter.ExecuteWithParameter(notification); } else { actionIdentifier.Action.Execute(); } } } }
public static void PublishGlobalVars(this IPublishValueService publishValueService, IActionParameter actionParameter, IDictionary <string, object> values) { _ = publishValueService ?? throw new ArgumentNullException(nameof(publishValueService)); if (values == null) { return; } foreach (var kv in values) { publishValueService.PublishGlobalVars(kv.Key, kv.Value, actionParameter); } }
private object GetJArrayDynamicValue(JArray jArray, IActionParameter actionParameter) { return(new JArray(jArray.Select(p => GetDynamicValue(p, actionParameter)).ToArray())); }