예제 #1
0
 internal void SetInitializedSubstate(ActivityExecutor executor)
 {
     this.substate = Substate.Initialized;
     if (executor.ShouldTrackActivityStateRecordsExecutingState && executor.ShouldTrackActivity(this.Activity.DisplayName))
     {
         executor.AddTrackingRecord(new ActivityStateRecord(executor.WorkflowInstanceId, this, this.state));
     }
     if ((this.Activity.RuntimeArguments.Count > 0) && TD.InArgumentBoundIsEnabled())
     {
         for (int i = 0; i < this.Activity.RuntimeArguments.Count; i++)
         {
             Location        location;
             RuntimeArgument argument = this.Activity.RuntimeArguments[i];
             if (ArgumentDirectionHelper.IsIn(argument.Direction) && this.environment.TryGetLocation(argument.Id, this.Activity, out location))
             {
                 string str = null;
                 if (location.Value == null)
                 {
                     str = "<Null>";
                 }
                 else
                 {
                     str = "'" + location.Value.ToString() + "'";
                 }
                 TD.InArgumentBound(argument.Name, this.Activity.GetType().ToString(), this.Activity.DisplayName, this.Id, str);
             }
         }
     }
 }
        public RuntimeDelegateArgument(string name, Type type, ArgumentDirection direction, DelegateArgument boundArgument)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw FxTrace.Exception.ArgumentNullOrEmpty("name");
            }

            if (type == null)
            {
                throw FxTrace.Exception.ArgumentNull("type");
            }

            ArgumentDirectionHelper.Validate(direction, "direction");

            if (boundArgument != null)
            {
                // Validations that the bound argument matches are done
                // in CacheMetadata for ActivityDelegate.

                boundArgument.Bind(this);
            }

            this.Name          = name;
            this.Type          = type;
            this.Direction     = direction;
            this.BoundArgument = boundArgument;
        }
예제 #3
0
        public RuntimeArgument(string name, Type argumentType, ArgumentDirection direction, bool isRequired, List <string> overloadGroupNames)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw FxTrace.Exception.ArgumentNullOrEmpty(nameof(name));
            }

            ArgumentDirectionHelper.Validate(direction, "direction");

            this.name               = name;
            this.type               = argumentType ?? throw FxTrace.Exception.ArgumentNull(nameof(argumentType));
            this.Direction          = direction;
            this.IsRequired         = isRequired;
            this.overloadGroupNames = overloadGroupNames;
        }
예제 #4
0
 public RuntimeDelegateArgument(string name, System.Type type, ArgumentDirection direction, DelegateArgument boundArgument)
 {
     if (string.IsNullOrEmpty(name))
     {
         throw FxTrace.Exception.ArgumentNullOrEmpty("name");
     }
     if (type == null)
     {
         throw FxTrace.Exception.ArgumentNull("type");
     }
     ArgumentDirectionHelper.Validate(direction, "direction");
     if (boundArgument != null)
     {
         boundArgument.Bind(this);
     }
     this.Name          = name;
     this.Type          = type;
     this.Direction     = direction;
     this.BoundArgument = boundArgument;
 }
예제 #5
0
 public static bool IsOut(Argument?argument) => ArgumentDirectionHelper.IsOut(argument?.Direction);
 public static bool IsOut(Argument argument)
 {
     return(ArgumentDirectionHelper.IsOut(argument.Direction));
 }