IResourceRepository

Namespace: Babel.Data Assembly: Babel.Data.dll

Interface for resource repository.

public interface IResourceRepository : IGenericRepository<Resource>

Implements

IGenericRepository<Resource>

Methods

AddDownloadAsync(Download)

Adds a download asynchronous.

Task<EntityEntry<Download>> AddDownloadAsync(Download download)

Parameters

NameDescription

download Download

The download.

Returns

NameDescription

An asynchronous result that yields the add download.

Delete(IEnumerable<int>)

Deletes the given list of resources from the repository. Begins tracking the given list of resources in the Detached state such that it will be deleted in the database when SaveChanges() is called.

void Delete(IEnumerable<int> resourceIds)

Parameters

NameDescription

resourceIds IEnumerable<int>

The Resource key identifiers to delete.

DeleteDownloads(IEnumerable<int>)

Deletes the downloads described by downloadIds.

void DeleteDownloads(IEnumerable<int> downloadIds)

Parameters

NameDescription

downloadIds IEnumerable<int>

List of identifiers for the downloads.

GetDownloadAsync(int)

Gets download asynchronous.

Task<Download> GetDownloadAsync(int downloadId)

Parameters

NameDescription

downloadId int

Identifier for the download.

Returns

NameDescription

An asynchronous result that yields the download.

GetDownloadByAliasAsync(string)

Gets download by alias asynchronous.

Task<Download> GetDownloadByAliasAsync(string alias)

Parameters

NameDescription

alias string

The alias.

Returns

NameDescription

An asynchronous result that yields the download by alias.

GetDownloadsAsync()

Gets downloads asynchronous.

Task<List<Download>> GetDownloadsAsync()

Returns

NameDescription

An asynchronous result that yields the downloads.

GetResourceType(Resource)

Gets resource type.

string GetResourceType(Resource resource)

Parameters

NameDescription

resource Resource

The resource.

Returns

NameDescription

The resource type.

GetSignatureKeysAsync(CancellationToken)

Gets signature keys asynchronous.

Task<List<Resource>> GetSignatureKeysAsync(CancellationToken cancellationToken = default)

Parameters

NameDescription

cancellationToken CancellationToken

(Optional) A token that allows processing to be cancelled.

Returns

NameDescription

An asynchronous result that yields the signature keys.

TrackResourceAsync(Resource)

Track resource asynchronous.

Task TrackResourceAsync(Resource resource)

Parameters

NameDescription

resource Resource

The resource.

Returns

NameDescription

An asynchronous result.

UpdateDownload(Download)

Updates the download described by download.

void UpdateDownload(Download download)

Parameters

NameDescription

download Download

The download.

Last updated