-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade samples to net5.0 (removing netcoreapp2.1) (#579)
This does an upgrade to net5.0 (to be followed by a 6.0 jump) to get things current.
- Loading branch information
1 parent
4ae9740
commit f9b191b
Showing
83 changed files
with
244 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
benchmarks/MiniProfiler.Benchmarks/Benchmarks/CrazySlowJSONBenchmarks.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
benchmarks/MiniProfiler.Benchmarks/Benchmarks/CustomTimingBenchmarks.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
benchmarks/MiniProfiler.Benchmarks/Benchmarks/DictionaryBenchmarks.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
benchmarks/MiniProfiler.Benchmarks/Benchmarks/MiniProfilerBenchmarks.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
benchmarks/MiniProfiler.Benchmarks/Benchmarks/SerializationBenchmarks.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
benchmarks/MiniProfiler.Benchmarks/Benchmarks/StackTraceSnippetBenchmarks.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"sdk": { | ||
"version": "3.0.100", | ||
"rollForward": "latestMinor" | ||
"allowPrerelease": false | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Mvc.Filters; | ||
|
||
namespace Samples.AspNetCore | ||
{ | ||
public class ExampleActionFilterAttribute : ActionFilterAttribute | ||
{ | ||
public override void OnActionExecuting(ActionExecutingContext context) => Thread.Sleep(100); | ||
} | ||
|
||
public class ExampleLongActionFilterAttribute : ActionFilterAttribute | ||
{ | ||
public override void OnActionExecuting(ActionExecutingContext context) => Thread.Sleep(200); | ||
} | ||
|
||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = true)] | ||
public class ExampleAsyncActionFilterAttribute : Attribute, IAsyncActionFilter | ||
{ | ||
public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) | ||
{ | ||
await Task.Delay(300); | ||
await next(); | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@page | ||
|
||
@{ | ||
ViewData["Title"] = "Razor Pages Sample"; | ||
} | ||
<div class="col-md-12"> | ||
<div class="page-header"> | ||
<h2>ASP.NET Core 3: Behold MiniProfiler in the top right (Razor Pages Version)!</h2> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<partial name="Index.LeftPanel" /> | ||
<partial name="Index.RightPanel" /> | ||
</div> | ||
@section scripts { | ||
<script> | ||
$(function () { | ||
// these links should fire ajax requests, not do navigation | ||
$('.ajax-requests a').click(function () { | ||
var $clicked = $(this), | ||
$spinner = $('<span class="glyphicon glyphicon-refresh spinning" title="Working..."></span>').appendTo($clicked.parent()), | ||
$results = $('.ajax-results'); | ||
$.ajax({ | ||
type: 'GET', | ||
url: this.href, | ||
success: function (data) { | ||
$('<p class="ajax-result">').append(data).appendTo($results); | ||
}, | ||
error: function () { $results.append('<p>ERROR!</p>'); }, | ||
complete: function () { $spinner.remove(); } | ||
}); | ||
return false; | ||
}); | ||
}); | ||
</script> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@using Samples.AspNetCore | ||
@namespace Samples.AspNetCore.Pages | ||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
samples/Samples.AspNetCore2/Readme.md → samples/Samples.AspNet5/Readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# ASP.NET Core 2.2 | ||
-------- | ||
This is a sample project demonstrating how MiniProfiler can be used in ASP.NET Core 2.2. | ||
This is a sample project demonstrating how MiniProfiler can be used in ASP.NET Core 5.0. |
4 changes: 2 additions & 2 deletions
4
...es.AspNetCore2/Samples.AspNetCore2.csproj → ...es/Samples.AspNet5/Samples.AspNet5.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
<TargetFramework>net5.0</TargetFramework> | ||
<PreserveCompilationContext>true</PreserveCompilationContext> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.All" /> | ||
<ProjectReference Include="..\..\src\MiniProfiler.AspNetCore.Mvc\MiniProfiler.AspNetCore.Mvc.csproj" /> | ||
<ProjectReference Include="..\..\src\MiniProfiler.EntityFrameworkCore\MiniProfiler.EntityFrameworkCore.csproj" /> | ||
<ProjectReference Include="..\..\src\MiniProfiler.Providers.SqlServer\MiniProfiler.Providers.SqlServer.csproj" /> | ||
<ProjectReference Include="..\..\src\MiniProfiler.Providers.Sqlite\MiniProfiler.Providers.Sqlite.csproj" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.9" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.