예제 #1
0
 public void AddUnit(IDefinition definition)
 {
     if (IgnoreUnitNames.Contains(definition.Name))
     {
         return;
     }
     _units[definition.Name] = definition;
 }
예제 #2
0
        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);
        }