public Maybe <ICreateObjects> PickConstructorWithLeastNonPointersParameters() { ICreateObjects leastParamsConstructor = null; var constructors = For(_type).GetAllPublicConstructors(); var numberOfParams = int.MaxValue; foreach (var typeConstructor in constructors) { if ( typeConstructor.HasNonPointerArgumentsOnly() && typeConstructor.HasLessParametersThan(numberOfParams)) { leastParamsConstructor = typeConstructor; numberOfParams = typeConstructor.GetParametersCount(); } } return(leastParamsConstructor !.ToMaybe()); }
public ClassBuilderFactory(ICreateObjects objectFactory) { object_factory = objectFactory; }
public ReflectionClassBuilder(ICreateObjects object_factory) { this.object_factory = object_factory; }