Beispiel #1
0
        public ElaMutableMap CreateMap(ElaRecord rec)
        {
            var map = new ElaMutableMap();

            foreach (var k in rec.GetKeys())
                map.Map.Add(new ElaValue(k), rec[k]);

            return map;
        }
Beispiel #2
0
        public ElaVariant Get(ElaValue key, ElaMutableMap map)
        {
            var val = default(ElaValue);

            if (!map.Map.TryGetValue(key, out val))
                return ElaVariant.None();

            return ElaVariant.Some(val);
        }
Beispiel #3
0
 public ElaList GetValues(ElaMutableMap map)
 {
     return ElaList.FromEnumerable(map.Map.Values);
 }
Beispiel #4
0
 public ElaList GetKeys(ElaMutableMap map)
 {
     return ElaList.FromEnumerable(map.Map.Keys);
 }
Beispiel #5
0
 public bool Contains(ElaValue key, ElaMutableMap map)
 {
     return map.Map.ContainsKey(key);
 }