private void Add(Type type, MissingConstructor missingConstructor) { if (missingConstructor == MissingConstructor.Throw && !HasValidConstructor(type)) { throw new MissingConstructorException(type); } if (missingConstructor == MissingConstructor.Ignore && !HasValidConstructor(type)) { return; } if (conventions.Contains(type) && !AllowMultiplesOf(type)) { return; } conventions.Add(type, Instantiate(type)); log.ConventionDiscovered(type); }