Exemple #1
0
        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();
                    }
                }
            }
        }
Exemple #2
0
 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);
     }
 }
Exemple #3
0
 private object GetJArrayDynamicValue(JArray jArray, IActionParameter actionParameter)
 {
     return(new JArray(jArray.Select(p => GetDynamicValue(p, actionParameter)).ToArray()));
 }