protected override void Execute(NativeActivityContext context)
        {
            if (Delegate == null || Delegate.Handler == null)
            {
                if (this.Default != null)
                {
                    context.ScheduleActivity(this.Default);
                }

                return;
            }

            Dictionary <string, object> inputParameters = new Dictionary <string, object>();

            if (DelegateArguments.Count > 0)
            {
                foreach (KeyValuePair <string, Argument> entry in DelegateArguments)
                {
                    if (ArgumentDirectionHelper.IsIn(entry.Value.Direction))
                    {
                        inputParameters.Add(entry.Key, entry.Value.Get(context));
                    }
                }
            }

            context.ScheduleDelegate(Delegate, inputParameters, new DelegateCompletionCallback(OnHandlerComplete), null);
        }
 protected override void Execute(NativeActivityContext context)
 {
     if ((this.Delegate != null) && (this.Delegate.Handler != null))
     {
         Dictionary<string, object> inputParameters = new Dictionary<string, object>();
         if (this.DelegateArguments.Count > 0)
         {
             foreach (KeyValuePair<string, Argument> pair in this.DelegateArguments)
             {
                 if (ArgumentDirectionHelper.IsIn(pair.Value.Direction))
                 {
                     inputParameters.Add(pair.Key, pair.Value.Get(context));
                 }
             }
         }
         context.ScheduleDelegate(this.Delegate, inputParameters, new DelegateCompletionCallback(this.OnHandlerComplete), null);
     }
 }
 protected override void Execute(NativeActivityContext context)
 {
     if ((this.Delegate != null) && (this.Delegate.Handler != null))
     {
         Dictionary <string, object> inputParameters = new Dictionary <string, object>();
         if (this.DelegateArguments.Count > 0)
         {
             foreach (KeyValuePair <string, Argument> pair in this.DelegateArguments)
             {
                 if (ArgumentDirectionHelper.IsIn(pair.Value.Direction))
                 {
                     inputParameters.Add(pair.Key, pair.Value.Get(context));
                 }
             }
         }
         context.ScheduleDelegate(this.Delegate, inputParameters, new DelegateCompletionCallback(this.OnHandlerComplete), null);
     }
 }
Exemplo n.º 4
0
        protected override void Execute(NativeActivityContext context)
        {
            if (Delegate == null || Delegate.Handler == null)
            {
                if (this.Default != null)
                {
                    context.ScheduleActivity(this.Default);
                }

                return;
            }

            Dictionary<string, object> inputParameters = new Dictionary<string, object>();

            if (DelegateArguments.Count > 0)
            {
                foreach (KeyValuePair<string, Argument> entry in DelegateArguments)
                {
                    if (ArgumentDirectionHelper.IsIn(entry.Value.Direction))
                    {
                        inputParameters.Add(entry.Key, entry.Value.Get(context));
                    }
                }
            }

            context.ScheduleDelegate(Delegate, inputParameters, new DelegateCompletionCallback(OnHandlerComplete), null);
        }