Пример #1
0
        public static TType GetOrDefault <TType, TValue>(
            this IDict <Symbol, TValue> dict, TypedSymbol <TType> key)
            where TType : TValue
        {
            TValue value;

            if (dict.TryGetValue(key.Symbol, out value))
            {
                return((TType)value);
            }
            return(default(TType));
        }
Пример #2
0
        public static bool TryGetValue <TType, TValue>(
            this IDict <Symbol, TValue> dict, TypedSymbol <TType> key, out TType typedValue)
            where TType : TValue
        {
            TValue value;

            if (dict.TryGetValue(key.Symbol, out value))
            {
                typedValue = (TType)value;
                return(true);
            }
            typedValue = default(TType);
            return(false);
        }
Пример #3
0
 public static bool ContainsKey <TType, TValue>(
     this IDict <Symbol, TValue> dict, TypedSymbol <TType> key)
     where TType : TValue
 {
     return(dict.ContainsKey(key.Symbol));
 }
Пример #4
0
 public static TType Get <TType, TValue>(
     this IDict <Symbol, TValue> dict, TypedSymbol <TType> key)
     where TType : TValue
 {
     return((TType)dict[key.Symbol]);
 }
Пример #5
0
 public T Get <T>(TypedSymbol <T> key, T defaultValue) => m_ht.Get(key, defaultValue);
Пример #6
0
 public void Set <T>(TypedSymbol <T> key, T value) => m_ht.Set(key, value);
Пример #7
0
 public T GetOrDefault <T>(TypedSymbol <T> key) => m_ht.GetOrDefault(key);
Пример #8
0
 public T Get <T>(TypedSymbol <T> key) => m_ht.Get(key);
Пример #9
0
 public T Get<T>(TypedSymbol<T> key, T defaultValue)
 {
     return m_ht.Get(key, defaultValue);
 }
Пример #10
0
 public T GetOrDefault<T>(TypedSymbol<T> key)
 {
     return m_ht.GetOrDefault(key);
 }
Пример #11
0
 public T Get<T>(TypedSymbol<T> key)
 {
     return m_ht.Get(key);
 }