/// <summary>
        /// Get the assembly version of a service client.
        /// </summary>
        /// <returns>The assembly version of the client.</returns>
        internal static void UpdateUserAgentAssemblyVersion(IAzureClient clientToUpdate, string assemblyVersionToUse)
        {
            var type = clientToUpdate.GetType();

            var newVersion = string.IsNullOrEmpty(assemblyVersionToUse) ?
                             PackageVersion : assemblyVersionToUse;

            foreach (
                var info in
                clientToUpdate.HttpClient.DefaultRequestHeaders.UserAgent.Where(
                    info => info.Product.Name.Equals(type.FullName, StringComparison.OrdinalIgnoreCase)))
            {
                clientToUpdate.HttpClient.DefaultRequestHeaders.UserAgent.Remove(info);
                clientToUpdate.HttpClient.DefaultRequestHeaders.UserAgent.Add(
                    new System.Net.Http.Headers.ProductInfoHeaderValue(type.FullName, newVersion));
                break;
            }
        }