Replace ReactiveUI
This commit is contained in:
parent
43b4d50e43
commit
5584ab4ec8
41 changed files with 472 additions and 1013 deletions
|
|
@ -4,21 +4,16 @@ using Microsoft.Extensions.DependencyInjection;
|
|||
|
||||
namespace InkForge.Desktop.Models;
|
||||
|
||||
public sealed class Workspace : IDisposable
|
||||
public sealed class Workspace(IServiceScope scope) : IDisposable
|
||||
{
|
||||
private bool _disposedValue;
|
||||
private IServiceScope? _scope;
|
||||
private IServiceScope? _scope = scope;
|
||||
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
public LocalWorkspaceOptions Options { get; set; } = default!;
|
||||
|
||||
public IServiceProvider Services => _scope!.ServiceProvider;
|
||||
|
||||
public Workspace(IServiceScope scope)
|
||||
{
|
||||
_scope = scope;
|
||||
}
|
||||
public IServiceProvider Services { get; } = scope.ServiceProvider;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
|
@ -33,14 +28,4 @@ public sealed class Workspace : IDisposable
|
|||
_disposedValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
// private async Task LoadNotes()
|
||||
// {
|
||||
// await using var dbContext = await _dbContextFactory.CreateDbContextAsync().ConfigureAwait(false);
|
||||
// await foreach (var asdf in dbContext.Notes.AsAsyncEnumerable().ConfigureAwait(false))
|
||||
// {
|
||||
|
||||
// }
|
||||
// _ = (await dbContext.Notes.ToListAsync().ConfigureAwait(false));
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue