public DatabaseElapsedTimeInfo(ElapsedTimeInfo info) { if (info == null) { return; } AggregateData = info.GetValue(ElapsedDataMemberType.AggregateData); RetrieveDataFromDatabase = info.GetValue(ElapsedDataMemberType.RetrieveDataFromDatabase); RetrieveDataFromExternalService = info.GetValue(ElapsedDataMemberType.RetrieveDataFromExternalService); StoreAggregatedData = info.GetValue(ElapsedDataMemberType.StoreAggregatedData); StoreDataToDatabase = info.GetValue(ElapsedDataMemberType.StoreDataToDatabase); }
private static void DisplayOrders(ElapsedTimeInfo elapsedTimeInfo, List <OrderItemTwo> orders) { foreach (var order in orders) { Console.WriteLine(order.ToString()); } Console.WriteLine("RetrieveDataFromExternalService took {0} s", elapsedTimeInfo.GetValue(ElapsedDataMemberType.RetrieveDataFromExternalService)); Console.WriteLine("Number of orders: {0}", orders.Count); }