Ejemplo n.º 1
0
 public ServiceScope(TestableHost host, RestartManager.IServiceProvider services)
 {
     this.host     = host;
     host.Services = services;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Sets the <paramref name="services"/> on the <see cref="TestableHost"/> for the current <see cref="Runspace"/>.
 /// </summary>
 /// <param name="services">The <see cref="RestartManager.IServiceProvider"/> to set on the <see cref="TestableHost"/>.</param>
 /// <returns>An <see cref="IDisposable"/> object that will unset the <paramref name="services"/> when disposed.</returns>
 internal IDisposable UseServices(RestartManager.IServiceProvider services)
 {
     return(new ServiceScope(host, services));
 }