internal override void RemoveFallback(FallBackNode <TKey, TGenerate> node) { base.RemoveFallback(node); if (_linkedByAsFallback.Count == 0 || _items.Count != 0) { return; } _logger?.Log($"removing node as fallback from [{string.Join(", ", _linkedByAsFallback)}]", LoggerSeverity.Warning); _linkedByAsFallback.ForEach(x => x.RemoveFallback(this)); }
internal override void RemoveFallback(FallBackNode <TKey, TGenerate> node) { base.RemoveFallback(node); if (_items.Count != 0 || _fallbackNode != null) { return; } _logger?.Log($"no more fallback and items available, detaching node {this} from parents", LoggerSeverity.Warning); _parents.ForEach(x => x.DetachChild(this.Key)); IsDetached = true; RaiseOnDetach(); }