Esempio n. 1
0
        public void TestGetOptInSetting()
        {
            // Just assert this doesn't throw, depending on the install the
            // value could be true or false.
            CloudSdkSettings.GetOptIntoUsageReporting();

            // Same with above. If the user opted into settings (and has ran
            // the Python bits at least once) the value will be stable.
            // Otherwise it will be different each time.
            CloudSdkSettings.GetAnoymousClientID();
        }
Esempio n. 2
0
 private static IReportCmdletResults NewTelemetryReporter()
 {
     if (CloudSdkSettings.GetOptIntoUsageReporting())
     {
         string clientID = CloudSdkSettings.GetAnoymousClientID();
         return(new GoogleAnalyticsCmdletReporter(clientID, AnalyticsEventCategory.ProviderInvocation));
     }
     else
     {
         return(new InMemoryCmdletResultReporter());
     }
 }