public void AddUnit(IDefinition definition) { if (IgnoreUnitNames.Contains(definition.Name)) { return; } _units[definition.Name] = definition; }
public void AddUnit(IDefinition definition) { if (IgnoreUnitNames.Contains(definition.Name)) { return; } var existing = _units.FirstOrDefault(x => x.Name == definition.Name); if (existing != null) { _units.Remove(existing); } _units.Add(definition); }