/// <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; } } }
/// <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); }
/// <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); }