Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="3.1.0-preview-544" />

 Rules

public static class Rules
Represents the predefined configuration rules of the StashboxContainer.
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; namespace Stashbox.Configuration { public static class Rules { public enum RegistrationBehavior { SkipDuplications, ThrowException, ReplaceExisting, PreserveDuplications } [Flags] public enum AutoMemberInjectionRules { None = 0, PropertiesWithPublicSetter = 4, PropertiesWithLimitedAccess = 8, PrivateFields = 16 } public static class ConstructorSelection { public static readonly Func<IEnumerable<ConstructorInfo>, IEnumerable<ConstructorInfo>> PreferMostParameters = (IEnumerable<ConstructorInfo> constructors) => from constructor in constructors orderby constructor.GetParameters().Length descending select constructor; public static readonly Func<IEnumerable<ConstructorInfo>, IEnumerable<ConstructorInfo>> PreferLeastParameters = (IEnumerable<ConstructorInfo> constructors) => from constructor in constructors orderby constructor.GetParameters().Length select constructor; } } }