public static GlimpseCoreAgentServiceCollectionBuilder RunningAgentWeb(this GlimpseCoreServiceCollectionBuilder services, Action <GlimpseCoreAgentOptions> setupAction) { if (setupAction != null) { services.Configure(setupAction); } return(new GlimpseCoreAgentServiceCollectionBuilder(services)); }
private void RegisterPublisher(GlimpseCoreServiceCollectionBuilder services) { var configurationBuilder = new ConfigurationBuilder(); var fileProvider = configurationBuilder.GetFileProvider(); if (fileProvider.GetFileInfo("glimpsecore.json").Exists) { var configuration = configurationBuilder.AddJsonFile("glimpsecore.json").Build(); var section = configuration.GetSection("resources"); services.Configure <ResourceOptions>(section); services.Replace(new ServiceDescriptor(typeof(IMessagePublisher), typeof(HttpMessagePublisher), ServiceLifetime.Transient)); } // TODO: If I reach this line, than GlimpseCore has no way to send data from point A to B. Should we blow up? }