public void CloudQueueClientGetServiceStatsAPM() { AssertSecondaryEndpoint(); CloudQueueClient client = GenerateCloudQueueClient(); client.DefaultRequestOptions.LocationMode = LocationMode.SecondaryOnly; using (AutoResetEvent waitHandle = new AutoResetEvent(false)) { IAsyncResult result = client.BeginGetServiceStats( ar => waitHandle.Set(), null); waitHandle.WaitOne(); TestHelper.VerifyServiceStats(client.EndGetServiceStats(result)); result = client.BeginGetServiceStats( null, new OperationContext(), ar => waitHandle.Set(), null); waitHandle.WaitOne(); TestHelper.VerifyServiceStats(client.EndGetServiceStats(result)); } }