Пример #1
0
        bool TryLoad(PropertyDatabaseRecordKey recordKey, out PropertyDatabaseVolatileRecordValue data)
        {
            data = new PropertyDatabaseVolatileRecordValue();
            using (LockRead())
            {
                var foundRecord = Find(recordKey, out var index);
                if (!foundRecord)
                {
                    return(false);
                }

                var record = m_StoreData[(int)index];
                if (!record.valid)
                {
                    return(false);
                }

                data = record.recordValue;
                return(true);
            }
        }
Пример #2
0
 public PropertyDatabaseVolatileRecord(PropertyDatabaseRecordKey key, object value, bool valid)
 {
     this.recordKey   = key;
     this.recordValue = new PropertyDatabaseVolatileRecordValue(value);
     this.valid       = valid;
 }
Пример #3
0
 public PropertyDatabaseVolatileRecord(PropertyDatabaseRecordKey key, object value)
 {
     this.recordKey   = key;
     this.recordValue = new PropertyDatabaseVolatileRecordValue(value);
     valid            = true;
 }