public void Setup()
 {
     _container = new Container();
     RegisterRequestObjects(_container);
     _container.Register(Substitute.For <IRequestPropertiesProvider>());
     _application = new GraphiteApplication(new HttpConfiguration());
 }
Beispiel #2
0
        public static IAppBuilder InitializeGraphite(
            this IAppBuilder builder, HttpConfiguration httpConfiguration,
            Action <ConfigurationDsl> configure = null)
        {
            var graphiteApplication = new GraphiteApplication(httpConfiguration);

            graphiteApplication.Initialize(x => Configure(x, configure));
            builder.OnAppDisposing(() => graphiteApplication.Dispose());
            return(builder);
        }
Beispiel #3
0
        public static HttpConfiguration InitializeGraphite(
            this HttpConfiguration httpConfiguration,
            Action <ConfigurationDsl> configure = null)
        {
            var graphiteApplication = new GraphiteApplication(httpConfiguration);

            graphiteApplication.Initialize(x => Configure(x, configure));
            HostingEnvironment.StopListening += (s, e) => graphiteApplication.Dispose();
            return(httpConfiguration);
        }