diff --git a/sample/Glimpse.Agent.Dnx.Sample/Startup.cs b/sample/Glimpse.Agent.Dnx.Sample/Startup.cs index 3083402f..00354147 100644 --- a/sample/Glimpse.Agent.Dnx.Sample/Startup.cs +++ b/sample/Glimpse.Agent.Dnx.Sample/Startup.cs @@ -2,7 +2,7 @@ using Glimpse.Agent; using Glimpse.Initialization; using Microsoft.AspNet.Builder; -using Microsoft.Extensions.Configuration; +using Microsoft.AspNet.Hosting; using Microsoft.Extensions.DependencyInjection; namespace Glimpse.Agent.Dnx.Sample @@ -16,9 +16,7 @@ public Startup() Console.WriteLine("==================================\n"); Console.ResetColor(); } - - public IConfiguration Configuration { get; set; } - + public void ConfigureServices(IServiceCollection services) { /* Example of how to use fixed provider @@ -50,5 +48,15 @@ public void Configure(IApplicationBuilder app) app.UseWelcomePage(); } + + public static void Main(string[] args) + { + var application = new WebApplicationBuilder() + .UseConfiguration(WebApplicationConfiguration.GetDefault(args)) + .UseStartup() + .Build(); + + application.Run(); + } } } diff --git a/sample/Glimpse.Agent.Dnx.Sample/hosting.json b/sample/Glimpse.Agent.Dnx.Sample/hosting.json new file mode 100644 index 00000000..cd267249 --- /dev/null +++ b/sample/Glimpse.Agent.Dnx.Sample/hosting.json @@ -0,0 +1,4 @@ +{ + "server": "Microsoft.AspNet.Server.Kestrel", + "server.urls": "http://localhost:5200" +} \ No newline at end of file diff --git a/sample/Glimpse.Agent.Dnx.Sample/project.json b/sample/Glimpse.Agent.Dnx.Sample/project.json index 7335eac3..490ec6e3 100644 --- a/sample/Glimpse.Agent.Dnx.Sample/project.json +++ b/sample/Glimpse.Agent.Dnx.Sample/project.json @@ -1,25 +1,25 @@ { - "webroot": "wwwroot", - "version": "1.0.0-*", - "exclude": [ - "wwwroot" - ], - "packExclude": [ - "**.kproj", - "**.user", - "**.vspscc" - ], - "commands": { - "web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5200", - "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5200" - }, + "version": "1.0.0-*", "dependencies": { "Glimpse.Agent.Dnx": "", + "Microsoft.AspNet.Hosting": "1.0.0-*", "Microsoft.AspNet.Diagnostics": "1.0.0-*", "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", "Microsoft.AspNet.Server.WebListener": "1.0.0-*" }, "frameworks": { "dnx451": { } + }, + "exclude": "wwwroot/**/*.*", + "packExclude": [ + "**.kproj", + "**.user", + "**.vspscc" + ], + "compilationOptions": { + "emitEntryPoint": true + }, + "commands": { + "web": "Glimpse.Agent.Dnx.Sample" } } diff --git a/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/Startup.cs b/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/Startup.cs index 90507810..eb25c887 100644 --- a/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/Startup.cs +++ b/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/Startup.cs @@ -17,7 +17,7 @@ public class Startup public Startup() { Console.ForegroundColor = ConsoleColor.DarkCyan; - Console.WriteLine("\nGLIMPSE AGENT+SERVER (MVC) RUNNING ON PORT 5000"); + Console.WriteLine("\nGLIMPSE AGENT+SERVER (MVC) RUNNING ON PORT 5100"); Console.WriteLine("===============================================\n"); Console.ResetColor(); } @@ -136,5 +136,15 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF // routes.MapWebApiRoute("DefaultApi", "api/{controller}/{id?}"); }); } + + public static void Main(string[] args) + { + var application = new WebApplicationBuilder() + .UseConfiguration(WebApplicationConfiguration.GetDefault(args)) + .UseStartup() + .Build(); + + application.Run(); + } } } diff --git a/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/hosting.json b/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/hosting.json new file mode 100644 index 00000000..26739bef --- /dev/null +++ b/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/hosting.json @@ -0,0 +1,4 @@ +{ + "server": "Microsoft.AspNet.Server.Kestrel", + "server.urls": "http://localhost:5100" +} \ No newline at end of file diff --git a/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/project.json b/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/project.json index 41f481ef..150c097e 100644 --- a/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/project.json +++ b/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/project.json @@ -1,6 +1,4 @@ { - "webroot": "wwwroot", - "userSecretsId": "aspnet5-Glimpse.AgentServer.Dnx.Mvc.Sample-13d51bc5-beea-48f5-a33d-0b583120c537", "version": "1.0.0-*", "dependencies": { "EntityFramework.Commands": "7.0.0-*", @@ -8,6 +6,7 @@ "Glimpse.Agent.Dnx": "", "Glimpse.Agent.Dnx.Mvc": "", "Glimpse.Server.Dnx": "", + "Microsoft.AspNet.Hosting": "1.0.0-*", "Microsoft.AspNet.Authentication.Cookies": "1.0.0-*", "Microsoft.AspNet.Authentication.Facebook": "1.0.0-*", "Microsoft.AspNet.Authentication.Google": "1.0.0-*", @@ -29,20 +28,26 @@ "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Extensions.Logging.Debug": "1.0.0-*" }, - "commands": { - "web": "Microsoft.AspNet.Server.WebListener", - "kestrel": "Microsoft.AspNet.Server.Kestrel", - "ef": "EntityFramework.Commands" - }, "frameworks": { "dnx451": { }, "dnxcore50": { } }, "exclude": [ - "wwwroot", + "wwwroot/**/*.*", "node_modules", "bower_components" ], + "packExclude": [ + "**.kproj", + "**.user", + "**.vspscc" + ], + "compilationOptions": { + "emitEntryPoint": true + }, + "commands": { + "web": "Glimpse.AgentServer.Dnx.Mvc.Sample" + }, "publishExclude": [ "node_modules", "bower_components", @@ -50,6 +55,7 @@ "**.user", "**.vspscc" ], + "userSecretsId": "aspnet5-Glimpse.AgentServer.Dnx.Mvc.Sample-13d51bc5-beea-48f5-a33d-0b583120c537", "scripts": { "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ] } diff --git a/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/wwwroot/_references.js b/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/wwwroot/_references.js index ad7d373b..b435240e 100644 --- a/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/wwwroot/_references.js +++ b/sample/Glimpse.AgentServer.Dnx.Mvc.Sample/wwwroot/_references.js @@ -1,3 +1,8 @@ /// /// /// +/// +/// +/// +/// +/// diff --git a/sample/Glimpse.AgentServer.Dnx.Mvc.Simple.Sample/Startup.cs b/sample/Glimpse.AgentServer.Dnx.Mvc.Simple.Sample/Startup.cs index f5519806..e6646075 100644 --- a/sample/Glimpse.AgentServer.Dnx.Mvc.Simple.Sample/Startup.cs +++ b/sample/Glimpse.AgentServer.Dnx.Mvc.Simple.Sample/Startup.cs @@ -2,6 +2,7 @@ using Glimpse.Agent; using Glimpse.Server; using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Hosting; using Microsoft.Extensions.DependencyInjection; namespace Glimpse.AgentServer.Dnx.Mvc.Simple.Sample @@ -29,5 +30,15 @@ public void Configure(IApplicationBuilder app) app.UseMvcWithDefaultRoute(); } + + public static void Main(string[] args) + { + var application = new WebApplicationBuilder() + .UseConfiguration(WebApplicationConfiguration.GetDefault(args)) + .UseStartup() + .Build(); + + application.Run(); + } } } diff --git a/sample/Glimpse.AgentServer.Dnx.Mvc.Simple.Sample/hosting.json b/sample/Glimpse.AgentServer.Dnx.Mvc.Simple.Sample/hosting.json new file mode 100644 index 00000000..b783c8cf --- /dev/null +++ b/sample/Glimpse.AgentServer.Dnx.Mvc.Simple.Sample/hosting.json @@ -0,0 +1,4 @@ +{ + "server": "Microsoft.AspNet.Server.Kestrel", + "server.urls": "http://localhost:5000" +} \ No newline at end of file diff --git a/sample/Glimpse.AgentServer.Dnx.Mvc.Simple.Sample/project.json b/sample/Glimpse.AgentServer.Dnx.Mvc.Simple.Sample/project.json index 227896ce..518a7dd3 100644 --- a/sample/Glimpse.AgentServer.Dnx.Mvc.Simple.Sample/project.json +++ b/sample/Glimpse.AgentServer.Dnx.Mvc.Simple.Sample/project.json @@ -1,28 +1,28 @@ { - "commands": { - "web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5000", - "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5000" - }, + "version": "1.0.0-*", "dependencies": { "Glimpse.Agent.Dnx": "", "Glimpse.Agent.Dnx.Mvc": "", "Glimpse.Server.Dnx": "", + "Microsoft.AspNet.Hosting": "1.0.0-*", "Microsoft.AspNet.Mvc": "6.0.0-*", "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", "Microsoft.AspNet.Server.WebListener": "1.0.0-*" }, - "exclude": [ - "wwwroot" - ], "frameworks": { "dnx451": { }, "dnxcore50": { } }, + "exclude": "wwwroot/**/*.*", "packExclude": [ "**.kproj", "**.user", "**.vspscc" ], - "version": "1.0.0-*", - "webroot": "wwwroot" + "compilationOptions": { + "emitEntryPoint": true + }, + "commands": { + "web": "Glimpse.AgentServer.Dnx.Mvc.Simple.Sample" + } } diff --git a/sample/Glimpse.AgentServer.Dnx.Sample/Startup.cs b/sample/Glimpse.AgentServer.Dnx.Sample/Startup.cs index df7147b0..52fcc139 100644 --- a/sample/Glimpse.AgentServer.Dnx.Sample/Startup.cs +++ b/sample/Glimpse.AgentServer.Dnx.Sample/Startup.cs @@ -1,7 +1,8 @@ using System; using Glimpse.Agent; -using Microsoft.AspNet.Builder; using Glimpse.Server; +using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Hosting; using Microsoft.Extensions.DependencyInjection; namespace Glimpse.AgentServer.Dnx.Sample @@ -36,7 +37,16 @@ public void Configure(IApplicationBuilder app) }); */ app.UseWelcomePage(); + } + + public static void Main(string[] args) + { + var application = new WebApplicationBuilder() + .UseConfiguration(WebApplicationConfiguration.GetDefault(args)) + .UseStartup() + .Build(); + application.Run(); } } } diff --git a/sample/Glimpse.AgentServer.Dnx.Sample/hosting.json b/sample/Glimpse.AgentServer.Dnx.Sample/hosting.json new file mode 100644 index 00000000..26739bef --- /dev/null +++ b/sample/Glimpse.AgentServer.Dnx.Sample/hosting.json @@ -0,0 +1,4 @@ +{ + "server": "Microsoft.AspNet.Server.Kestrel", + "server.urls": "http://localhost:5100" +} \ No newline at end of file diff --git a/sample/Glimpse.AgentServer.Dnx.Sample/project.json b/sample/Glimpse.AgentServer.Dnx.Sample/project.json index 0b69170f..b48118d1 100644 --- a/sample/Glimpse.AgentServer.Dnx.Sample/project.json +++ b/sample/Glimpse.AgentServer.Dnx.Sample/project.json @@ -1,27 +1,27 @@ { - "webroot": "wwwroot", - "version": "1.0.0-*", - "exclude": [ - "wwwroot" - ], - "packExclude": [ - "**.kproj", - "**.user", - "**.vspscc" - ], - "commands": { - "web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5100", - "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5100" - }, - "dependencies": { - "Glimpse.Agent.Dnx": "", - "Glimpse.Server.Dnx": "", - "Microsoft.AspNet.Diagnostics": "1.0.0-*", - "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNet.Server.WebListener": "1.0.0-*" - }, - "frameworks" : { - "dnx451": { }, - "dnxcore50": { } - } + "version": "1.0.0-*", + "dependencies": { + "Glimpse.Agent.Dnx": "", + "Glimpse.Server.Dnx": "", + "Microsoft.AspNet.Hosting": "1.0.0-*", + "Microsoft.AspNet.Diagnostics": "1.0.0-*", + "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", + "Microsoft.AspNet.Server.WebListener": "1.0.0-*" + }, + "frameworks" : { + "dnx451": { }, + "dnxcore50": { } + }, + "exclude": "wwwroot/**/*.*", + "packExclude": [ + "**.kproj", + "**.user", + "**.vspscc" + ], + "compilationOptions": { + "emitEntryPoint": true + }, + "commands": { + "web": "Glimpse.AgentServer.Dnx.Sample" + } } diff --git a/sample/Glimpse.Server.Dnx.Sample/Startup.cs b/sample/Glimpse.Server.Dnx.Sample/Startup.cs index 529b7e67..2965fbce 100644 --- a/sample/Glimpse.Server.Dnx.Sample/Startup.cs +++ b/sample/Glimpse.Server.Dnx.Sample/Startup.cs @@ -1,5 +1,6 @@ using System; using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Http; using Microsoft.Extensions.DependencyInjection; @@ -40,5 +41,15 @@ await context.Response.WriteAsync( "); }); } + + public static void Main(string[] args) + { + var application = new WebApplicationBuilder() + .UseConfiguration(WebApplicationConfiguration.GetDefault(args)) + .UseStartup() + .Build(); + + application.Run(); + } } } diff --git a/sample/Glimpse.Server.Dnx.Sample/hosting.json b/sample/Glimpse.Server.Dnx.Sample/hosting.json new file mode 100644 index 00000000..0bc04c5e --- /dev/null +++ b/sample/Glimpse.Server.Dnx.Sample/hosting.json @@ -0,0 +1,4 @@ +{ + "server": "Microsoft.AspNet.Server.Kestrel", + "server.urls": "http://localhost:5210" +} \ No newline at end of file diff --git a/sample/Glimpse.Server.Dnx.Sample/project.json b/sample/Glimpse.Server.Dnx.Sample/project.json index 69b6b7a3..b298d070 100644 --- a/sample/Glimpse.Server.Dnx.Sample/project.json +++ b/sample/Glimpse.Server.Dnx.Sample/project.json @@ -1,26 +1,26 @@ { - "webroot": "wwwroot", - "version": "1.0.0-*", - "exclude": [ - "wwwroot" - ], - "packExclude": [ - "**.kproj", - "**.user", - "**.vspscc" - ], - "commands": { - "web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5210", - "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5210" - }, - "dependencies": { - "Glimpse.Server.Dnx": "", - "Microsoft.AspNet.Diagnostics": "1.0.0-*", - "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNet.Server.WebListener": "1.0.0-*" - }, - "frameworks" : { - "dnx451": { }, - "dnxcore50": { } - } + "version": "1.0.0-*", + "dependencies": { + "Glimpse.Server.Dnx": "", + "Microsoft.AspNet.Hosting": "1.0.0-*", + "Microsoft.AspNet.Diagnostics": "1.0.0-*", + "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", + "Microsoft.AspNet.Server.WebListener": "1.0.0-*" + }, + "frameworks" : { + "dnx451": { }, + "dnxcore50": { } + }, + "exclude": "wwwroot/**/*.*", + "packExclude": [ + "**.kproj", + "**.user", + "**.vspscc" + ], + "compilationOptions": { + "emitEntryPoint": true + }, + "commands": { + "web": "Glimpse.AgentServer.Dnx.Sample" + } } diff --git a/src/Glimpse.Agent.Core/Configuration/DefaultRequestIgnorerContentTypeProvider.cs b/src/Glimpse.Agent.Core/Configuration/DefaultRequestIgnorerContentTypeProvider.cs index 18ccec88..38082143 100644 --- a/src/Glimpse.Agent.Core/Configuration/DefaultRequestIgnorerContentTypeProvider.cs +++ b/src/Glimpse.Agent.Core/Configuration/DefaultRequestIgnorerContentTypeProvider.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using System.Linq; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace Glimpse.Agent.Configuration { diff --git a/src/Glimpse.Agent.Core/Configuration/DefaultRequestIgnorerStatusCodeProvider.cs b/src/Glimpse.Agent.Core/Configuration/DefaultRequestIgnorerStatusCodeProvider.cs index 71f208d1..a2fc0b8e 100644 --- a/src/Glimpse.Agent.Core/Configuration/DefaultRequestIgnorerStatusCodeProvider.cs +++ b/src/Glimpse.Agent.Core/Configuration/DefaultRequestIgnorerStatusCodeProvider.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using System.Linq; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace Glimpse.Agent.Configuration { diff --git a/src/Glimpse.Agent.Core/Configuration/DefaultRequestIgnorerUriProvider.cs b/src/Glimpse.Agent.Core/Configuration/DefaultRequestIgnorerUriProvider.cs index 6cdc2107..584d0282 100644 --- a/src/Glimpse.Agent.Core/Configuration/DefaultRequestIgnorerUriProvider.cs +++ b/src/Glimpse.Agent.Core/Configuration/DefaultRequestIgnorerUriProvider.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace Glimpse.Agent.Configuration { diff --git a/src/Glimpse.Agent.Core/Configuration/RequestIgnorerOptionsShouldIgnore.cs b/src/Glimpse.Agent.Core/Configuration/RequestIgnorerOptionsShouldIgnore.cs index daa55bc2..143500c5 100644 --- a/src/Glimpse.Agent.Core/Configuration/RequestIgnorerOptionsShouldIgnore.cs +++ b/src/Glimpse.Agent.Core/Configuration/RequestIgnorerOptionsShouldIgnore.cs @@ -1,6 +1,6 @@ using System; using Microsoft.AspNet.Http; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace Glimpse.Agent.Configuration { diff --git a/src/Glimpse.Agent.Core/DependencyInjection/AgentRegisterServices.cs b/src/Glimpse.Agent.Core/DependencyInjection/AgentRegisterServices.cs index 2a1b031b..7eff5a73 100644 --- a/src/Glimpse.Agent.Core/DependencyInjection/AgentRegisterServices.cs +++ b/src/Glimpse.Agent.Core/DependencyInjection/AgentRegisterServices.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; using Glimpse.Agent; using Glimpse.Agent.Configuration; using Glimpse.Agent.Inspectors; diff --git a/src/Glimpse.Agent.Core/GlimpseAgentOptionsSetup.cs b/src/Glimpse.Agent.Core/GlimpseAgentOptionsSetup.cs index 0a94f9cc..6dd48d9f 100644 --- a/src/Glimpse.Agent.Core/GlimpseAgentOptionsSetup.cs +++ b/src/Glimpse.Agent.Core/GlimpseAgentOptionsSetup.cs @@ -1,5 +1,5 @@ using Glimpse.Agent.Configuration; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace Glimpse.Agent { diff --git a/src/Glimpse.Common.Core/Configuration/OptionsResourceOptionsProvider.cs b/src/Glimpse.Common.Core/Configuration/OptionsResourceOptionsProvider.cs index 286d21bc..cf7931ae 100644 --- a/src/Glimpse.Common.Core/Configuration/OptionsResourceOptionsProvider.cs +++ b/src/Glimpse.Common.Core/Configuration/OptionsResourceOptionsProvider.cs @@ -1,5 +1,5 @@ using Glimpse.Initialization; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace Glimpse.Configuration { diff --git a/src/Glimpse.Common.Core/project.json b/src/Glimpse.Common.Core/project.json index 26b75c01..2709a6ec 100644 --- a/src/Glimpse.Common.Core/project.json +++ b/src/Glimpse.Common.Core/project.json @@ -15,7 +15,7 @@ "Microsoft.AspNet.Http.Abstractions": "1.0.0-*", "Microsoft.Extensions.DependencyInjection": "1.0.0-*", "Microsoft.Extensions.Logging": "1.0.0-*", - "Microsoft.Extensions.OptionsModel": "1.0.0-*", + "Microsoft.Extensions.Options": "1.0.0-*", "Newtonsoft.Json": "6.0.6", "Rx-Linq": "2.2.5", "Rx-PlatformServices": "2.2.5" diff --git a/src/Glimpse.Common.Dnx/DependencyInjection/GlimpseDnxServiceCollectionExtensions.cs b/src/Glimpse.Common.Dnx/DependencyInjection/GlimpseDnxServiceCollectionExtensions.cs index 0c8f2254..52adad06 100644 --- a/src/Glimpse.Common.Dnx/DependencyInjection/GlimpseDnxServiceCollectionExtensions.cs +++ b/src/Glimpse.Common.Dnx/DependencyInjection/GlimpseDnxServiceCollectionExtensions.cs @@ -1,5 +1,8 @@ using Glimpse.Common.Initialization; using Glimpse.Platform; +using Microsoft.AspNet.Http; +using Microsoft.AspNet.Http.Internal; +using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.PlatformAbstractions; namespace Microsoft.Extensions.DependencyInjection @@ -19,6 +22,7 @@ public static IGlimpseBuilder AddGlimpse(this IServiceCollection services, bool services.AddSingleton(PlatformServices.Default.AssemblyLoadContextAccessor); services.AddSingleton(PlatformServices.Default.AssemblyLoaderContainer); services.AddSingleton(PlatformServices.Default.LibraryManager); + services.TryAddSingleton(); services.AddTransient(); services.AddSingleton, DefaultExtensionProvider>(); diff --git a/src/Glimpse.Common.Dnx/project.json b/src/Glimpse.Common.Dnx/project.json index 291d5660..e85dad29 100644 --- a/src/Glimpse.Common.Dnx/project.json +++ b/src/Glimpse.Common.Dnx/project.json @@ -1,4 +1,4 @@ -{ +{ "version": "2.0.0-*", "authors": [ "nmolnar", "avanderhoorn" ], "owners": [ "nmolnar", "avanderhoorn" ], @@ -13,6 +13,7 @@ "tags": [ "ASP.NET", "Web", "Debugging", "Diagnostics" ], "dependencies": { "Glimpse.Common.Core": "", + "Microsoft.AspNet.Http": "1.0.0-*", "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*" }, "frameworks": { diff --git a/src/Glimpse.Server.Core/Configuration/AllowAgentAccessOptions.cs b/src/Glimpse.Server.Core/Configuration/AllowAgentAccessOptions.cs index de09333e..1ff2817e 100644 --- a/src/Glimpse.Server.Core/Configuration/AllowAgentAccessOptions.cs +++ b/src/Glimpse.Server.Core/Configuration/AllowAgentAccessOptions.cs @@ -1,7 +1,7 @@ using System; using Glimpse.Server; using Microsoft.AspNet.Http; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace Glimpse.Server.Configuration { diff --git a/src/Glimpse.Server.Core/Configuration/AllowClientAccessOptions.cs b/src/Glimpse.Server.Core/Configuration/AllowClientAccessOptions.cs index 9ebc7464..31c62311 100644 --- a/src/Glimpse.Server.Core/Configuration/AllowClientAccessOptions.cs +++ b/src/Glimpse.Server.Core/Configuration/AllowClientAccessOptions.cs @@ -1,7 +1,7 @@ using System; using Glimpse.Server; using Microsoft.AspNet.Http; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace Glimpse.Server.Configuration { diff --git a/src/Glimpse.Server.Core/Configuration/DefaultAllowRemoteProvider.cs b/src/Glimpse.Server.Core/Configuration/DefaultAllowRemoteProvider.cs index 6eb6b9d4..120ad33b 100644 --- a/src/Glimpse.Server.Core/Configuration/DefaultAllowRemoteProvider.cs +++ b/src/Glimpse.Server.Core/Configuration/DefaultAllowRemoteProvider.cs @@ -1,5 +1,5 @@ using Glimpse.Server; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace Glimpse.Server.Configuration { diff --git a/src/Glimpse.Server.Core/Configuration/DefaultMetadataProvider.cs b/src/Glimpse.Server.Core/Configuration/DefaultMetadataProvider.cs index 0bf0aa0b..0e2d8a49 100644 --- a/src/Glimpse.Server.Core/Configuration/DefaultMetadataProvider.cs +++ b/src/Glimpse.Server.Core/Configuration/DefaultMetadataProvider.cs @@ -3,7 +3,7 @@ using Glimpse.Server.Internal; using Glimpse.Internal.Extensions; using Microsoft.AspNet.Http; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace Glimpse.Server.Configuration { diff --git a/src/Glimpse.Server.Core/DependencyInjection/ServerRegisterServices.cs b/src/Glimpse.Server.Core/DependencyInjection/ServerRegisterServices.cs index 78614197..9aceb5b9 100644 --- a/src/Glimpse.Server.Core/DependencyInjection/ServerRegisterServices.cs +++ b/src/Glimpse.Server.Core/DependencyInjection/ServerRegisterServices.cs @@ -9,7 +9,7 @@ using Glimpse.Platform; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace Glimpse.DependencyInjection { diff --git a/src/Glimpse.Server.Core/GlimpseServerOptionsSetup.cs b/src/Glimpse.Server.Core/GlimpseServerOptionsSetup.cs index a1aec8c0..6117a012 100644 --- a/src/Glimpse.Server.Core/GlimpseServerOptionsSetup.cs +++ b/src/Glimpse.Server.Core/GlimpseServerOptionsSetup.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace Glimpse.Server { diff --git a/src/Glimpse.Server.Dnx/GlimpseServerMiddleware.cs b/src/Glimpse.Server.Dnx/GlimpseServerMiddleware.cs index 9f83a702..7fdc7770 100644 --- a/src/Glimpse.Server.Dnx/GlimpseServerMiddleware.cs +++ b/src/Glimpse.Server.Dnx/GlimpseServerMiddleware.cs @@ -6,7 +6,7 @@ using Glimpse.Server.Configuration; using Glimpse.Server.Internal; using Glimpse.Server.Resources; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace Glimpse.Server { diff --git a/test/Glimpse.FunctionalTest/FunctionalTests.cs b/test/Glimpse.FunctionalTest/FunctionalTests.cs index ba7e1062..cbb83c6f 100644 --- a/test/Glimpse.FunctionalTest/FunctionalTests.cs +++ b/test/Glimpse.FunctionalTest/FunctionalTests.cs @@ -3,6 +3,7 @@ using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Hosting; using Microsoft.AspNet.TestHost; using Microsoft.Extensions.DependencyInjection; using Xunit; @@ -18,7 +19,8 @@ public class FunctionalTests [Fact] public async Task SayHelloToMvc() { - var server = TestServer.Create(Configure, ConfigureServices); + var builder = new WebApplicationBuilder().Configure(Configure).ConfigureServices(ConfigureServices); + var server = new TestServer(builder); var client = server.CreateClient(); var request = new HttpRequestMessage(); diff --git a/wrap/SystemWebAdapter/project.lock.json b/wrap/SystemWebAdapter/project.lock.json new file mode 100644 index 00000000..f863204e --- /dev/null +++ b/wrap/SystemWebAdapter/project.lock.json @@ -0,0 +1,469 @@ +{ + "locked": false, + "version": 2, + "targets": { + ".NETFramework,Version=v4.5.1": { + "Microsoft.AspNet.Http/1.0.0-rc2-16091": { + "type": "package", + "dependencies": { + "Microsoft.AspNet.Http.Abstractions": "1.0.0-rc2-16091", + "Microsoft.AspNet.WebUtilities": "1.0.0-rc2-16091", + "Microsoft.Net.Http.Headers": "1.0.0-rc2-16091" + }, + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core" + ], + "compile": { + "lib/net451/Microsoft.AspNet.Http.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.AspNet.Http.dll": {} + } + }, + "Microsoft.AspNet.Http.Abstractions/1.0.0-rc2-16091": { + "type": "package", + "dependencies": { + "Microsoft.AspNet.Http.Features": "1.0.0-rc2-16091", + "System.Text.Encodings.Web": "4.0.0-rc2-23622" + }, + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core", + "System.IO", + "System.Runtime" + ], + "compile": { + "lib/net451/Microsoft.AspNet.Http.Abstractions.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.AspNet.Http.Abstractions.dll": {} + } + }, + "Microsoft.AspNet.Http.Features/1.0.0-rc2-16091": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Primitives": "1.0.0-rc2-15956" + }, + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core" + ], + "compile": { + "lib/net451/Microsoft.AspNet.Http.Features.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.AspNet.Http.Features.dll": {} + } + }, + "Microsoft.AspNet.WebUtilities/1.0.0-rc2-16091": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Primitives": "1.0.0-rc2-15956", + "System.Text.Encodings.Web": "4.0.0-rc2-23622" + }, + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core", + "System.Runtime" + ], + "compile": { + "lib/net451/Microsoft.AspNet.WebUtilities.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.AspNet.WebUtilities.dll": {} + } + }, + "Microsoft.Extensions.Primitives/1.0.0-rc2-15956": { + "type": "package", + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core" + ], + "compile": { + "lib/net451/Microsoft.Extensions.Primitives.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.Extensions.Primitives.dll": {} + } + }, + "Microsoft.Net.Http.Headers/1.0.0-rc2-16091": { + "type": "package", + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core" + ], + "compile": { + "lib/net451/Microsoft.Net.Http.Headers.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.Net.Http.Headers.dll": {} + } + }, + "System.Text.Encodings.Web/4.0.0-rc2-23622": { + "type": "package", + "compile": { + "lib/dotnet5.1/System.Text.Encodings.Web.dll": {} + }, + "runtime": { + "lib/dotnet5.1/System.Text.Encodings.Web.dll": {} + } + } + }, + ".NETFramework,Version=v4.5.1/win7-x86": { + "Microsoft.AspNet.Http/1.0.0-rc2-16091": { + "type": "package", + "dependencies": { + "Microsoft.AspNet.Http.Abstractions": "1.0.0-rc2-16091", + "Microsoft.AspNet.WebUtilities": "1.0.0-rc2-16091", + "Microsoft.Net.Http.Headers": "1.0.0-rc2-16091" + }, + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core" + ], + "compile": { + "lib/net451/Microsoft.AspNet.Http.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.AspNet.Http.dll": {} + } + }, + "Microsoft.AspNet.Http.Abstractions/1.0.0-rc2-16091": { + "type": "package", + "dependencies": { + "Microsoft.AspNet.Http.Features": "1.0.0-rc2-16091", + "System.Text.Encodings.Web": "4.0.0-rc2-23622" + }, + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core", + "System.IO", + "System.Runtime" + ], + "compile": { + "lib/net451/Microsoft.AspNet.Http.Abstractions.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.AspNet.Http.Abstractions.dll": {} + } + }, + "Microsoft.AspNet.Http.Features/1.0.0-rc2-16091": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Primitives": "1.0.0-rc2-15956" + }, + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core" + ], + "compile": { + "lib/net451/Microsoft.AspNet.Http.Features.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.AspNet.Http.Features.dll": {} + } + }, + "Microsoft.AspNet.WebUtilities/1.0.0-rc2-16091": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Primitives": "1.0.0-rc2-15956", + "System.Text.Encodings.Web": "4.0.0-rc2-23622" + }, + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core", + "System.Runtime" + ], + "compile": { + "lib/net451/Microsoft.AspNet.WebUtilities.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.AspNet.WebUtilities.dll": {} + } + }, + "Microsoft.Extensions.Primitives/1.0.0-rc2-15956": { + "type": "package", + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core" + ], + "compile": { + "lib/net451/Microsoft.Extensions.Primitives.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.Extensions.Primitives.dll": {} + } + }, + "Microsoft.Net.Http.Headers/1.0.0-rc2-16091": { + "type": "package", + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core" + ], + "compile": { + "lib/net451/Microsoft.Net.Http.Headers.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.Net.Http.Headers.dll": {} + } + }, + "System.Text.Encodings.Web/4.0.0-rc2-23622": { + "type": "package", + "compile": { + "lib/dotnet5.1/System.Text.Encodings.Web.dll": {} + }, + "runtime": { + "lib/dotnet5.1/System.Text.Encodings.Web.dll": {} + } + } + }, + ".NETFramework,Version=v4.5.1/win7-x64": { + "Microsoft.AspNet.Http/1.0.0-rc2-16091": { + "type": "package", + "dependencies": { + "Microsoft.AspNet.Http.Abstractions": "1.0.0-rc2-16091", + "Microsoft.AspNet.WebUtilities": "1.0.0-rc2-16091", + "Microsoft.Net.Http.Headers": "1.0.0-rc2-16091" + }, + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core" + ], + "compile": { + "lib/net451/Microsoft.AspNet.Http.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.AspNet.Http.dll": {} + } + }, + "Microsoft.AspNet.Http.Abstractions/1.0.0-rc2-16091": { + "type": "package", + "dependencies": { + "Microsoft.AspNet.Http.Features": "1.0.0-rc2-16091", + "System.Text.Encodings.Web": "4.0.0-rc2-23622" + }, + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core", + "System.IO", + "System.Runtime" + ], + "compile": { + "lib/net451/Microsoft.AspNet.Http.Abstractions.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.AspNet.Http.Abstractions.dll": {} + } + }, + "Microsoft.AspNet.Http.Features/1.0.0-rc2-16091": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Primitives": "1.0.0-rc2-15956" + }, + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core" + ], + "compile": { + "lib/net451/Microsoft.AspNet.Http.Features.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.AspNet.Http.Features.dll": {} + } + }, + "Microsoft.AspNet.WebUtilities/1.0.0-rc2-16091": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Primitives": "1.0.0-rc2-15956", + "System.Text.Encodings.Web": "4.0.0-rc2-23622" + }, + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core", + "System.Runtime" + ], + "compile": { + "lib/net451/Microsoft.AspNet.WebUtilities.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.AspNet.WebUtilities.dll": {} + } + }, + "Microsoft.Extensions.Primitives/1.0.0-rc2-15956": { + "type": "package", + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core" + ], + "compile": { + "lib/net451/Microsoft.Extensions.Primitives.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.Extensions.Primitives.dll": {} + } + }, + "Microsoft.Net.Http.Headers/1.0.0-rc2-16091": { + "type": "package", + "frameworkAssemblies": [ + "Microsoft.CSharp", + "mscorlib", + "System", + "System.Core" + ], + "compile": { + "lib/net451/Microsoft.Net.Http.Headers.dll": {} + }, + "runtime": { + "lib/net451/Microsoft.Net.Http.Headers.dll": {} + } + }, + "System.Text.Encodings.Web/4.0.0-rc2-23622": { + "type": "package", + "compile": { + "lib/dotnet5.1/System.Text.Encodings.Web.dll": {} + }, + "runtime": { + "lib/dotnet5.1/System.Text.Encodings.Web.dll": {} + } + } + } + }, + "libraries": { + "Microsoft.AspNet.Http/1.0.0-rc2-16091": { + "type": "package", + "serviceable": true, + "sha512": "7mH9HUn3/xYIktBAmUUZezGQqGEn3JYHUBmgace/fySlhhOI2ugTPBa9+nALQTfmNVGkBpZI8FmVuLCdWv+Wuw==", + "files": [ + "lib/dotnet5.4/Microsoft.AspNet.Http.dll", + "lib/dotnet5.4/Microsoft.AspNet.Http.xml", + "lib/net451/Microsoft.AspNet.Http.dll", + "lib/net451/Microsoft.AspNet.Http.xml", + "Microsoft.AspNet.Http.1.0.0-rc2-16091.nupkg", + "Microsoft.AspNet.Http.1.0.0-rc2-16091.nupkg.sha512", + "Microsoft.AspNet.Http.nuspec" + ] + }, + "Microsoft.AspNet.Http.Abstractions/1.0.0-rc2-16091": { + "type": "package", + "serviceable": true, + "sha512": "E9xf80TNdEW/gfhpYvEk0V5BPs405De8ReconWejjmCJs5CWKHDBpwGZlhGqNvJHDdleFzEbKu7e21m3nX7t3Q==", + "files": [ + "lib/dotnet5.4/Microsoft.AspNet.Http.Abstractions.dll", + "lib/dotnet5.4/Microsoft.AspNet.Http.Abstractions.xml", + "lib/net451/Microsoft.AspNet.Http.Abstractions.dll", + "lib/net451/Microsoft.AspNet.Http.Abstractions.xml", + "Microsoft.AspNet.Http.Abstractions.1.0.0-rc2-16091.nupkg", + "Microsoft.AspNet.Http.Abstractions.1.0.0-rc2-16091.nupkg.sha512", + "Microsoft.AspNet.Http.Abstractions.nuspec" + ] + }, + "Microsoft.AspNet.Http.Features/1.0.0-rc2-16091": { + "type": "package", + "serviceable": true, + "sha512": "ngngrkNphIa6o+BBZpx6UDD7UOPTWma45fsw0RuM0B07RDucpSIFF+siSKHeGNUiAljI4SV5Mn8SxTagwdia5w==", + "files": [ + "lib/dotnet5.4/Microsoft.AspNet.Http.Features.dll", + "lib/dotnet5.4/Microsoft.AspNet.Http.Features.xml", + "lib/net451/Microsoft.AspNet.Http.Features.dll", + "lib/net451/Microsoft.AspNet.Http.Features.xml", + "Microsoft.AspNet.Http.Features.1.0.0-rc2-16091.nupkg", + "Microsoft.AspNet.Http.Features.1.0.0-rc2-16091.nupkg.sha512", + "Microsoft.AspNet.Http.Features.nuspec" + ] + }, + "Microsoft.AspNet.WebUtilities/1.0.0-rc2-16091": { + "type": "package", + "serviceable": true, + "sha512": "q7fEQaqBj7LGYhADiHoPZVAS6WM16UEqlliYfT7v43RqdFbk8JOv+VDVOUd1Sivq1nWF19iU/vR+OsdqJEjKzg==", + "files": [ + "lib/dotnet5.4/Microsoft.AspNet.WebUtilities.dll", + "lib/dotnet5.4/Microsoft.AspNet.WebUtilities.xml", + "lib/net451/Microsoft.AspNet.WebUtilities.dll", + "lib/net451/Microsoft.AspNet.WebUtilities.xml", + "Microsoft.AspNet.WebUtilities.1.0.0-rc2-16091.nupkg", + "Microsoft.AspNet.WebUtilities.1.0.0-rc2-16091.nupkg.sha512", + "Microsoft.AspNet.WebUtilities.nuspec" + ] + }, + "Microsoft.Extensions.Primitives/1.0.0-rc2-15956": { + "type": "package", + "serviceable": true, + "sha512": "n+F/c8bzpEbarjCtRmeixDzDPCaoMOoJ79kE4FFkyjpmZoNSSI7Yx8eEeCOSCOVsZjBPc3N5cEoIwTKQ/ccPvg==", + "files": [ + "lib/dotnet5.4/Microsoft.Extensions.Primitives.dll", + "lib/net451/Microsoft.Extensions.Primitives.dll", + "lib/netcore50/Microsoft.Extensions.Primitives.dll", + "Microsoft.Extensions.Primitives.1.0.0-rc2-15956.nupkg", + "Microsoft.Extensions.Primitives.1.0.0-rc2-15956.nupkg.sha512", + "Microsoft.Extensions.Primitives.nuspec" + ] + }, + "Microsoft.Net.Http.Headers/1.0.0-rc2-16091": { + "type": "package", + "serviceable": true, + "sha512": "g4ixmbuRvRDNtbSFEMMkGM26Bbj6g/KBn314jIli9NGI03g5dRAHVW5hXJgnYFpfHKejMwW7naFWCEebGnzSnA==", + "files": [ + "lib/dotnet5.4/Microsoft.Net.Http.Headers.dll", + "lib/dotnet5.4/Microsoft.Net.Http.Headers.xml", + "lib/net451/Microsoft.Net.Http.Headers.dll", + "lib/net451/Microsoft.Net.Http.Headers.xml", + "Microsoft.Net.Http.Headers.1.0.0-rc2-16091.nupkg", + "Microsoft.Net.Http.Headers.1.0.0-rc2-16091.nupkg.sha512", + "Microsoft.Net.Http.Headers.nuspec" + ] + }, + "System.Text.Encodings.Web/4.0.0-rc2-23622": { + "type": "package", + "serviceable": true, + "sha512": "3U8Y9x6X5SkefU2qyS7wOfOV1qC+adeNwChMI2tzW0kLe0VAsMJVDTu2q/bvgGPm+diriV5EKX5xUwPWLQ6AFQ==", + "files": [ + "lib/dotnet5.1/System.Text.Encodings.Web.dll", + "System.Text.Encodings.Web.4.0.0-rc2-23622.nupkg", + "System.Text.Encodings.Web.4.0.0-rc2-23622.nupkg.sha512", + "System.Text.Encodings.Web.nuspec" + ] + } + }, + "projectFileDependencyGroups": { + "": [], + ".NETFramework,Version=v4.5.1": [ + "Microsoft.AspNet.Http >= 1.0.0-*", + "fx/System.Web " + ] + } +} \ No newline at end of file