Esempio n. 1
0
        public VfxFixVxRecord Get(string name)
        {
            VfxFixVxRecord result = null;

            if (!string.IsNullOrEmpty(name))
            {
                _rwLock.AcquireReaderLock(Timeout.Infinite);
                if (_mapEntries.ContainsKey(name))
                {
                    result = _mapEntries[name];
                }
                _rwLock.ReleaseReaderLock();
            }

            return(result);
        }
Esempio n. 2
0
        public VfxFixVxRecord Add(string name, VfxFixVxRecord record)
        {
            VfxFixVxRecord result = record;

            _rwLock.AcquireWriterLock(Timeout.Infinite);

            if (!_mapEntries.ContainsKey(name))
            {
                _mapEntries.Add(name, record);
            }
            else
            {
                _mapEntries[name] = record;
            }

            _rwLock.ReleaseWriterLock();
            return(record);
        }