LinkedBinaryDataSource
Namespace: Meshmakers.Octo.Runtime.Contracts.Repositories
Basic implementation of the ILinkedBinaryDataSource interface.
public abstract class LinkedBinaryDataSource : ILinkedBinaryDataSource
Inheritance Object → LinkedBinaryDataSource
Implements ILinkedBinaryDataSource
Methods
UploadFileSystemBinaryAsync(IOctoSession, RtEntityId, String, String, Stream, CancellationToken)
public Task<OctoObjectId> UploadFileSystemBinaryAsync(IOctoSession session, RtEntityId rtEntityId, string filename, string contentType, Stream stream, CancellationToken cancellationToken)
Parameters
session
IOctoSession
rtEntityId
RtEntityId
filename
String
contentType
String
stream
Stream
cancellationToken
CancellationToken
Returns
UploadTemporaryBinaryAsync(IOctoSession, String, String, DateTime, Stream, CancellationToken)
public Task<OctoObjectId> UploadTemporaryBinaryAsync(IOctoSession session, string filename, string contentType, DateTime expiryDateTime, Stream stream, CancellationToken cancellationToken)
Parameters
session
IOctoSession
filename
String
contentType
String
expiryDateTime
DateTime
stream
Stream
cancellationToken
CancellationToken
Returns
ReplaceFileSystemBinaryAsync(IOctoSession, OctoObjectId, String, String, Stream, CancellationToken)
public Task ReplaceFileSystemBinaryAsync(IOctoSession session, OctoObjectId largeBinaryId, string filename, string contentType, Stream stream, CancellationToken cancellationToken)
Parameters
session
IOctoSession
largeBinaryId
OctoObjectId
filename
String
contentType
String
stream
Stream
cancellationToken
CancellationToken
Returns
ReplaceTemporaryLargeBinaryAsync(IOctoSession, String, String, Stream, CancellationToken)
public Task<OctoObjectId> ReplaceTemporaryLargeBinaryAsync(IOctoSession session, string filename, string contentType, Stream stream, CancellationToken cancellationToken)
Parameters
session
IOctoSession
filename
String
contentType
String
stream
Stream
cancellationToken
CancellationToken
Returns
DeleteAllFileSystemBinariesAsync(IOctoSession, RtEntityId, CancellationToken)
public abstract Task DeleteAllFileSystemBinariesAsync(IOctoSession session, RtEntityId rtEntityId, CancellationToken cancellationToken)
Parameters
session
IOctoSession
rtEntityId
RtEntityId
cancellationToken
CancellationToken
Returns
DeleteTemporaryLargeBinaryAsync(IOctoSession, OctoObjectId, CancellationToken)
public abstract Task DeleteTemporaryLargeBinaryAsync(IOctoSession session, OctoObjectId largeBinaryId, CancellationToken cancellationToken)
Parameters
session
IOctoSession
largeBinaryId
OctoObjectId
cancellationToken
CancellationToken
Returns
DownloadBinaryAsync(IOctoSession, OctoObjectId, CancellationToken)
public abstract Task<IDownloadStreamHandler> DownloadBinaryAsync(IOctoSession session, OctoObjectId largeBinaryId, CancellationToken cancellationToken)
Parameters
session
IOctoSession
largeBinaryId
OctoObjectId
cancellationToken
CancellationToken
Returns
GetFileSystemBinaryAsync(IOctoSession, OctoObjectId, CancellationToken)
public abstract Task<IBinaryInfo> GetFileSystemBinaryAsync(IOctoSession session, OctoObjectId largeBinaryId, CancellationToken cancellationToken)
Parameters
session
IOctoSession
largeBinaryId
OctoObjectId
cancellationToken
CancellationToken
Returns
GetTemporaryBinaryAsync(IOctoSession, OctoObjectId, CancellationToken)
public Task<IBinaryInfo> GetTemporaryBinaryAsync(IOctoSession session, OctoObjectId binaryId, CancellationToken cancellationToken)
Parameters
session
IOctoSession
binaryId
OctoObjectId
cancellationToken
CancellationToken
Returns
GetTemporaryBinaryAsync(IOctoSession, String, CancellationToken)
public abstract Task<IBinaryInfo> GetTemporaryBinaryAsync(IOctoSession session, string fileName, CancellationToken cancellationToken)
Parameters
session
IOctoSession
fileName
String
cancellationToken
CancellationToken
Returns
UploadLargeBinaryAsync(IOctoSession, String, String, BinaryType, Nullable<RtEntityId>, Nullable<DateTime>, Stream, CancellationToken)
Uploads a large binary file to the repository
protected abstract Task<OctoObjectId> UploadLargeBinaryAsync(IOctoSession session, string filename, string contentType, BinaryType binaryType, Nullable<RtEntityId> rtEntityId, Nullable<DateTime> expiryDateTime, Stream stream, CancellationToken cancellationToken)
Parameters
session
IOctoSession
Session object for transaction handling
filename
String
Filename of the file
contentType
String
Content type of the file
binaryType
BinaryType
Binary type of the file
rtEntityId
Nullable<RtEntityId>
Associated runtime entity id
expiryDateTime
Nullable<DateTime>
>Expiry date time of the file
stream
Stream
Stream of the file
cancellationToken
CancellationToken
Optional cancellation token
Returns
ReplaceLargeBinaryAsync(IOctoSession, String, String, BinaryType, Nullable<OctoObjectId>, Stream, CancellationToken)
Replaces a large binary file in the repository
protected abstract Task<OctoObjectId> ReplaceLargeBinaryAsync(IOctoSession session, string filename, string contentType, BinaryType binaryType, Nullable<OctoObjectId> binaryId, Stream stream, CancellationToken cancellationToken)
Parameters
session
IOctoSession
Session object for transaction handling
filename
String
Filename of the file
contentType
String
Content type of the file
binaryType
BinaryType
Binary type of the file
binaryId
Nullable<OctoObjectId>
Binary id of the file
stream
Stream
Stream of the file
cancellationToken
CancellationToken
Optional cancellation token