Fixed smalled things due to nullable refernece types

This commit is contained in:
Bjarke Berg
2023-11-14 10:51:06 +01:00
parent 737104624e
commit 97aa623e87
3 changed files with 3 additions and 4 deletions

View File

@@ -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)

View File

@@ -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,