private static ConstructorInfo GetSinglePublicConstructor(Type implementationType) { return ( from ctor in implementationType.GetConstructors() orderby ctor.GetParameters().Length descending select ctor) .First(); }