Exemplo n.º 1
0
        // In priority order:
        // * T5 Allegiance code (T5SS)
        // * Legacy -> T5 overrides
        // * Legacy stock codes
        // * Legacy -> T5 (T5SS)
        public static Allegiance GetStockAllegianceFromCode(string code)
        {
            if (code == null)
            {
                return(null);
            }

            if (s_t5Allegiances.ContainsKey(code))
            {
                return(s_t5Allegiances[code]);
            }
            if (s_legacyAllegianceToT5Overrides.ContainsKey(code))
            {
                return(s_t5Allegiances[s_legacyAllegianceToT5Overrides[code]]);
            }
            if (s_legacyAllegiances.ContainsKey(code))
            {
                return(s_legacyAllegiances[code]);
            }
            if (s_legacyToT5Allegiance.ContainsKey(code))
            {
                return(s_legacyToT5Allegiance[code]);
            }

            return(null);
        }
Exemplo n.º 2
0
 public static bool IsKnownT5Allegiance(string code)
 {
     return(s_t5Allegiances.ContainsKey(code));
 }
Exemplo n.º 3
0
 public static bool IsKnownT5Allegiance(string code) => s_t5Allegiances.ContainsKey(code);