Beispiel #1
0
        internal void EnqueueScan(BakingSettings settings, DateTime dt)
        {
            var existing = this.WorkItems.Where(v => v.Settings.AssemblyPath == settings.AssemblyPath &&
                                                v.AtOrAfter != DateTime.MinValue).FirstOrDefault();

            if (existing != null)
            {
                existing.AtOrAfter = dt;
                return;
            }
            else
            {
                this.WorkItems.Enqueue(new ScanWorkItem(settings.Clone(), dt));
                this.Waiter.Set();
            }
        }
Beispiel #2
0
        public void Run(BakingSettings settings)
        {
            if (this.IsRunning)
            {
                throw new InvalidOperationException("Already running.");
            }

            // create...
            this.Log(string.Format("Starting monitoring of '{0}'...", settings.AssemblyPath));

            // run...
            this.LastSettings = settings.Clone();
            this.Runner.EnqueueScan(this.LastSettings);

            // ok...
            this.IsRunning = true;
        }
Beispiel #3
0
 internal void EnqueueBaking(BakingSettings settings, ManualResetEvent waiter = null)
 {
     this.WorkItems.Enqueue(new BakingWorkItem(settings.Clone(), DateTime.MinValue, waiter));
     this.Waiter.Set();
 }
 internal void EnqueueScan(BakingSettings settings, DateTime dt)
 {
     var existing = this.WorkItems.Where(v => v.Settings.AssemblyPath == settings.AssemblyPath && 
         v.AtOrAfter != DateTime.MinValue).FirstOrDefault();
     if (existing != null)
     {
         existing.AtOrAfter = dt;
         return;
     }
     else
     {
         this.WorkItems.Enqueue(new ScanWorkItem(settings.Clone(), dt));
         this.Waiter.Set();
     }
 }
 internal void EnqueueBaking(BakingSettings settings, ManualResetEvent waiter = null)
 {
     this.WorkItems.Enqueue(new BakingWorkItem(settings.Clone(), DateTime.MinValue, waiter));
     this.Waiter.Set();
 }