public GetDocuments ( int start, int pageSize, System.Guid etag ) : RavenJArray | ||
start | int | |
pageSize | int | |
etag | System.Guid | |
return | RavenJArray |
private static bool EncryptedDocumentsExist(DocumentDatabase database) { const int pageSize = 10; int index = 0; while (true) { var array = database.GetDocuments(index, index + pageSize, null); if (array.Length == 0) { // We've gone over all the documents in the database, and none of them are encrypted. return false; } if (array.All(x => EncryptionSettings.DontEncrypt(x.Value<RavenJObject>("@metadata").Value<string>("@id")))) { index += array.Length; continue; } // Found a document which is encrypted return true; } }