BTDB.KVDBLayer.InMemoryFileCollection.GetCount C# (CSharp) Method

GetCount() public method

public GetCount ( ) : uint
return uint
        public uint GetCount()
        {
            return (uint)_files.Count;
        }

Usage Example

Esempio n. 1
0
 public void AddingContinueToNewFileAfterReopenWithCorruption()
 {
     using (var fileCollection = new InMemoryFileCollection())
     {
         using (IKeyValueDB db = new KeyValueDB(fileCollection))
         {
             using (var tr = db.StartTransaction())
             {
                 tr.CreateOrUpdateKeyValue(_key1, _key1);
                 tr.Commit();
             }
         }
         fileCollection.SimulateCorruptionBySetSize(20 + 16);
         using (IKeyValueDB db = new KeyValueDB(fileCollection))
         {
             using (var tr = db.StartTransaction())
             {
                 Assert.Equal(0, tr.GetKeyValueCount());
                 tr.CreateOrUpdateKeyValue(Key2, Key2);
                 tr.Commit();
             }
             Console.WriteLine(db.CalcStats());
         }
         Assert.True(2 <= fileCollection.GetCount());
     }
 }
All Usage Examples Of BTDB.KVDBLayer.InMemoryFileCollection::GetCount