protected void Apply(ThingGrabbedEvent e) { var id = _ids.SingleOrDefault(x => x == e.Id); if (id is not null) { _ids.Remove(id); } }
private void Apply(ThingGrabbedEvent e) { foreach (var pair in _things) { var match = pair.Value.SingleOrDefault(x => x == e.Id); if (match is not null) { pair.Value.Remove(match); break; } } _weights.Remove(e.Id); }
private void Apply(ThingGrabbedEvent e) { var theThing = _things.SingleOrDefault(x => x.Id == e.Id); _things.Remove(theThing); }