public int NextValue(int current, string tag) { return new Random().Next(Math.Min(1000, Math.Max(0, current)), 1001); }