public void DayRangeForUser()
{
// Get min and max dates
int min;
int max;
string user;
Console.WriteLine("Enter user (User-1):");
user = Console.ReadLine().Trim();
Console.WriteLine("\nEnter start day (0 is today, 365 is 1 year ago):");
min = int.Parse(Console.ReadLine());
Console.WriteLine("Enter end day:");
max = int.Parse(Console.ReadLine());
if (min > max) {
int temp = max;
max = min;
min = temp;
}
List<Key> KeyList = new List<Key> ();
for (int y = min; y <= max; y ++) {
DateTime EventDay = epoch.Subtract (TimeSpan.FromDays (y));
String DateString = EventDay.ToString ("yyyy-MM-dd");
String EventKeyString = user + ":" + DateString + ":" + 1;
Key EventKey = new Key ("test", "user-events", EventKeyString);
KeyList.Add (EventKey);
}
Key[] keys = KeyList.ToArray ();
Record[] records = client.Get (null, keys);
int count = 0;
foreach (Record record in records) {
if (record != null) {
Console.WriteLine (EventToString (record));
count++;
}
}
Console.WriteLine("Records found: " + count);
}