mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
refactor was really not needed
This commit is contained in:
23
Management/Services/Actors/LocalStorageActorWrapper.cs
Normal file
23
Management/Services/Actors/LocalStorageActorWrapper.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Akka.Actor;
|
||||
|
||||
using LocalModels;
|
||||
|
||||
public class LocalStorageActorWrapper(IActorRef storageActor) : IFileStorageManager
|
||||
{
|
||||
private readonly IActorRef storageActor = storageActor;
|
||||
|
||||
public async Task<IEnumerable<string>> GetEmptyDirectories()
|
||||
{
|
||||
return await storageActor.Ask<IEnumerable<string>>(new EmptyDirectoryAsk());
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<LocalCourse>> LoadSavedCourses()
|
||||
{
|
||||
return await storageActor.Ask<IEnumerable<LocalCourse>>(new SavedCoursesAsk());
|
||||
}
|
||||
|
||||
public async Task SaveCourseAsync(LocalCourse course, LocalCourse? previouslyStoredCourse)
|
||||
{
|
||||
await storageActor.Ask<SaveCoursesResponseSuccess>(new SaveCoursesRequest(course, previouslyStoredCourse));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user