We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
GetAndChange
1 parent 806091d commit 805678dCopy full SHA for 805678d
src/Neo/Persistence/DataCache.cs
@@ -316,7 +316,7 @@ public bool Contains(StorageKey key)
316
/// <param name="key">The key of the entry.</param>
317
/// <param name="factory">A delegate used to create the entry if it doesn't exist. If the entry already exists, the factory will not be used.</param>
318
/// <returns>The cached data. Or <see langword="null"/> if it doesn't exist and the <paramref name="factory"/> is not provided.</returns>
319
- public StorageItem? GetAndChange(StorageKey key, Func<StorageItem>? factory = null)
+ public StorageItem? GetAndChange(StorageKey key, [NotNullIfNotNull(nameof(factory))] Func<StorageItem>? factory = null)
320
{
321
lock (_dictionary)
322
0 commit comments