/// <summary> /// Get the attachment information for the attachments with the same idprefix /// </summary> public IEnumerable <Attachment> GetAttachmentHeadersStartingWith(string idPrefix, int start, int pageSize) { pageSize = Math.Min(pageSize, database.Configuration.MaxPageSize); CurrentOperationContext.Headers.Value = OperationsHeaders; return(database.GetStaticsStartingWith(idPrefix, start, pageSize) .Select(x => new Attachment { Etag = x.Etag, Metadata = x.Metadata, Size = x.Size, Key = x.Key, Data = () => { throw new InvalidOperationException("Cannot get attachment data from an attachment header"); } })); }