예제 #1
0
        public RuntimeDelegateArgument(string name, Type type, ArgumentDirection direction, DelegateArgument boundArgument)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw CoreWf.Internals.FxTrace.Exception.ArgumentNullOrEmpty("name");
            }

            if (type == null)
            {
                throw CoreWf.Internals.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;
        }
예제 #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;
        }
예제 #3
0
        public RuntimeArgument(string name, Type argumentType, ArgumentDirection direction, bool isRequired, List <string> overloadGroupNames)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw CoreWf.Internals.FxTrace.Exception.ArgumentNullOrEmpty("name");
            }

            if (argumentType == null)
            {
                throw CoreWf.Internals.FxTrace.Exception.ArgumentNull("argumentType");
            }

            ArgumentDirectionHelper.Validate(direction, "direction");

            _name               = name;
            _type               = argumentType;
            this.Direction      = direction;
            this.IsRequired     = isRequired;
            _overloadGroupNames = overloadGroupNames;
        }
예제 #4
0
 public static bool IsOut(Argument argument)
 {
     return(ArgumentDirectionHelper.IsOut(argument.Direction));
 }