Esempio n. 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();
            }
        }
Esempio n. 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;
        }
Esempio n. 3
0
 internal WorkItem(BakingSettings settings, DateTime atOrAfter, ManualResetEvent waiter)
 {
     this.Settings = settings;
     this.AtOrAfter = atOrAfter;
     this.Waiter = waiter;
 }
Esempio n. 4
0
 internal void EnqueueBaking(BakingSettings settings, ManualResetEvent waiter = null)
 {
     this.WorkItems.Enqueue(new BakingWorkItem(settings.Clone(), DateTime.MinValue, waiter));
     this.Waiter.Set();
 }
Esempio n. 5
0
 internal void EnqueueScan(BakingSettings settings)
 {
     this.EnqueueScan(settings, DateTime.MinValue);
 }
Esempio n. 6
0
 internal ScanWorkItem(BakingSettings settings, DateTime atOrAfter, ManualResetEvent waiter = null)
     : base(settings, atOrAfter, waiter)
 {
 }
 internal Resolver(BakingSettings settings)
 {
     this.Settings = settings;
     AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
 }
 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 EnqueueScan(BakingSettings settings)
 {
     this.EnqueueScan(settings, DateTime.MinValue);
 }
 internal void EnqueueBaking(BakingSettings settings, ManualResetEvent waiter = null)
 {
     this.WorkItems.Enqueue(new BakingWorkItem(settings.Clone(), DateTime.MinValue, waiter));
     this.Waiter.Set();
 }
Esempio n. 11
0
 internal WorkItem(BakingSettings settings, DateTime atOrAfter, ManualResetEvent waiter)
 {
     this.Settings  = settings;
     this.AtOrAfter = atOrAfter;
     this.Waiter    = waiter;
 }
Esempio n. 12
0
 internal Resolver(BakingSettings settings)
 {
     this.Settings = settings;
     AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
 }