Пример #1
0
 private static Dictionary <string, string> GetProperties(RepositoryToScanSettings settings)
 {
     return(new Dictionary <string, string>()
     {
         { PropertyKeys.OrganizationName, settings?.OrganizationName ?? "NULL" },
         { PropertyKeys.RepositoryName, settings?.RepositoryName ?? "NULL" },
         { PropertyKeys.RepositoryPath, settings?.RepositoryPath ?? "NULL" },
         { PropertyKeys.RepositoryMode, settings?.RepositoryMode.ToString() },
         { PropertyKeys.TransmissionMode, settings?.TransmissionMode.ToString() },
         { PropertyKeys.JobExecutionCron, settings?.JobExecutionCron ?? "NULL" },
     });
 }
Пример #2
0
 /// <summary>
 /// When added to schedule
 /// </summary>
 /// <param name="telemetryClient"></param>
 /// <param name="settings"></param>
 /// <exception cref="ArgumentNullException"></exception>
 public static void TrackRecurringJobScheduled(this TelemetryClient telemetryClient, RepositoryToScanSettings settings)
 {
     if (telemetryClient == null)
     {
         throw new ArgumentNullException(nameof(telemetryClient));
     }
     telemetryClient.TrackEvent(Names.RecurringJobScheduled, GetProperties(settings));
 }