예제 #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();
            }
        }
예제 #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;
        }
예제 #3
0
 internal WorkItem(BakingSettings settings, DateTime atOrAfter, ManualResetEvent waiter)
 {
     this.Settings = settings;
     this.AtOrAfter = atOrAfter;
     this.Waiter = waiter;
 }
예제 #4
0
 internal void EnqueueBaking(BakingSettings settings, ManualResetEvent waiter = null)
 {
     this.WorkItems.Enqueue(new BakingWorkItem(settings.Clone(), DateTime.MinValue, waiter));
     this.Waiter.Set();
 }
예제 #5
0
 internal void EnqueueScan(BakingSettings settings)
 {
     this.EnqueueScan(settings, DateTime.MinValue);
 }
예제 #6
0
 internal ScanWorkItem(BakingSettings settings, DateTime atOrAfter, ManualResetEvent waiter = null)
     : base(settings, atOrAfter, waiter)
 {
 }
예제 #7
0
 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);
 }
예제 #10
0
 internal void EnqueueBaking(BakingSettings settings, ManualResetEvent waiter = null)
 {
     this.WorkItems.Enqueue(new BakingWorkItem(settings.Clone(), DateTime.MinValue, waiter));
     this.Waiter.Set();
 }
예제 #11
0
파일: WorkItem.cs 프로젝트: rajgit31/MoqRT
 internal WorkItem(BakingSettings settings, DateTime atOrAfter, ManualResetEvent waiter)
 {
     this.Settings  = settings;
     this.AtOrAfter = atOrAfter;
     this.Waiter    = waiter;
 }
예제 #12
0
 internal Resolver(BakingSettings settings)
 {
     this.Settings = settings;
     AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
 }