/// <summary>
        /// Retrieve statistics related to replication for the Table service
        /// </summary>
        /// <param name="queueClient"></param>
        private static async Task ServiceStatsSample(CloudQueueClient queueClient)
        {
            Console.WriteLine();

            var originalLocation = queueClient.DefaultRequestOptions.LocationMode;

            Console.WriteLine("Service stats:");
            try
            {
                queueClient.DefaultRequestOptions.LocationMode = LocationMode.SecondaryOnly;
                ServiceStats stats = await queueClient.GetServiceStatsAsync();

                Console.WriteLine("    Last sync time: {0}", stats.GeoReplication.LastSyncTime);
                Console.WriteLine("    Status: {0}", stats.GeoReplication.Status);
            }
            catch (StorageException)
            {
                // only works on RA-GRS (Read Access – Geo Redundant Storage)
            }
            finally
            {
                // Restore original value
                queueClient.DefaultRequestOptions.LocationMode = originalLocation;
            }

            Console.WriteLine();
        }