Method TryReserve
- Namespace
- MailFathom.Application.Emails.AttachmentText
- Assembly
- MailFathom.Application.dll
TryReserve(long)
Takes the octets one attachment would cost, when the pass can still afford them.
public bool TryReserve(long octets)
Parameters
octetslongWhat reading the attachment would read.
Returns
Remarks
Reserved before the read rather than counted after it, so an attachment is never opened on a budget that could not have paid for it. An attachment larger than the whole remaining budget is refused rather than admitted for being the first one asked, which is what keeps the ceiling a ceiling.
Exceptions
- ArgumentOutOfRangeException
Thrown when
octetsis negative.