internal unsafe ForestRevisionInternal(CBForest.C4Document *doc, bool loadBody) 
            : base((string)doc->docID, doc->selectedRev.revID.AsRevID(), doc->selectedRev.IsDeleted)
        {
            if (!doc->Exists) {
                return;
            }

            Sequence = (long)doc->selectedRev.sequence;
            if (loadBody) {
                // Important not to lazy load here since we can only assume
                // doc lives until immediately after this function ends
                if(doc->selectedRev.body.buf == null) {
                    Missing = true;
                } else {
                    SetBody(new Body(doc->selectedRev.body.ToArray()));
                }
            }
        }
        internal unsafe RevisionInternal(CBForest.C4Document *doc, bool loadBody) 
        {
            if (!doc->Exists) {
                return;
            }

            _docId = (string)doc->docID;
            _revId = (string)doc->selectedRev.revID;
            _deleted = doc->selectedRev.IsDeleted;
            _sequence = (long)doc->selectedRev.sequence;
            if (loadBody) {
                // Important not to lazy load here since we can only assume
                // doc lives until immediately after this function ends
                SetBody(new Body(doc->selectedRev.body.ToArray())); 
            }
        }
        internal unsafe RevisionInternal(CBForest.CBForestDocStatus docStatus, bool loadBody)
            : this(docStatus.Document, loadBody)
        {

        }