public AutoHash(Func <TKey, TValue> defaultLambda, bool autoAddDefault, IEqualityComparer <TKey> comparer) : this(comparer) { defaultLambda.Must().Not.BeNull().OrThrow(); comparer.Must().Not.BeNull().OrThrow(); Default = DefaultType.Lambda; this.defaultLambda = defaultLambda; AutoAddDefault = autoAddDefault; }
public AutoHash(TValue defaultValue, bool autoAddDefault, IEqualityComparer <TKey> comparer) : this(comparer) { comparer.Must().Not.BeNull().OrThrow(); Default = DefaultType.Value; DefaultValue = defaultValue; AutoAddDefault = autoAddDefault; defaultLambda = _ => default; }