Table of Contents

Class InMemoryTemporaryFileStorage

Namespace
GroupeIsa.Neos.Shared.IO
Assembly
GroupeIsa.Neos.Shared.dll

Represents an in memory ITemporaryFileStorage implementation.

public class InMemoryTemporaryFileStorage : ITemporaryFileStorage
Inheritance
InMemoryTemporaryFileStorage
Implements
Inherited Members

Constructors

InMemoryTemporaryFileStorage(IInMemoryTemporaryFileCache, IUserInfoAccessor)

Initializes a new instance of the InMemoryTemporaryFileStorage class.

public InMemoryTemporaryFileStorage(IInMemoryTemporaryFileCache cache, IUserInfoAccessor userInfoAccessor)

Parameters

cache IInMemoryTemporaryFileCache

Temporary file cache.

userInfoAccessor IUserInfoAccessor

User info accessor.

InMemoryTemporaryFileStorage(IUserInfoAccessor)

Initializes a new instance of the InMemoryTemporaryFileStorage class.

public InMemoryTemporaryFileStorage(IUserInfoAccessor userInfoAccessor)

Parameters

userInfoAccessor IUserInfoAccessor

User info accessor.

Methods

AddAsync(BinaryFile)

Adds a file to the temporary storage.

public Task<Guid> AddAsync(BinaryFile file)

Parameters

file BinaryFile

The File.

Returns

Task<Guid>

The file identifier of the added file.

DeleteAsync(Guid)

Deletes a file in the temporary storage.

public Task DeleteAsync(Guid guid)

Parameters

guid Guid

The file identifier.

Returns

Task

A Task representing the asynchronous operation.

ExistsAsync(Guid)

Gets a value indicating whether the file exists or not.

public Task<bool> ExistsAsync(Guid guid)

Parameters

guid Guid

The file identifier.

Returns

Task<bool>

True if the file exists, false otherwise.

FindAsync(Guid)

Finds a file in the temporary storage.

public Task<BinaryFile?> FindAsync(Guid guid)

Parameters

guid Guid

The file identifier.

Returns

Task<BinaryFile>

The file or null.

GetAsync(Guid)

Gets a file from the temporary storage.

public Task<BinaryFile> GetAsync(Guid guid)

Parameters

guid Guid

The file identifier.

Returns

Task<BinaryFile>

The file.

GetListAsync(Expression<Func<BinaryFile, bool>>?, Expression<Func<string?, bool>>?, bool)

Gets files from the temporary storage.

public 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 bool

A value indicating whether the content should be loaded or not.

Returns

Task<IList<BinaryFile>>

The files.