From b6c36b014a90393249e7c793dbe69839e46cca89 Mon Sep 17 00:00:00 2001 From: Adrian Lewis Date: Sun, 25 Feb 2018 02:09:28 +0000 Subject: [PATCH 1/8] Switched to support ASP.NET Core 2.0 (work in progress) --- Glimpse.sln | 5 +- global.json | 2 +- .../Glimpse.Agent.AspNet.Sample.csproj | 18 +-- ...impse.AgentServer.AspNet.Mvc.Sample.csproj | 56 ++++---- ...gentServer.AspNet.Mvc.Simple.Sample.csproj | 34 ++--- .../Glimpse.AgentServer.AspNet.Sample.csproj | 20 +-- .../Glimpse.Server.AspNet.Sample.csproj | 20 +-- sample/MusicStore/MusicStore.csproj | 59 ++++---- .../Glimpse.Agent.AspNet.Mvc.csproj | 18 ++- .../Razor/ScriptInjectorRazorHost.cs | 84 +++++------ .../Glimpse.Agent.AspNet.csproj | 132 ++++++++++++++++-- src/Glimpse.Common/Glimpse.Common.csproj | 99 +++++++++---- src/Glimpse.Server/Glimpse.Server.csproj | 14 +- .../Glimpse.FunctionalTest.csproj | 32 ++--- .../Glimpse.Prototype.UnitTest.csproj | 34 ++--- .../Glimpse.FunctionalTest.Website.csproj | 25 ++-- 16 files changed, 369 insertions(+), 283 deletions(-) diff --git a/Glimpse.sln b/Glimpse.sln index e0cf7cc5..93c8f95f 100644 --- a/Glimpse.sln +++ b/Glimpse.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26014.0 +VisualStudioVersion = 15.0.27130.2036 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6AD4BC4F-CA12-4EE0-A6D5-BBE4B9CC56EC}" ProjectSection(SolutionItems) = preProject @@ -123,4 +123,7 @@ Global {0E1D8B8D-A560-47CF-8CE7-DC7FEA6226D1} = {214245A9-D0ED-479C-B514-B482510C5F73} {E617C9BC-502D-41E3-9F0C-20487EEBA148} = {214245A9-D0ED-479C-B514-B482510C5F73} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FDAFE111-2523-4913-8451-FBC0211364FC} + EndGlobalSection EndGlobal diff --git a/global.json b/global.json index f7f64da8..e21bb7da 100644 --- a/global.json +++ b/global.json @@ -4,6 +4,6 @@ "test/websites" ], "sdk": { - "version": "1.0.0-preview2-003121" + "version": "2.0.0" } } \ No newline at end of file diff --git a/sample/Glimpse.Agent.AspNet.Sample/Glimpse.Agent.AspNet.Sample.csproj b/sample/Glimpse.Agent.AspNet.Sample/Glimpse.Agent.AspNet.Sample.csproj index db470179..720c104e 100644 --- a/sample/Glimpse.Agent.AspNet.Sample/Glimpse.Agent.AspNet.Sample.csproj +++ b/sample/Glimpse.Agent.AspNet.Sample/Glimpse.Agent.AspNet.Sample.csproj @@ -1,16 +1,11 @@ - netcoreapp1.0 + netcoreapp2.0 true Glimpse.Agent.AspNet.Sample Exe - $(PackageTargetFallback);dotnet5.6;portable-net45+win8 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - - - PreserveNewest - - @@ -18,11 +13,10 @@ - - - - - + + + + $(DefineConstants);RELEASE diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Glimpse.AgentServer.AspNet.Mvc.Sample.csproj b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Glimpse.AgentServer.AspNet.Mvc.Sample.csproj index b2552aa0..cdfac3b4 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Glimpse.AgentServer.AspNet.Mvc.Sample.csproj +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Glimpse.AgentServer.AspNet.Mvc.Sample.csproj @@ -1,17 +1,12 @@ - + - netcoreapp1.0 + netcoreapp2.0 true Glimpse.AgentServer.AspNet.Mvc.Sample Exe aspnet-Glimpse.AgentServer.AspNet.Mvc.Sample-dbd166cf-e778-4976-a0f5-6c3de1011986 - $(PackageTargetFallback);dotnet5.6;portable-net45+win8 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - - - PreserveNewest - - @@ -23,40 +18,39 @@ - - - - - - - - - - + + + + + + + + + - 1.0.2 + 2.0.0-preview1-final All - 1.0.0-preview4-final + 2.0.1 All - - - - - - - + + + + + + + - 1.0.0-msbuild2-final + 2.0.2 All - - - + + + $(DefineConstants);RELEASE diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Simple.Sample/Glimpse.AgentServer.AspNet.Mvc.Simple.Sample.csproj b/sample/Glimpse.AgentServer.AspNet.Mvc.Simple.Sample/Glimpse.AgentServer.AspNet.Mvc.Simple.Sample.csproj index e8a7532f..2c873857 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Simple.Sample/Glimpse.AgentServer.AspNet.Mvc.Simple.Sample.csproj +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Simple.Sample/Glimpse.AgentServer.AspNet.Mvc.Simple.Sample.csproj @@ -1,16 +1,11 @@ - + - netcoreapp1.0 + netcoreapp2.0 true Glimpse.AgentServer.AspNet.Mvc.Simple.Sample Exe - $(PackageTargetFallback);dotnet5.6;portable-net45+win8 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - - - PreserveNewest - - @@ -22,18 +17,17 @@ - - - - - - - - - - - - + + + + + + + + + + + diff --git a/sample/Glimpse.AgentServer.AspNet.Sample/Glimpse.AgentServer.AspNet.Sample.csproj b/sample/Glimpse.AgentServer.AspNet.Sample/Glimpse.AgentServer.AspNet.Sample.csproj index 202ea178..794182ea 100644 --- a/sample/Glimpse.AgentServer.AspNet.Sample/Glimpse.AgentServer.AspNet.Sample.csproj +++ b/sample/Glimpse.AgentServer.AspNet.Sample/Glimpse.AgentServer.AspNet.Sample.csproj @@ -1,16 +1,11 @@ - + - netcoreapp1.0 + netcoreapp2.0 true Glimpse.AgentServer.AspNet.Sample Exe - $(PackageTargetFallback);dotnet5.6;portable-net45+win8 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - - - PreserveNewest - - @@ -19,11 +14,10 @@ - - - - - + + + + $(DefineConstants);RELEASE diff --git a/sample/Glimpse.Server.AspNet.Sample/Glimpse.Server.AspNet.Sample.csproj b/sample/Glimpse.Server.AspNet.Sample/Glimpse.Server.AspNet.Sample.csproj index 0da94378..8879199a 100644 --- a/sample/Glimpse.Server.AspNet.Sample/Glimpse.Server.AspNet.Sample.csproj +++ b/sample/Glimpse.Server.AspNet.Sample/Glimpse.Server.AspNet.Sample.csproj @@ -1,16 +1,11 @@ - + - netcoreapp1.0 + netcoreapp2.0 true Glimpse.Server.AspNet.Sample Exe - $(PackageTargetFallback);dotnet5.6;portable-net45+win8 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - - - PreserveNewest - - @@ -18,11 +13,10 @@ - - - - - + + + + $(DefineConstants);RELEASE diff --git a/sample/MusicStore/MusicStore.csproj b/sample/MusicStore/MusicStore.csproj index 130b02f1..0d5fba6b 100644 --- a/sample/MusicStore/MusicStore.csproj +++ b/sample/MusicStore/MusicStore.csproj @@ -1,8 +1,8 @@ - + Music store application on ASP.NET 5 Microsoft - netcoreapp1.0 + netcoreapp2.0 $(DefineConstants);DEMO;TESTING true true @@ -20,38 +20,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.0.0 - + + + + + + + + + + + + + + + + + + + + + + + $(DefineConstants);RELEASE diff --git a/src/Glimpse.Agent.AspNet.Mvc/Glimpse.Agent.AspNet.Mvc.csproj b/src/Glimpse.Agent.AspNet.Mvc/Glimpse.Agent.AspNet.Mvc.csproj index b727d0b4..546b58db 100644 --- a/src/Glimpse.Agent.AspNet.Mvc/Glimpse.Agent.AspNet.Mvc.csproj +++ b/src/Glimpse.Agent.AspNet.Mvc/Glimpse.Agent.AspNet.Mvc.csproj @@ -1,10 +1,10 @@ - + This package contains Razor helpers to inject Glimpse into web applications. Glimpse Agent for ASP.NET MVC 2.0.0 nmolnar;avanderhoorn - net451;netstandard1.6 + netstandard2.0 win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64 true Glimpse.Agent.AspNet.Mvc @@ -17,9 +17,13 @@ false - + + + + + @@ -27,13 +31,7 @@ - - - - - - - + $(DefineConstants);RELEASE diff --git a/src/Glimpse.Agent.AspNet.Mvc/Razor/ScriptInjectorRazorHost.cs b/src/Glimpse.Agent.AspNet.Mvc/Razor/ScriptInjectorRazorHost.cs index faa3806a..8abdc67c 100644 --- a/src/Glimpse.Agent.AspNet.Mvc/Razor/ScriptInjectorRazorHost.cs +++ b/src/Glimpse.Agent.AspNet.Mvc/Razor/ScriptInjectorRazorHost.cs @@ -1,42 +1,42 @@ -using System.Collections.Generic; -using System.Linq; -using Microsoft.AspNetCore.Mvc.Razor; -using Microsoft.AspNetCore.Mvc.Razor.Directives; -using Microsoft.AspNetCore.Razor.Chunks; -using Microsoft.AspNetCore.Razor.Compilation.TagHelpers; - -namespace Glimpse.Agent.Razor -{ - public class ScriptInjectorRazorHost : MvcRazorHost - { - public ScriptInjectorRazorHost(IChunkTreeCache codeTreeCache, ITagHelperDescriptorResolver resolver) - : base(codeTreeCache, resolver) - { - } - - private IReadOnlyList _overriddenChunks; - - public override IReadOnlyList DefaultInheritedChunks - { - get - { - if (_overriddenChunks != null) - return _overriddenChunks; - - var original = base.DefaultInheritedChunks.ToArray(); - var newArray = new Chunk[original.Length + 1]; - - original.CopyTo(newArray, 0); - - newArray[original.Length] = new AddTagHelperChunk - { - LookupText = "*, Glimpse.Agent.AspNet.Mvc" - }; - - _overriddenChunks = newArray; - - return _overriddenChunks; - } - } - } -} +//using System.Collections.Generic; +//using System.Linq; +//using Microsoft.AspNetCore.Mvc.Razor; +//using Microsoft.AspNetCore.Mvc.Razor.Directives; +//using Microsoft.AspNetCore.Razor.Chunks; +//using Microsoft.AspNetCore.Razor.Compilation.TagHelpers; + +//namespace Glimpse.Agent.Razor +//{ +// public class ScriptInjectorRazorHost : MvcRazorHost +// { +// public ScriptInjectorRazorHost(IChunkTreeCache codeTreeCache, ITagHelperDescriptorResolver resolver) +// : base(codeTreeCache, resolver) +// { +// } + +// private IReadOnlyList _overriddenChunks; + +// public override IReadOnlyList DefaultInheritedChunks +// { +// get +// { +// if (_overriddenChunks != null) +// return _overriddenChunks; + +// var original = base.DefaultInheritedChunks.ToArray(); +// var newArray = new Chunk[original.Length + 1]; + +// original.CopyTo(newArray, 0); + +// newArray[original.Length] = new AddTagHelperChunk +// { +// LookupText = "*, Glimpse.Agent.AspNet.Mvc" +// }; + +// _overriddenChunks = newArray; + +// return _overriddenChunks; +// } +// } +// } +//} diff --git a/src/Glimpse.Agent.AspNet/Glimpse.Agent.AspNet.csproj b/src/Glimpse.Agent.AspNet/Glimpse.Agent.AspNet.csproj index b468c573..d57781c7 100644 --- a/src/Glimpse.Agent.AspNet/Glimpse.Agent.AspNet.csproj +++ b/src/Glimpse.Agent.AspNet/Glimpse.Agent.AspNet.csproj @@ -1,10 +1,10 @@ - + The infrastructure and extensibility points required to enable Glimpse to gather diagnostics information from ASP.NET web applications. Glimpse Agent for ASP.NET 2.0.0 nmolnar;avanderhoorn - net451;netstandard1.6 + netstandard2.0 win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64 true Glimpse.Agent.AspNet @@ -17,25 +17,127 @@ false - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - - + + + + + + + + $(DefineConstants);RELEASE diff --git a/src/Glimpse.Common/Glimpse.Common.csproj b/src/Glimpse.Common/Glimpse.Common.csproj index bc8a8abe..940ba23d 100644 --- a/src/Glimpse.Common/Glimpse.Common.csproj +++ b/src/Glimpse.Common/Glimpse.Common.csproj @@ -1,10 +1,10 @@ - + This package contains common Glimpse interfaces and components, and is not intended for direct consumption. Glimpse Common 2.0.0 nmolnar;avanderhoorn - net451;netstandard1.6 + netstandard2.0 win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64 true Glimpse.Common @@ -17,32 +17,83 @@ false - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + $(DefineConstants);RELEASE diff --git a/src/Glimpse.Server/Glimpse.Server.csproj b/src/Glimpse.Server/Glimpse.Server.csproj index a0bf0f0f..3c13478f 100644 --- a/src/Glimpse.Server/Glimpse.Server.csproj +++ b/src/Glimpse.Server/Glimpse.Server.csproj @@ -4,7 +4,7 @@ Glimpse Server 2.0.0 nmolnar;avanderhoorn - net451;netstandard1.6 + netstandard2.0 win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64 true Glimpse.Server @@ -17,7 +17,6 @@ false - @@ -25,14 +24,9 @@ - - - - - - - - + + + $(DefineConstants);RELEASE diff --git a/test/Glimpse.FunctionalTest/Glimpse.FunctionalTest.csproj b/test/Glimpse.FunctionalTest/Glimpse.FunctionalTest.csproj index 729f113e..5b24d8de 100644 --- a/test/Glimpse.FunctionalTest/Glimpse.FunctionalTest.csproj +++ b/test/Glimpse.FunctionalTest/Glimpse.FunctionalTest.csproj @@ -1,51 +1,43 @@ - + - netcoreapp1.0;net451 + netcoreapp2.0 win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64 true Glimpse.FunctionalTest - $(PackageTargetFallback);dotnet5.4 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - - 15.0.0-preview-20161024-02 + 15.6.0 - 2.2.0-beta4-build1194 + 2.3.1 - 1.0.0 + 2.0.1 - 4.6.25-* + 4.8.2 - 2.2.0-beta4-build3444 - - - - - - 1.0.0 + 2.3.1 - 4.0.0 + 4.3.0 - - - + + + - $(DefineConstants);RELEASE diff --git a/test/Glimpse.Prototype.UnitTest/Glimpse.Prototype.UnitTest.csproj b/test/Glimpse.Prototype.UnitTest/Glimpse.Prototype.UnitTest.csproj index ab1f3707..90955dfa 100644 --- a/test/Glimpse.Prototype.UnitTest/Glimpse.Prototype.UnitTest.csproj +++ b/test/Glimpse.Prototype.UnitTest/Glimpse.Prototype.UnitTest.csproj @@ -1,47 +1,35 @@ - + - netcoreapp1.0;net451 + netcoreapp2.0 win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64 true Glimpse.Prototype.UnitTest - $(PackageTargetFallback);dotnet5.4 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - - - - - true - - - 15.0.0-preview-20161216-01 + 15.6.0 - 2.2.0-beta4-build1194 + 2.3.1 - 4.6.25-* + 4.8.2 - 2.2.0-beta4-build3444 - - - - - 1.0.0 + 2.3.1 - 4.0.0 + 4.3.0 - - - + + + $(DefineConstants);RELEASE diff --git a/test/websites/Glimpse.FunctionalTest.Website/Glimpse.FunctionalTest.Website.csproj b/test/websites/Glimpse.FunctionalTest.Website/Glimpse.FunctionalTest.Website.csproj index 1ae62875..1f8f5216 100644 --- a/test/websites/Glimpse.FunctionalTest.Website/Glimpse.FunctionalTest.Website.csproj +++ b/test/websites/Glimpse.FunctionalTest.Website/Glimpse.FunctionalTest.Website.csproj @@ -1,11 +1,11 @@ - + - netcoreapp1.0 + netcoreapp2.0 true Glimpse.FunctionalTest.Website Exe - $(PackageTargetFallback);dotnet5.6;portable-net45+win8 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; @@ -20,32 +20,29 @@ - - 1.0.0 - - 1.0.0 + 2.0.1 - 1.0.0 + 2.0.2 - 1.0.0 + 2.0.1 - 1.0.0 + 2.0.1 - 1.0.0 + 2.0.1 - 1.0.0 + 2.0.0 - 1.0.0 + 2.0.0 - 1.0.0 + 2.0.0 From 4c6c0353fcccc9883d37e0aa435b9f3c842bc03f Mon Sep 17 00:00:00 2001 From: Adrian Lewis Date: Sun, 25 Feb 2018 12:53:40 +0000 Subject: [PATCH 2/8] Fixed build - MVC razor injection is still broken --- .../Controllers/ManageController.cs | 3 +- .../Data/ApplicationDbContext.cs | 6 +- .../Models/ApplicationUser.cs | 6 +- .../ManageViewModels/ManageLoginsViewModel.cs | 9 +- .../Startup.cs | 1 + .../Views/Account/Login.cshtml | 5 +- .../Views/Manage/ManageLogins.cshtml | 2 +- .../Glimpse.Agent.AspNet.Mvc.csproj | 15 +-- .../Razor/RazorServices.cs | 8 +- src/Glimpse.Agent.AspNet/AgentServices.cs | 1 - .../Glimpse.Agent.AspNet.csproj | 112 ------------------ ...GlimpseAgentServiceCollectionExtensions.cs | 1 - .../DefaultAgentStartupManager.cs | 1 - .../Initialization/IAgentStartup.cs | 4 +- src/Glimpse.Agent.AspNet/Inspectors/Tab.cs | 1 - .../AgentStartupWebDiagnosticsInspector.cs | 2 - .../Inspectors/AspNet/AjaxInspector.cs | 4 - .../Inspectors/AspNet/UserInspector.cs | 1 - .../Inspectors/EF/EFDiagnosticsInspector.cs | 2 - .../Inspectors/Mvc/Proxies/IViewContext.cs | 3 - .../Messages/ActionViewFoundMessage.cs | 1 - .../Messages/ActionViewNotFoundMessage.cs | 3 +- .../Messages/AfterActionMessage.cs | 1 - .../Messages/AfterActionResultMessage.cs | 1 - .../Messages/BindingData.cs | 4 +- .../Messages/EnvironmentMessage.cs | 4 +- .../Messages/UserIdentificationMessage.cs | 3 - .../Messaging/AgentBrokerExtensions.cs | 1 - src/Glimpse.Common/Glimpse.Common.csproj | 62 ---------- src/Glimpse.Server/Glimpse.Server.csproj | 5 - 30 files changed, 23 insertions(+), 249 deletions(-) diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Controllers/ManageController.cs b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Controllers/ManageController.cs index b60e5d77..e3b4c49e 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Controllers/ManageController.cs +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Controllers/ManageController.cs @@ -287,7 +287,8 @@ public async Task ManageLogins(ManageMessageId? message = null) return View("Error"); } var userLogins = await _userManager.GetLoginsAsync(user); - var otherLogins = _signInManager.GetExternalAuthenticationSchemes().Where(auth => userLogins.All(ul => auth.AuthenticationScheme != ul.LoginProvider)).ToList(); + var otherLoginsResult = await _signInManager.GetExternalAuthenticationSchemesAsync(); + var otherLogins = otherLoginsResult.Where(auth => userLogins.All(ul => auth.Name != ul.LoginProvider)).ToList(); ViewData["ShowRemoveButton"] = user.PasswordHash != null || userLogins.Count > 1; return View(new ManageLoginsViewModel { diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Data/ApplicationDbContext.cs b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Data/ApplicationDbContext.cs index bc0cb170..155ac232 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Data/ApplicationDbContext.cs +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Data/ApplicationDbContext.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; +using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Glimpse.AgentServer.AspNet.Mvc.Sample.Models; diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ApplicationUser.cs b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ApplicationUser.cs index 3b61d229..db31229b 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ApplicationUser.cs +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ApplicationUser.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; +using Microsoft.AspNetCore.Identity; namespace Glimpse.AgentServer.AspNet.Mvc.Sample.Models { diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ManageViewModels/ManageLoginsViewModel.cs b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ManageViewModels/ManageLoginsViewModel.cs index cae274d0..acc0fd42 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ManageViewModels/ManageLoginsViewModel.cs +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ManageViewModels/ManageLoginsViewModel.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http.Authentication; +using System.Collections.Generic; +using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Identity; namespace Glimpse.AgentServer.AspNet.Mvc.Sample.Models.ManageViewModels @@ -11,6 +8,6 @@ public class ManageLoginsViewModel { public IList CurrentLogins { get; set; } - public IList OtherLogins { get; set; } + public IList OtherLogins { get; set; } } } diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Startup.cs b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Startup.cs index 14e6564d..f90cab91 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Startup.cs +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Startup.cs @@ -12,6 +12,7 @@ using Glimpse.AgentServer.AspNet.Mvc.Sample.Data; using Glimpse.AgentServer.AspNet.Mvc.Sample.Models; using Glimpse.AgentServer.AspNet.Mvc.Sample.Services; +using Microsoft.AspNetCore.Identity; namespace Glimpse.AgentServer.AspNet.Mvc.Sample { diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Account/Login.cshtml b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Account/Login.cshtml index d8038193..5c3565c7 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Account/Login.cshtml +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Account/Login.cshtml @@ -59,7 +59,8 @@

Use another service to log in.


@{ - var loginProviders = SignInManager.GetExternalAuthenticationSchemes().ToList(); + var loginProvidersResult = await SignInManager.GetExternalAuthenticationSchemesAsync(); + var loginProviders = loginProvidersResult.ToList(); if (loginProviders.Count == 0) {
@@ -76,7 +77,7 @@

@foreach (var provider in loginProviders) { - + }

diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Manage/ManageLogins.cshtml b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Manage/ManageLogins.cshtml index cb764d4a..65768296 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Manage/ManageLogins.cshtml +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Manage/ManageLogins.cshtml @@ -46,7 +46,7 @@

@foreach (var provider in Model.OtherLogins) { - + }

diff --git a/src/Glimpse.Agent.AspNet.Mvc/Glimpse.Agent.AspNet.Mvc.csproj b/src/Glimpse.Agent.AspNet.Mvc/Glimpse.Agent.AspNet.Mvc.csproj index 546b58db..07c36d86 100644 --- a/src/Glimpse.Agent.AspNet.Mvc/Glimpse.Agent.AspNet.Mvc.csproj +++ b/src/Glimpse.Agent.AspNet.Mvc/Glimpse.Agent.AspNet.Mvc.csproj @@ -14,24 +14,15 @@ https://github.com/Glimpse/Glimpse.Prototype/blob/dev/LICENSE.txt git https://github.com/Glimpse/Glimpse.Prototype - false
- - - - - - - - - - true - + + + $(DefineConstants);RELEASE diff --git a/src/Glimpse.Agent.AspNet.Mvc/Razor/RazorServices.cs b/src/Glimpse.Agent.AspNet.Mvc/Razor/RazorServices.cs index 96da7a50..70939e66 100644 --- a/src/Glimpse.Agent.AspNet.Mvc/Razor/RazorServices.cs +++ b/src/Glimpse.Agent.AspNet.Mvc/Razor/RazorServices.cs @@ -1,7 +1,7 @@ -using Glimpse.Agent.Razor; +//using Glimpse.Agent.Razor; using Glimpse.Common.Initialization; -using Microsoft.AspNetCore.Mvc.Razor; -using Microsoft.Extensions.DependencyInjection; +//using Microsoft.AspNetCore.Mvc.Razor; +//using Microsoft.Extensions.DependencyInjection; namespace Glimpse.Agent.AspNet.Mvc.Razor { @@ -9,7 +9,7 @@ public class RazorServices : IRegisterServices { public void RegisterServices(GlimpseServiceCollectionBuilder services) { - services.AddTransient(); + //services.AddTransient(); } } } \ No newline at end of file diff --git a/src/Glimpse.Agent.AspNet/AgentServices.cs b/src/Glimpse.Agent.AspNet/AgentServices.cs index 55fcdba5..a9e8fba0 100644 --- a/src/Glimpse.Agent.AspNet/AgentServices.cs +++ b/src/Glimpse.Agent.AspNet/AgentServices.cs @@ -1,4 +1,3 @@ -using System.IO; using Glimpse.Common.Initialization; using Microsoft.Extensions.DependencyInjection; using Glimpse.Agent; diff --git a/src/Glimpse.Agent.AspNet/Glimpse.Agent.AspNet.csproj b/src/Glimpse.Agent.AspNet/Glimpse.Agent.AspNet.csproj index d57781c7..22375c4e 100644 --- a/src/Glimpse.Agent.AspNet/Glimpse.Agent.AspNet.csproj +++ b/src/Glimpse.Agent.AspNet/Glimpse.Agent.AspNet.csproj @@ -14,119 +14,7 @@ https://github.com/Glimpse/Glimpse.Prototype/blob/dev/LICENSE.txt git https://github.com/Glimpse/Glimpse.Prototype - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Glimpse.Agent.AspNet/GlimpseAgentServiceCollectionExtensions.cs b/src/Glimpse.Agent.AspNet/GlimpseAgentServiceCollectionExtensions.cs index 4d6adfb5..df435e5d 100644 --- a/src/Glimpse.Agent.AspNet/GlimpseAgentServiceCollectionExtensions.cs +++ b/src/Glimpse.Agent.AspNet/GlimpseAgentServiceCollectionExtensions.cs @@ -1,5 +1,4 @@ using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.DependencyInjection.Extensions; using System; using Glimpse.Agent; diff --git a/src/Glimpse.Agent.AspNet/Initialization/DefaultAgentStartupManager.cs b/src/Glimpse.Agent.AspNet/Initialization/DefaultAgentStartupManager.cs index 5b685fa0..96013aac 100644 --- a/src/Glimpse.Agent.AspNet/Initialization/DefaultAgentStartupManager.cs +++ b/src/Glimpse.Agent.AspNet/Initialization/DefaultAgentStartupManager.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Glimpse.Initialization; namespace Glimpse.Initialization { diff --git a/src/Glimpse.Agent.AspNet/Initialization/IAgentStartup.cs b/src/Glimpse.Agent.AspNet/Initialization/IAgentStartup.cs index 667d01ec..8165c49d 100644 --- a/src/Glimpse.Agent.AspNet/Initialization/IAgentStartup.cs +++ b/src/Glimpse.Agent.AspNet/Initialization/IAgentStartup.cs @@ -1,6 +1,4 @@ -using Glimpse.Initialization; - -namespace Glimpse.Initialization +namespace Glimpse.Initialization { public interface IAgentStartup { diff --git a/src/Glimpse.Agent.AspNet/Inspectors/Tab.cs b/src/Glimpse.Agent.AspNet/Inspectors/Tab.cs index f7d411fc..51dc0c53 100644 --- a/src/Glimpse.Agent.AspNet/Inspectors/Tab.cs +++ b/src/Glimpse.Agent.AspNet/Inspectors/Tab.cs @@ -1,7 +1,6 @@ using System; using Glimpse.Agent.AspNet.Messages; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Http.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.AspNetCore.Http.Features; diff --git a/src/Glimpse.Agent.AspNet/Internal/Inspectors/AgentStartupWebDiagnosticsInspector.cs b/src/Glimpse.Agent.AspNet/Internal/Inspectors/AgentStartupWebDiagnosticsInspector.cs index 93cca4a2..054e42bd 100644 --- a/src/Glimpse.Agent.AspNet/Internal/Inspectors/AgentStartupWebDiagnosticsInspector.cs +++ b/src/Glimpse.Agent.AspNet/Internal/Inspectors/AgentStartupWebDiagnosticsInspector.cs @@ -1,7 +1,5 @@ using System; -using System.Collections.Generic; using System.Diagnostics; -using Glimpse.Agent; using Glimpse.Agent.Configuration; using Glimpse.Initialization; using Microsoft.Extensions.DependencyInjection; diff --git a/src/Glimpse.Agent.AspNet/Internal/Inspectors/AspNet/AjaxInspector.cs b/src/Glimpse.Agent.AspNet/Internal/Inspectors/AspNet/AjaxInspector.cs index c3e422b4..f0b1263e 100644 --- a/src/Glimpse.Agent.AspNet/Internal/Inspectors/AspNet/AjaxInspector.cs +++ b/src/Glimpse.Agent.AspNet/Internal/Inspectors/AspNet/AjaxInspector.cs @@ -1,7 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Glimpse.Agent.Inspectors; using Glimpse.Common; using Microsoft.AspNetCore.Http; diff --git a/src/Glimpse.Agent.AspNet/Internal/Inspectors/AspNet/UserInspector.cs b/src/Glimpse.Agent.AspNet/Internal/Inspectors/AspNet/UserInspector.cs index 6a1a8c38..202dc4d9 100644 --- a/src/Glimpse.Agent.AspNet/Internal/Inspectors/AspNet/UserInspector.cs +++ b/src/Glimpse.Agent.AspNet/Internal/Inspectors/AspNet/UserInspector.cs @@ -5,7 +5,6 @@ using Glimpse.Agent.Messages; using Glimpse.Common; using Glimpse.Internal.Extensions; -using Glimpse.Internal; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; diff --git a/src/Glimpse.Agent.AspNet/Internal/Inspectors/EF/EFDiagnosticsInspector.cs b/src/Glimpse.Agent.AspNet/Internal/Inspectors/EF/EFDiagnosticsInspector.cs index 00e7111b..626aae1a 100644 --- a/src/Glimpse.Agent.AspNet/Internal/Inspectors/EF/EFDiagnosticsInspector.cs +++ b/src/Glimpse.Agent.AspNet/Internal/Inspectors/EF/EFDiagnosticsInspector.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; using Glimpse.Agent.Internal.Inspectors.EF.Proxies; using Glimpse.Agent.Messages; using Microsoft.Extensions.DiagnosticAdapter; diff --git a/src/Glimpse.Agent.AspNet/Internal/Inspectors/Mvc/Proxies/IViewContext.cs b/src/Glimpse.Agent.AspNet/Internal/Inspectors/Mvc/Proxies/IViewContext.cs index df14ada7..d1910c4e 100644 --- a/src/Glimpse.Agent.AspNet/Internal/Inspectors/Mvc/Proxies/IViewContext.cs +++ b/src/Glimpse.Agent.AspNet/Internal/Inspectors/Mvc/Proxies/IViewContext.cs @@ -1,7 +1,4 @@ -using System; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; namespace Glimpse.Agent.Internal.Inspectors.Mvc.Proxies diff --git a/src/Glimpse.Agent.AspNet/Messages/ActionViewFoundMessage.cs b/src/Glimpse.Agent.AspNet/Messages/ActionViewFoundMessage.cs index ef420a1b..0a0cad34 100644 --- a/src/Glimpse.Agent.AspNet/Messages/ActionViewFoundMessage.cs +++ b/src/Glimpse.Agent.AspNet/Messages/ActionViewFoundMessage.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; namespace Glimpse.Agent.Messages { diff --git a/src/Glimpse.Agent.AspNet/Messages/ActionViewNotFoundMessage.cs b/src/Glimpse.Agent.AspNet/Messages/ActionViewNotFoundMessage.cs index 335bc4a7..dde74894 100644 --- a/src/Glimpse.Agent.AspNet/Messages/ActionViewNotFoundMessage.cs +++ b/src/Glimpse.Agent.AspNet/Messages/ActionViewNotFoundMessage.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; namespace Glimpse.Agent.Messages { diff --git a/src/Glimpse.Agent.AspNet/Messages/AfterActionMessage.cs b/src/Glimpse.Agent.AspNet/Messages/AfterActionMessage.cs index 058f4f1c..66defb05 100644 --- a/src/Glimpse.Agent.AspNet/Messages/AfterActionMessage.cs +++ b/src/Glimpse.Agent.AspNet/Messages/AfterActionMessage.cs @@ -1,6 +1,5 @@  using System; -using Glimpse.Internal; namespace Glimpse.Agent.Messages { diff --git a/src/Glimpse.Agent.AspNet/Messages/AfterActionResultMessage.cs b/src/Glimpse.Agent.AspNet/Messages/AfterActionResultMessage.cs index 0e349ccf..d8b7b963 100644 --- a/src/Glimpse.Agent.AspNet/Messages/AfterActionResultMessage.cs +++ b/src/Glimpse.Agent.AspNet/Messages/AfterActionResultMessage.cs @@ -1,5 +1,4 @@ using System; -using Glimpse.Internal; namespace Glimpse.Agent.Messages { diff --git a/src/Glimpse.Agent.AspNet/Messages/BindingData.cs b/src/Glimpse.Agent.AspNet/Messages/BindingData.cs index 552f060c..139b13eb 100644 --- a/src/Glimpse.Agent.AspNet/Messages/BindingData.cs +++ b/src/Glimpse.Agent.AspNet/Messages/BindingData.cs @@ -1,6 +1,4 @@ -using System; - -namespace Glimpse.Agent.Messages +namespace Glimpse.Agent.Messages { public class BindingData { diff --git a/src/Glimpse.Agent.AspNet/Messages/EnvironmentMessage.cs b/src/Glimpse.Agent.AspNet/Messages/EnvironmentMessage.cs index 5fd7e82e..e2b7b389 100644 --- a/src/Glimpse.Agent.AspNet/Messages/EnvironmentMessage.cs +++ b/src/Glimpse.Agent.AspNet/Messages/EnvironmentMessage.cs @@ -1,6 +1,4 @@ -using System.Collections; - -namespace Glimpse.Agent.AspNet.Messages +namespace Glimpse.Agent.AspNet.Messages { public class EnvironmentMessage { diff --git a/src/Glimpse.Agent.AspNet/Messages/UserIdentificationMessage.cs b/src/Glimpse.Agent.AspNet/Messages/UserIdentificationMessage.cs index aa624e29..708940e2 100644 --- a/src/Glimpse.Agent.AspNet/Messages/UserIdentificationMessage.cs +++ b/src/Glimpse.Agent.AspNet/Messages/UserIdentificationMessage.cs @@ -1,6 +1,3 @@ -using Glimpse.Agent.Internal.Messaging; -using Glimpse.Internal; - namespace Glimpse.Agent.Messages { public class UserIdentificationMessage diff --git a/src/Glimpse.Agent.AspNet/Messaging/AgentBrokerExtensions.cs b/src/Glimpse.Agent.AspNet/Messaging/AgentBrokerExtensions.cs index c06192d6..29a043fd 100644 --- a/src/Glimpse.Agent.AspNet/Messaging/AgentBrokerExtensions.cs +++ b/src/Glimpse.Agent.AspNet/Messaging/AgentBrokerExtensions.cs @@ -1,5 +1,4 @@ using System; -using Glimpse.Common.Internal.Messaging; using Glimpse.Internal; namespace Glimpse.Agent diff --git a/src/Glimpse.Common/Glimpse.Common.csproj b/src/Glimpse.Common/Glimpse.Common.csproj index 940ba23d..aad2d02e 100644 --- a/src/Glimpse.Common/Glimpse.Common.csproj +++ b/src/Glimpse.Common/Glimpse.Common.csproj @@ -14,69 +14,7 @@ https://github.com/Glimpse/Glimpse.Prototype/blob/dev/LICENSE.txt git https://github.com/Glimpse/Glimpse.Prototype - false
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Glimpse.Server/Glimpse.Server.csproj b/src/Glimpse.Server/Glimpse.Server.csproj index 3c13478f..4039a90f 100644 --- a/src/Glimpse.Server/Glimpse.Server.csproj +++ b/src/Glimpse.Server/Glimpse.Server.csproj @@ -14,12 +14,7 @@ https://github.com/Glimpse/Glimpse.Prototype/blob/dev/LICENSE.txt git https://github.com/Glimpse/Glimpse.Prototype - false
- - - - From 77f95e2b13bfdc52d0e0a2afd757582ffb51d37a Mon Sep 17 00:00:00 2001 From: Adrian Lewis Date: Sun, 25 Feb 2018 13:37:40 +0000 Subject: [PATCH 3/8] Added missing resources MVC samples fixed by explicitly including tag-helper --- .../Views/Shared/_Layout.cshtml | 2 +- .../Views/_ViewImports.cshtml | 1 + .../Views/Shared/_Layout.cshtml | 2 +- .../Views/_ViewImports.cshtml | 3 +- src/Glimpse.Server/Glimpse.Server.csproj | 58 +++++++++++++++++++ 5 files changed, 63 insertions(+), 3 deletions(-) diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Shared/_Layout.cshtml b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Shared/_Layout.cshtml index dbc59bbc..c7ea064b 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Shared/_Layout.cshtml +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Shared/_Layout.cshtml @@ -16,7 +16,7 @@ - +