Ejemplo n.º 1
0
 public static void DisplayPowerShellScript(IPowerShellScript script)
 {
     if (script == null) {
         Console.WriteLine("No PowerShellScript configured");
     } else {
         Console.WriteLine("PowerShellScript Path is {0}", script.Path);
         Console.WriteLine("PowerShellScript Frequency is {0}", script.Frequency);
         Console.WriteLine("PowerShellScript Debug is {0}", script.Debug);
     }
 }
Ejemplo n.º 2
0
 public void Start()
 {
     CtxTrace.TraceInformation();
     config = DesktopServiceConfiguration.Read();
     script = config.PowerShellScript;
     cancellationTokenSource = new CancellationTokenSource();
     if ((script  == null) || (script.Path == null)) {
         CtxTrace.TraceWarning("No script configured for desktop syncronisation");
     } else if (!script.Frequency.HasValue || (script.Frequency.Value == TimeSpan.Zero)) {
         CtxTrace.TraceWarning("Zero or missing frequency for desktop syncronisation script");
     } else {
         syncTask = Task.Factory.StartNew(() => SyncDesktopOfferings(), cancellationTokenSource.Token);
     }
 }