/// <summary> /// Records API operation count for a user. /// </summary> /// <param name="user">The AdWords user who made the call.</param> /// <param name="service">The AdWords API service that was called.</param> /// <param name="methodName">The name of the method that was called.</param> /// <param name="operationCount">The number of API operations for the /// current call.</param> private static void RecordApiOperationCount(AdWordsUser user, AdsClient service, string methodName, int operationCount) { if (user != null) { ApiCallEntry entry = new ApiCallEntry(); entry.Service = service; entry.Method = methodName; entry.OperationCount = operationCount; user.AddCallDetails(entry); } }