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

@@ -13,7 +13,7 @@ namespace Umbraco.Cms.Core.Cache
/// </summary>
/// <param name="key">The key of the item.</param>
/// <returns>The item, or null if the item was not found.</returns>
object Get(string key);
object? Get(string key);
/// <summary>
/// Gets or creates an item identified by its key.
@@ -21,21 +21,21 @@ namespace Umbraco.Cms.Core.Cache
/// <param name="key">The key of the item.</param>
/// <param name="factory">A factory function that can create the item.</param>
/// <returns>The item.</returns>
object Get(string key, Func<object> factory);
object? Get(string key, Func<object?> factory);
/// <summary>
/// Gets items with a key starting with the specified value.
/// </summary>
/// <param name="keyStartsWith">The StartsWith value to use in the search.</param>
/// <returns>Items matching the search.</returns>
IEnumerable<object> SearchByKey(string keyStartsWith);
IEnumerable<object?> SearchByKey(string keyStartsWith);
/// <summary>
/// Gets items with a key matching a regular expression.
/// </summary>
/// <param name="regex">The regular expression.</param>
/// <returns>Items matching the search.</returns>
IEnumerable<object> SearchByRegex(string regex);
IEnumerable<object?> SearchByRegex(string regex);
/// <summary>
/// Removes all items from the cache.