removes one null check, adds notes

This commit is contained in:
Shannon
2020-04-01 13:13:15 +11:00
parent f1b398fab6
commit c9c8693560
2 changed files with 10 additions and 4 deletions

View File

@@ -502,6 +502,14 @@ namespace Umbraco.Web.PublishedCache.NuCache
}
}
/// <summary>
/// Validate the <see cref="ContentNodeKit"/> and try to create a parent <see cref="LinkedNode{ContentNode}"/>
/// </summary>
/// <param name="kit"></param>
/// <param name="parent"></param>
/// <returns>
/// Returns false if the parent was not found or if the kit validation failed
/// </returns>
private bool BuildKit(ContentNodeKit kit, out LinkedNode<ContentNode> parent)
{
// make sure parent exists

View File

@@ -1,6 +1,4 @@
using System;
namespace Umbraco.Web.PublishedCache.NuCache.Snap
namespace Umbraco.Web.PublishedCache.NuCache.Snap
{
//NOTE: This cannot be struct because it references itself
@@ -13,7 +11,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.Snap
{
public LinkedNode(TValue value, long gen, LinkedNode<TValue> next = null)
{
Value = value ?? throw new ArgumentNullException(nameof(value));
Value = value; // This is allowed to be null, we actually explicitly set this to null in ClearLocked
Gen = gen;
Next = next;
}