public RavenDbServer Initialize(Action <RavenDBOptions> configure = null) { if (configuration.IgnoreSslCertificateErros == IgnoreSslCertificateErrorsMode.All) { // we ignore either all or none at the moment ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true; } owinHttpServer = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure); options = owinHttpServer.Options; serverThingsForTests = new ServerThingsForTests(options); documentStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke, options.SystemDatabase.Configuration.EnableResponseLoggingForEmbeddedDatabases); documentStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url; documentStore.Initialize(); filesStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke, options.SystemDatabase.Configuration.EnableResponseLoggingForEmbeddedDatabases); filesStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url; filesStore.Initialize(); serverStartupTasks = configuration.Container.GetExportedValues <IServerStartupTask>(); foreach (var task in serverStartupTasks) { toDispose.Add(task); task.Execute(this); } return(this); }
public RavenDbServer Initialize(Action <RavenDBOptions> configure = null) { if (configuration.IgnoreSslCertificateErrors == IgnoreSslCertificateErrorsMode.All) { // we ignore either all or none at the moment ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true; } BooleanQuery.MaxClauseCount = configuration.MaxClauseCount; BooleanQuery.MaxClauseCount = configuration.MaxClauseCount; owinHttpServer = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure); options = owinHttpServer.Options; serverThingsForTests = new ServerThingsForTests(options); Func <HttpMessageHandler> httpMessageHandlerFactory = () => new OwinClientHandler(owinHttpServer.Invoke, options.SystemDatabase.Configuration.EnableResponseLoggingForEmbeddedDatabases); documentStore.HttpMessageHandlerFactory = httpMessageHandlerFactory; documentStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url; documentStore.Initialize(); filesStore.HttpMessageHandlerFactory = httpMessageHandlerFactory; filesStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url; filesStore.Initialize(); return(this); }
public RavenDbServer Initialize(Action<RavenDBOptions> configure = null) { owinHttpServer = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure); options = owinHttpServer.Options; serverThingsForTests = new ServerThingsForTests(options); documentStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke); documentStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url; documentStore.Initialize(); return this; }
public RavenDbServer Initialize(Action <RavenDBOptions> configure = null) { owinHttpServer = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure); options = owinHttpServer.Options; serverThingsForTests = new ServerThingsForTests(options); documentStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke); documentStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url; documentStore.Initialize(); return(this); }
public RavenDbServer Initialize(Action<RavenDBOptions> configure = null) { owinHttpServer = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure); options = owinHttpServer.Options; serverThingsForTests = new ServerThingsForTests(options); documentStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke); documentStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url; documentStore.Initialize(); foreach (var task in configuration.Container.GetExportedValues<IServerStartupTask>()) { task.Execute(this); } return this; }
public RavenDbServer Initialize(Action <RavenDBOptions> configure = null) { owinHttpServer = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure); options = owinHttpServer.Options; serverThingsForTests = new ServerThingsForTests(options); documentStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke); documentStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url; documentStore.Initialize(); filesStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke); filesStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url; filesStore.Initialize(); foreach (var task in configuration.Container.GetExportedValues <IServerStartupTask>()) { task.Execute(this); } return(this); }
public RavenDbServer Initialize(Action<RavenDBOptions> configure = null) { if (configuration.IgnoreSslCertificateErrors == IgnoreSslCertificateErrorsMode.All) { // we ignore either all or none at the moment ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true; } BooleanQuery.MaxClauseCount = configuration.MaxClauseCount; owinHttpServer = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure); options = owinHttpServer.Options; serverThingsForTests = new ServerThingsForTests(options); Func<HttpMessageHandler> httpMessageHandlerFactory = ()=>new OwinClientHandler(owinHttpServer.Invoke, options.SystemDatabase.Configuration.EnableResponseLoggingForEmbeddedDatabases); documentStore.HttpMessageHandlerFactory = httpMessageHandlerFactory; documentStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url; documentStore.Initialize(); filesStore.HttpMessageHandlerFactory = httpMessageHandlerFactory; filesStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url; filesStore.Initialize(); return this; }
public RavenDbServer Initialize(Action<RavenDBOptions> configure = null) { if (configuration.IgnoreSslCertificateErros == IgnoreSslCertificateErrorsMode.All) { // we ignore either all or none at the moment ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true; } owinHttpServer = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure); options = owinHttpServer.Options; serverThingsForTests = new ServerThingsForTests(options); documentStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke); documentStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url; documentStore.Initialize(); filesStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke); filesStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url; filesStore.Initialize(); serverStartupTasks = configuration.Container.GetExportedValues<IServerStartupTask>(); foreach (var task in serverStartupTasks) { toDispose.Add(task); task.Execute(this); } return this; }