예제 #1
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this.WorkerRequest != null)
         {
             this.WorkerRequest.Dispose();
             this.WorkerRequest = null;
         }
     }
 }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UnitTestWorkerDriver"/> class.
        /// </summary>
        /// <param name="workerRequest">The worker request.</param>
        public UnitTestWorkerDriver(IWorkerRequest workerRequest)
        {
            Check.Current.ArgumentNullException(workerRequest, "workerRequest");

            this.InitAppDomain(workerRequest);
        }
예제 #3
0
        /// <summary>
        /// Initialize the application domain.
        /// </summary>
        /// <param name="worker">The worker request.</param>
        private void InitAppDomain(IWorkerRequest worker)
        {
            CopyBinaries();

            this.WorkerRequest = (IWorkerRequest)ApplicationHost.CreateApplicationHost(worker.GetType(), "/", BaseDirectory);
        }