SDownload.Dialogs.UpdateAvailableDialog.LogUpdate C# (CSharp) Method

LogUpdate() private method

Log the update using Google Analytics
private LogUpdate ( ) : void
return void
        private async void LogUpdate()
        {
            const String logFormat = "v=1&tid=UA-44166717-4&cid=555&t=event&ec=Downloads&ea=Update&el={0}&ev=1";
            byte[] dataStream = Encoding.UTF8.GetBytes(String.Format(logFormat, versionNumberLabel.Text));
            WebRequest webRequest = WebRequest.Create("http://www.google-analytics.com/collect");
            webRequest.Method = "POST";
            webRequest.ContentType = "application/x-www-form-urlencoded";
            webRequest.ContentLength = dataStream.Length;  
            Stream newStream=webRequest.GetRequestStream();
            // Send the data.
            await newStream.WriteAsync(dataStream,0,dataStream.Length);
            newStream.Close();
        }