Class DocumentBase
public abstract class DocumentBase : IComparable<DocumentBase>
- Inheritance
-
DocumentBase
- Implements
- Derived
- Inherited Members
Constructors
DocumentBase(DocumentService, Guid, DocumentAccessAssertion)
protected DocumentBase(DocumentService service, Guid id, DocumentAccessAssertion access)
Parameters
serviceDocumentServiceidGuidaccessDocumentAccessAssertion
Fields
Service
public readonly DocumentService Service
Field Value
Properties
Access
public DocumentAccessAssertion Access { get; }
Property Value
ID
public Guid ID { get; }
Property Value
Methods
CompareTo(DocumentBase?)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(DocumentBase? other)
Parameters
otherDocumentBaseAn object to compare with this instance.
Returns
- int
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes otherin the sort order.Zero This instance occurs in the same position in the sort order as other.Greater than zero This instance follows otherin the sort order.
DownloadAsync(CancellationToken)
public Task<Stream> DownloadAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationToken
Returns
DownloadAsync(IPrincipal?, CancellationToken?)
Downloads the data
public Task<Stream> DownloadAsync(IPrincipal? principal = null, CancellationToken? cancellationToken = null)
Parameters
principalIPrincipalcancellationTokenCancellationToken?
Returns
Remarks
Streams the data to the caller, unbuffered.
DownloadBufferAsync(CancellationToken)
public Task<byte[]> DownloadBufferAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationToken
Returns
DownloadBufferAsync(IPrincipal?, CancellationToken?)
Downloads the data
public Task<byte[]> DownloadBufferAsync(IPrincipal? principal = null, CancellationToken? cancellationToken = null)
Parameters
principalIPrincipalcancellationTokenCancellationToken?
Returns
Remarks
Returns a buffer which is the caller's responsibility; each call to this method will redownload the data
DownloadFileAsync(string, CancellationToken)
Downloads and saves the data to a file
public Task DownloadFileAsync(string localFilename, CancellationToken cancellationToken)
Parameters
localFilenamestringcancellationTokenCancellationToken
Returns
Remarks
This operation may take a long time!
DownloadFileAsync(string, IPrincipal?, CancellationToken?)
Downloads and saves the data to a file.
public Task DownloadFileAsync(string localFilename, IPrincipal? principal = null, CancellationToken? cancellationToken = null)
Parameters
localFilenamestringprincipalIPrincipalcancellationTokenCancellationToken?
Returns
Remarks
Streams the data to the file, unbuffered.