FizVizController/FizVizController/Views/GoogleAnalyticsConfig.xaml.cs
/// <summary>
/// Authenticate, and then update the profile list.
/// </summary>
/// <returns></returns>
Authenticate, and then update the profile list.
Authenticate and then update the profile list .
private async Task DoAuthAsync()
        {
            try
            {
                Task t = App.AnalyticsManager.AuthenticateAsync();
                await t;
                IList<Profile> profiles = App.AnalyticsManager.GetAvailableProfiles();
                ProfileSiteComboBox.Items.Clear();
                foreach (Profile profile in profiles)
                {
                    Debug.WriteLine(profile.WebsiteUrl);
                    ProfileSiteComboBox.DisplayMemberPath = "Key";
                    ProfileSiteComboBox.SelectedValuePath = "Value";
                    ProfileSiteComboBox.Items.Add(new KeyValuePair<string, string>(profile.WebsiteUrl, profile.Id));
                }
                AuthenticationStatusLabel.Text = "Status: Authenticated";
            }
            catch (AggregateException e)
            {
                Debug.WriteLine(e);
            }
        }
private async Task DoAuthAsync ( ) { try { Task t = App . AnalyticsManager . AuthenticateAsync ( ) ; await t ; IList < Profile > profiles = App . AnalyticsManager . GetAvailableProfiles ( ) ; ProfileSiteComboBox . Items . Clear ( ) ; foreach ( Profile profile in profiles ) { Debug . WriteLine ( profile . WebsiteUrl ) ; ProfileSiteComboBox . DisplayMemberPath = " " ; ProfileSiteComboBox . SelectedValuePath = " " ; ProfileSiteComboBox . Items . Add ( new KeyValuePair < string , string > ( profile . WebsiteUrl , profile . Id ) ) ; } AuthenticationStatusLabel . Text = " " ; } catch ( AggregateException e ) { Debug . WriteLine ( e ) ; } }
Authenticate, and then update the profile list.
Authenticate and then update the profile list .
None