public void AddCall(Call call) { var serializer = new JavaScriptSerializer(); var content = serializer.Serialize(call); var message = new CloudQueueMessage(content); queue.AddMessage(message); }
public int SimulateCalls() { Random random = new Random(); int count = random.Next(1, 6); for (int i = 0; i < count; i++) { int phoneNumber = random.Next(); var call = new Call { ReceivedDate = DateTime.Now, PhoneNumber = phoneNumber.ToString("+1-000-000-0000") }; AddCall(call); } return count; }