Started using nullable reference types..

This commit is contained in:
Bjarke Berg
2021-12-16 13:44:20 +01:00
parent 11eaf176a9
commit 2ec92057c5
192 changed files with 752 additions and 723 deletions

View File

@@ -11,7 +11,7 @@ namespace Umbraco.Extensions
{
#region Value
public static object Value(this IPublishedProperty property, IPublishedValueFallback publishedValueFallback, string culture = null, string segment = null, Fallback fallback = default, object defaultValue = default)
public static object Value(this IPublishedProperty property, IPublishedValueFallback publishedValueFallback, string? culture = null, string? segment = null, Fallback fallback = default, object? defaultValue = default)
{
if (property.HasValue(culture, segment))
return property.GetValue(culture, segment);
@@ -25,7 +25,7 @@ namespace Umbraco.Extensions
#region Value<T>
public static T Value<T>(this IPublishedProperty property, IPublishedValueFallback publishedValueFallback, string culture = null, string segment = null, Fallback fallback = default, T defaultValue = default)
public static T? Value<T>(this IPublishedProperty property, IPublishedValueFallback publishedValueFallback, string? culture = null, string? segment = null, Fallback fallback = default, T? defaultValue = default)
{
if (property.HasValue(culture, segment))
{