Ejemplo n.º 1
0
        public DependentConstructorKindArgument(ConstructorKind argument, IEnumerable <int> dependencies)
        {
            if (argument == null)
            {
                throw new ArgumentNullException(nameof(argument));
            }
            this.Argument     = argument;
            this.Dependencies = dependencies?.ToList().AsReadOnly();

            if (this.Dependencies.Count == 0)
            {
                throw new ArgumentException("must have dependencies");
            }

            if (!IsSorted(this.Dependencies))
            {
                throw new ArgumentException("dependencies must be sorted");
            }

            if (Argument.Arguments.Count <= Dependencies.Count)
            {
                throw new ArgumentException("invalid constructor");
            }

            if (!AllUsed(Argument, Dependencies.Count))
            {
                throw new ArgumentException("invalid constructor");
            }
        }
Ejemplo n.º 2
0
 private bool AllUsed(ConstructorKind argument, int count)
 {
     throw new NotImplementedException();
 }