Initial commit: NexusArchitect Professional Workstation Overhaul

This commit is contained in:
Debian
2026-04-24 20:27:22 +02:00
commit f3e94c4f42
193 changed files with 5809 additions and 0 deletions
@@ -0,0 +1,71 @@
using FluentResults;
using Microsoft.Maui.Storage;
using NexusReader.Application.Abstractions.Services;
namespace NexusReader.Infrastructure.Mobile.Services;
public sealed class MauiStorageService : INativeStorageService
{
public Result SaveString(string key, string value)
{
try
{
Preferences.Default.Set(key, value);
return Result.Ok();
}
catch (Exception ex)
{
return Result.Fail(ex.Message);
}
}
public Result<string?> GetString(string key)
{
try
{
return Result.Ok(Preferences.Default.Get(key, (string?)null));
}
catch (Exception ex)
{
return Result.Fail(ex.Message);
}
}
public Result SaveBool(string key, bool value)
{
try
{
Preferences.Default.Set(key, value);
return Result.Ok();
}
catch (Exception ex)
{
return Result.Fail(ex.Message);
}
}
public Result<bool> GetBool(string key, bool defaultValue = false)
{
try
{
return Result.Ok(Preferences.Default.Get(key, defaultValue));
}
catch (Exception ex)
{
return Result.Fail(ex.Message);
}
}
public Result Remove(string key)
{
try
{
Preferences.Default.Remove(key);
return Result.Ok();
}
catch (Exception ex)
{
return Result.Fail(ex.Message);
}
}
}