public long GetRequestNumber(RequestNumberGenerationMethod method, long increment) { long requestNumber; switch (method) { case RequestNumberGenerationMethod.UnixTimestamp: requestNumber = (long)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds; break; case RequestNumberGenerationMethod.LiteralTimestamp: string timestamp = DateTime.UtcNow.ToString("yyMMddHHmmssfff", CultureInfo.InvariantCulture.DateTimeFormat); requestNumber = long.Parse(timestamp, NumberStyles.Integer, CultureInfo.InvariantCulture.NumberFormat); break; default: throw new ArgumentOutOfRangeException(); } requestNumber += increment; return(requestNumber); }
public long GetRequestNumber(RequestNumberGenerationMethod method, long increment) { throw new NotImplementedException(); }