public T Get(MapTypeKey key) { if (!TryGet(key, out var type)) { throw new KeyNotFoundException($"This set does not contain the specified key: {key}"); } return(type); }
public bool TryGet(MapTypeKey key, out T type) => _byKey.TryGetValue(key, out type);
public T this[MapTypeKey key] => Get(key);
public bool Contains(MapTypeKey key) => _byKey.ContainsKey(key);
public MapTypeInfo(AreaKey area, Type declaredType) { DeclaredType = declaredType; Key = MapTypeKey.From(area, ReadName()); State = new MapTypeState(declaredType); }