Interface ITemporaryFileStorage
Provides the functionalities to store temporary files.
public interface ITemporaryFileStorage
Methods
AddAsync(BinaryFile)
Adds a file to the temporary storage.
Task<Guid> AddAsync(BinaryFile file)
Parameters
file
BinaryFileThe File.
Returns
DeleteAsync(Guid)
Deletes a file in the temporary storage.
Task DeleteAsync(Guid guid)
Parameters
guid
GuidThe file identifier.
Returns
ExistsAsync(Guid)
Gets a value indicating whether the file exists or not.
Task<bool> ExistsAsync(Guid guid)
Parameters
guid
GuidThe file identifier.
Returns
FindAsync(Guid)
Finds a file in the temporary storage.
Task<BinaryFile?> FindAsync(Guid guid)
Parameters
guid
GuidThe file identifier.
Returns
- Task<BinaryFile>
The file or null.
GetAsync(Guid)
Gets a file from the temporary storage.
Task<BinaryFile> GetAsync(Guid guid)
Parameters
guid
GuidThe file identifier.
Returns
- Task<BinaryFile>
The file.
GetListAsync(Expression<Func<BinaryFile, bool>>?, Expression<Func<string?, bool>>?, bool)
Gets files from the temporary storage.
Task<IList<BinaryFile>> GetListAsync(Expression<Func<BinaryFile, bool>>? filePredicate = null, Expression<Func<string?, bool>>? userIdPredicate = null, bool loadContent = false)
Parameters
filePredicate
Expression<Func<BinaryFile, bool>>File predicate.
userIdPredicate
Expression<Func<string, bool>>User id predicate.
loadContent
boolA value indicating whether the content should be loaded or not.
Returns
- Task<IList<BinaryFile>>
The files.