public TimeAuthenticator(IUsedCodesManager usedCodeManager = null, Func <DateTime> nowFunc = null, int intervalSeconds = 30, int verificationRange = 2) { this.NowFunc = nowFunc ?? (() => DateTime.Now); this.UsedCodeManager = usedCodeManager ?? DefaultUsedCodeManager.Value; this.IntervalSeconds = intervalSeconds; this.VerificationRange = verificationRange; }
public TimeAuthenticator(IUsedCodesManager usedCodeManager = null, Func<DateTime> nowFunc = null, int intervalSeconds = 30) { this.NowFunc = (nowFunc == null) ? () => DateTime.Now : nowFunc; this.UsedCodeManager = (usedCodeManager == null) ? DefaultUsedCodeManager.Value : usedCodeManager; this.IntervalSeconds = intervalSeconds; }
public TimeAuthenticator(IUsedCodesManager usedCodeManager = null, Func <DateTime> nowFunc = null, int intervalSeconds = 30) { NowFunc = nowFunc ?? (() => DateTime.Now); UsedCodeManager = usedCodeManager ?? DefaultUsedCodeManager.Value; IntervalSeconds = intervalSeconds; }