mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-01 04:19:07 +01:00
Split Settings into model, serializer, paths and store
698 lines did all of it at once. The mutable CaptureFromUi callback becomes an ISettingsCapture the settings view implements.
This commit is contained in:
18
StarterNG/Infrastructure/Adapters/SystemEnvironment.cs
Normal file
18
StarterNG/Infrastructure/Adapters/SystemEnvironment.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using StarterNG.Application.Abstractions;
|
||||
|
||||
namespace StarterNG.Infrastructure.Adapters;
|
||||
|
||||
/// <summary><see cref="IEnvironment"/> backed by the running process.</summary>
|
||||
public sealed class SystemEnvironment : IEnvironment
|
||||
{
|
||||
public bool IsWindows => OperatingSystem.IsWindows();
|
||||
|
||||
public bool IsLinux => OperatingSystem.IsLinux();
|
||||
|
||||
public bool IsMacOS => OperatingSystem.IsMacOS();
|
||||
|
||||
public string? GetVariable(string name) => Environment.GetEnvironmentVariable(name);
|
||||
|
||||
public string BaseDirectory => AppContext.BaseDirectory;
|
||||
}
|
||||
Reference in New Issue
Block a user