Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Browser"/> class.
 /// </summary>
 /// <param name="bootstrapper">A <see cref="INancyBootstrapper"/> instance that determines the Nancy configuration that should be used by the browser.</param>
 /// <param name="defaults">The default <see cref="BrowserContext"/> that should be used in a all requests through this browser object.</param>
 public Browser(INancyBootstrapper bootstrapper, Action <BrowserContext> defaults = null)
 {
     bootstrapper.Initialise();
     this.engine                = bootstrapper.GetEngine();
     this.environment           = bootstrapper.GetEnvironment();
     this.defaultBrowserContext = defaults ?? DefaultBrowserContext;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Browser"/> class.
 /// </summary>
 /// <param name="bootstrapper">A <see cref="INancyBootstrapper"/> instance that determines the Nancy configuration that should be used by the browser.</param>
 /// <param name="defaults">The default <see cref="BrowserContext"/> that should be used in a all requests through this browser object.</param>
 public Browser(INancyBootstrapper bootstrapper, Action<BrowserContext> defaults = null)
 {
     bootstrapper.Initialise();
     this.engine = bootstrapper.GetEngine();
     this.environment = bootstrapper.GetEnvironment();
     this.defaultBrowserContext = defaults ?? DefaultBrowserContext;
 }