public override void SetUp()
        {
            base.SetUp();

            ownerMock = new Mock <IParametric>();
            owner     = ownerMock.Object;
        }
        public VirtualParameter(IParametric owner)
        {
            this.owner = owner;

            Name          = new SingleConfiguration <VirtualParameter, string>(this, nameof(Name), true);
            ParameterType = new SingleConfiguration <VirtualParameter, IType>(this, nameof(ParameterType), true);
            Index         = new SingleConfiguration <VirtualParameter, int>(this, nameof(Index));
        }
        public ProxyParameter(IParameter real, IParametric owner, int index)
        {
            if (index < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(index), index, "'index' cannot be less than zero");
            }

            this.real  = real ?? throw new ArgumentNullException(nameof(real));
            this.index = index;

            Owner = owner ?? throw new ArgumentNullException(nameof(owner));
        }
        public static bool HasParameters(this IParametric source, IType firstParameterType, params IType[] otherParameterTypes)
        {
            var parameterTypes = new List <IType> {
                firstParameterType
            };

            parameterTypes.AddRange(otherParameterTypes);

            if (source.Parameters.Count != parameterTypes.Count)
            {
                return(false);
            }

            for (var i = 0; i < source.Parameters.Count; i++)
            {
                if (!parameterTypes[i].CanBe(source.Parameters[i].ParameterType))
                {
                    return(false);
                }
            }

            return(true);
        }
 public ParameterBuilder(IParametric owner)
 {
     this.owner = owner;
 }
 public ProxyParameter(IParameter real, IParametric owner) : this(real, owner, 0)
 {
 }
 public static bool HasParameters <T1, T2, T3, T4, T5, T6, T7>(this IParametric source) => source.HasParameters(type.of <T1>(), type.of <T2>(), type.of <T3>(), type.of <T4>(), type.of <T5>(), type.of <T6>(), type.of <T7>());
 public static bool HasParameters <T1, T2, T3>(this IParametric source) => source.HasParameters(type.of <T1>(), type.of <T2>(), type.of <T3>());
 public static bool HasParameters <T>(this IParametric source) => source.HasParameters(type.of <T>());
 public static bool HasNoParameters(this IParametric source) => source.Parameters.Count == 0;
 public IdenticalSignatureAlreadyAddedException(IParametric parametric)
     : base(
         $"{parametric.Name}({string.Join(", ", parametric.Parameters.Select(p => $"{p.ParameterType.Name} {p.Name}"))}) already added")
 {
 }