Add nullability to web.common

This commit is contained in:
Nikolaj Geisle
2022-03-29 13:44:21 +02:00
parent 86ae730b1e
commit b52c4e50cf
151 changed files with 731 additions and 675 deletions

View File

@@ -20,7 +20,7 @@ namespace Umbraco.Cms.Web.Common.AspNetCore
/// </summary>
private bool IsSessionsAvailable => !(_httpContextAccessor.HttpContext?.Features.Get<ISessionFeature>() is null);
public string SessionId
public string? SessionId
{
get
{
@@ -32,7 +32,7 @@ namespace Umbraco.Cms.Web.Common.AspNetCore
}
}
public string GetSessionValue(string sessionName)
public string? GetSessionValue(string sessionName)
{
if(!IsSessionsAvailable) return null;
return _httpContextAccessor.HttpContext?.Session.GetString(sessionName);