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;
        }
Example #2
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;
        }
Example #3
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;
 }