private void _register(Registration registration) { uint key = _getKey(registration.VendorId, registration.ObjectType); if (_registrations.ContainsKey(key)) throw new Exception("Key already registered"); _registrations.Add(key, registration); }