Fixed smalled things due to nullable refernece types
This commit is contained in:
@@ -29,7 +29,7 @@ public class WebProfiler : IProfiler
|
||||
public void Start()
|
||||
{
|
||||
MiniProfiler.StartNew();
|
||||
MiniProfilerContext.Value = MiniProfiler.Current;
|
||||
MiniProfilerContext.Value = MiniProfiler.Current!;
|
||||
}
|
||||
|
||||
public void Stop(bool discardResults = false) => MiniProfilerContext.Value?.Stop(discardResults);
|
||||
@@ -84,7 +84,7 @@ public class WebProfiler : IProfiler
|
||||
|
||||
if (cookieValue is not null)
|
||||
{
|
||||
AddSubProfiler(MiniProfiler.FromJson(cookieValue));
|
||||
AddSubProfiler(MiniProfiler.FromJson(cookieValue)!);
|
||||
}
|
||||
|
||||
// If it is a redirect to a relative path (local redirect)
|
||||
|
||||
@@ -34,7 +34,7 @@ public class WebProfilerHtml : IProfilerHtml
|
||||
|
||||
var result = StackExchange.Profiling.Internal.Render.Includes(
|
||||
profiler,
|
||||
context is not null ? context.Request.PathBase + path : null,
|
||||
context is not null ? context.Request.PathBase + path : string.Empty,
|
||||
true,
|
||||
new List<Guid> { profiler.Id },
|
||||
RenderPosition.Right,
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoFixture.AutoMoq" Version="4.18.0" />
|
||||
<PackageReference Include="MiniProfiler.AspNetCore" Version="4.2.22" />
|
||||
<PackageReference Include="Moq" Version="4.18.4" />
|
||||
<PackageReference Include="AutoFixture.NUnit3" Version="4.18.0" />
|
||||
<PackageReference Include="NUnit" Version="3.14.0" />
|
||||
|
||||
Reference in New Issue
Block a user