public OverrideItem ( |
||
item | ||
Résultat | void |
private void overrideItem(DefinitionCacheItem existing, DefinitionCacheItem item) { if (item.Parameters.Length == 0) { return; } var childItem = item.Parameters[0]; if (!childItem.Override) { Logger.Write("Found and overrides command with " + item.Name); existing.OverrideItem(childItem); return; } var child = existing.Parameters.FirstOrDefault(x => x.Name == childItem.Name); if (child == null) { return; } overrideItem(child, childItem); }
private bool overrideItem(DefinitionCacheItem existing, DefinitionCacheItem item) { if (!item.Override) return true; if (item.Parameters.Length == 0) return false; var childItem = item.Parameters[0]; var child = existing.Parameters.FirstOrDefault(x => x.Name == childItem.Name); if (child == null) return false; if (overrideItem(child, childItem)) existing.OverrideItem(childItem); return false; }
private void overrideItem(DefinitionCacheItem existing, DefinitionCacheItem item) { if (item.Parameters.Length == 0) return; var childItem = item.Parameters[0]; if (!childItem.Override) { Logger.Write("Found and overrides command with "+item.Name); existing.OverrideItem(childItem); return; } var child = existing.Parameters.FirstOrDefault(x => x.Name == childItem.Name); if (child == null) return; overrideItem(child, childItem); }