Пример #1
0
        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);
        }
Пример #2
0
 public bool TryGet(MapTypeKey key, out T type) =>
 _byKey.TryGetValue(key, out type);
Пример #3
0
 public T this[MapTypeKey key] => Get(key);
Пример #4
0
 public bool Contains(MapTypeKey key) =>
 _byKey.ContainsKey(key);
Пример #5
0
 public MapTypeInfo(AreaKey area, Type declaredType)
 {
     DeclaredType = declaredType;
     Key          = MapTypeKey.From(area, ReadName());
     State        = new MapTypeState(declaredType);
 }