Пример #1
0
        public long Add(HSD.Tuple <string, string> item)
        {
            long address;

            lock (HashSet)
            {
                HashSet.Add(item.Key, item.Value);
                HashSetInverted.Add(item.Value, item.Key);
                address = HashSet.Count;
            }

            return(address);
        }
Пример #2
0
        public bool ContainsValue(string value, out HSD.Tuple <string, string> item, out long address)
        {
            if (HashSetInverted.ContainsKey(value))
            {
                HSD.Tuple <string, string> tuple = new HSD.Tuple <string, string>(null, value);
                tuple.Value = (string)HashSetInverted[value];
                address     = 0;
                item        = tuple;

                return(true);
            }
            else
            {
                item    = null;
                address = 0;
                return(false);
            }
        }
Пример #3
0
        public bool ContainsKey(string key, out HSD.Tuple <string, string> item, out long address)
        {
            if (HashSet.ContainsKey(key))
            {
                HSD.Tuple <string, string> tuple = new HSD.Tuple <string, string>(key, null);
                tuple.Value = (string)HashSet[key];
                address     = 0;
                item        = tuple;

                return(true);
            }
            else
            {
                item    = null;
                address = 0;
                return(false);
            }
        }
 public bool ContainsValue(string value, out HSD.Tuple <string, string> item, out long address)
 {
     return(DataSet.ContainsValue(value, out item, out address));
 }
 public bool ContainsKey(string key, out HSD.Tuple <string, string> item, out long address)
 {
     return(DataSet.ContainsKey(key, out item, out address));
 }
 public long Add(HSD.Tuple <string, string> item)
 {
     return(DataSet.Add(item));
 }