Пример #1
0
        /// <summary>Converts database info document into easy to use object.</summary>
        public DatabaseInfo(bool exists, string name, JsonObject dbInfo = null)
        {
            Name = name;
            Exists = exists;
            if (exists && dbInfo != null)
            {
                DocumentCount = dbInfo.GetPrimitiveProperty<int>("doc_count");
                UpdateSequenceNumber = dbInfo.GetPrimitiveProperty<int>("update_seq");
                PurgeOperationsPerformed = dbInfo.GetPrimitiveProperty<int>("purge_seq");
                DoesCompactionRunning = dbInfo.GetPrimitiveProperty<bool>("compact_running");

                FileSizeInBytes = dbInfo.GetPrimitiveProperty<int>("disk_size");
                FileFormatVersion = dbInfo.GetPrimitiveProperty<int>("disk_format_version");
            }
        }