public void On(DocumentDescriptorInitialized e) { var descriptor = _blobStore.GetDescriptor(e.BlobId); if (descriptor != null) { _collection.Upsert(e, e.HandleInfo.FileName.Extension, () => new DocumentStats() { Files = 1, Bytes = descriptor.Length }, s => { s.Files++; s.Bytes += descriptor.Length; }); } }