private List <IConstructorWrapper> TryToObtainNonPublicConstructors(Func <ConstructorInfo, bool> accessCriteria) { var constructorInfos = _typeInfo.GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic); var enumerable = constructorInfos.Where(accessCriteria); var wrappers = enumerable.Select(c => (IConstructorWrapper)(ConstructorWrapper.FromConstructorInfo(c))).ToList(); return(wrappers); }
private List <IConstructorWrapper> TryToObtainInternalConstructors() { var constructorInfos = _typeInfo.GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic); var enumerable = constructorInfos.Where(ConstructorWrapper.IsInternal); var wrappers = enumerable.Select(c => (IConstructorWrapper)(ConstructorWrapper.FromConstructorInfo(c))).ToList(); return(wrappers); }
public List <ConstructorWrapper> TryToObtainPublicConstructors() { return(_typeInfo.GetConstructors(BindingFlags.Public | BindingFlags.Instance) .Select(c => ConstructorWrapper.FromConstructorInfo(c)).ToList()); }