5 Commits

Author SHA1 Message Date
f6a15e9c45 - add: multiauth 2025-07-15 18:38:53 +03:00
c148f6ed34 - add: nice error view 2025-07-14 10:06:38 +03:00
a475148543 - tweak: a little bit of repair and tweaks 2025-07-13 10:07:36 +03:00
34fd4ebf4c - tweak: Migrate v3 profiles 2025-07-10 15:22:15 +03:00
83d116003b - add: lang think 2025-07-09 23:15:02 +03:00
37 changed files with 612 additions and 245 deletions

View File

@@ -45,6 +45,7 @@
<entry key="Nebula.Launcher/Views/ServerListView.axaml" value="Nebula.Launcher/Nebula.Launcher.csproj" />
<entry key="Nebula.Launcher/Views/Tabs/AccountInfoTab.axaml" value="Nebula.Launcher/Nebula.Launcher.csproj" />
<entry key="Nebula.Launcher/Views/Tabs/ServerListTab.axaml" value="Nebula.Launcher/Nebula.Launcher.csproj" />
<entry key="Nebula.Launcher/Views/VisualErrorView.axaml" value="Nebula.Launcher/Nebula.Launcher.csproj" />
<entry key="Nebula.UpdateResolver/App.axaml" value="Nebula.UpdateResolver/Nebula.UpdateResolver.csproj" />
<entry key="Nebula.UpdateResolver/MainWindow.axaml" value="Nebula.UpdateResolver/Nebula.UpdateResolver.csproj" />
</map>

View File

@@ -28,14 +28,16 @@ public class App : Application
{
case IClassicDesktopStyleApplicationLifetime desktop:
DisableAvaloniaDataAnnotationValidation();
desktop.MainWindow = new MessageWindow(out provider);
desktop.MainWindow = (Window)(provider = new MessageWindow());
break;
case ISingleViewApplicationLifetime singleViewPlatform:
singleViewPlatform.MainView = new MessageView(out provider);
singleViewPlatform.MainView = (Control)(provider = new MessageView());
break;
}
provider?.ShowMessage("Launcher is already running.","hey shithead!");
provider?.ShowMessage(
"Error: An instance of the application is already running. Please close the existing instance before launching a new one.",
"Duplicate instance detected.");
return;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

View File

@@ -24,8 +24,9 @@ account-auth-server = Authentication Server
account-auth-button = Authenticate
account-auth-save = Save Profile
account-auth-hello = Hello,
account-auth-current-server = Current server auth:
account-auth-logout = Log out
auth-current-login-name = Current login: {$login}
auth-current-login-name = Current login {$auth_server}: {$login}
auth-current-login-no-name = Profile not selected
auth-processing = Processing authentication request...
@@ -37,6 +38,7 @@ auth-name-resolution-error = Failed to resolve server address. Check your networ
auth-secure-error = Failed to cinnect to the server using SSL
auth-config-read = Reading authentication configuration...
auth-try-auth-config = Attempting to authenticate using saved configuration.
auth-try-auth-profile = Attempting to authenticate using profile
config-export-logs = Export logs
config-open-data = Open data path
@@ -66,3 +68,5 @@ popup-login-credentials-warning-label = Warning! No credentials provided! The se
popup-login-credentials-warning-go-auth = Go to auth page
popup-login-credentials-warning-cancel = Cancel
popup-login-credentials-warning-proceed = Proceed
goto-path-home = Root folder

View File

@@ -24,8 +24,9 @@ account-auth-server = Сервер аутентификации
account-auth-button = Аутентифицировать
account-auth-save = Сохранить профиль
account-auth-hello = Привет,
account-auth-current-server = Текущий сервер авторизации:
account-auth-logout = Выйти
auth-current-login-name = Текущий профиль: {$login}
auth-current-login-name = Текущий профиль {$auth_server}: {$login}
auth-current-login-no-name = Профиль не выбран
auth-processing = Обработка запроса аутентификации...
@@ -37,6 +38,7 @@ auth-name-resolution-error = Не удалось разрешить адрес
auth-secure-error = Не удалось подключиться к серверу по SSL. Проверьте сетевые настройки.
auth-config-read = Чтение конфигурации аутентификации...
auth-try-auth-config = Попытка аутентификации с использованием сохраненной конфигурации.
auth-try-auth-profile = Попытка аутентификации с использованием профиля
config-export-logs = Экспортировать логи
config-open-data = Открыть путь данных
@@ -65,4 +67,6 @@ popup-login-credentials-warning = Предупреждение! Учетные
popup-login-credentials-warning-label = Предупреждение! Учетные данные не указаны! Серверы не смогут пропустить вас из-за отсутствия авторизации. Пожалуйста, имейте это в виду.
popup-login-credentials-warning-go-auth = Перейти на страницу авторизации
popup-login-credentials-warning-cancel = Отмена
popup-login-credentials-warning-proceed = Продолжить
popup-login-credentials-warning-proceed = Продолжить
goto-path-home = Корн. папка

View File

@@ -1,11 +1,11 @@
using Avalonia;
using Avalonia.Controls;
using System;
using Avalonia.Data.Converters;
using Avalonia.Media;
using Avalonia.Platform;
namespace Nebula.Launcher.Converters;
public class TypeConverters
public static class TypeConverters
{
public static FuncValueConverter<string, string?> IconConverter { get; } =
new(iconKey =>
@@ -13,4 +13,11 @@ public class TypeConverters
if (iconKey == null) return null;
return $"/Assets/svg/{iconKey}.svg";
});
public static FuncValueConverter<string, IImage?> ImageConverter { get; } =
new(iconKey =>
{
if (iconKey == null) return null;
return new Avalonia.Media.Imaging.Bitmap(AssetLoader.Open(new Uri($"avares://Nebula.Launcher/Assets/error_presentation/{iconKey}.png")));
});
}

View File

@@ -2,7 +2,7 @@ using System.Collections.Generic;
using System.Globalization;
using Nebula.Launcher.Models;
using Nebula.Launcher.Models.Auth;
using Nebula.Launcher.ViewModels.Pages;
using Nebula.Shared.ConfigMigrations;
using Nebula.Shared.Services;
namespace Nebula.Launcher;
@@ -11,11 +11,16 @@ public static class LauncherConVar
{
public static readonly ConVar<bool> DoMigration =
ConVarBuilder.Build("migration.doMigrate", true);
public static readonly ConVar<ProfileAuthCredentials[]> AuthProfiles =
ConVarBuilder.Build<ProfileAuthCredentials[]>("auth.profiles.v2", []);
public static readonly ConVar<AuthTokenCredentials[]> AuthProfiles =
ConVarBuilder.BuildWithMigration<AuthTokenCredentials[]>("auth.profiles.v3",
MigrationQueueBuilder.Instance
.With(new ProfileMigrationV2("auth.profiles.v2","auth.profiles.v3"))
.Build(),
[]);
public static readonly ConVar<CurrentAuthInfo?> AuthCurrent =
ConVarBuilder.Build<CurrentAuthInfo?>("auth.current.v2");
public static readonly ConVar<AuthTokenCredentials?> AuthCurrent =
ConVarBuilder.Build<AuthTokenCredentials?>("auth.current.v2");
public static readonly ConVar<string[]> Favorites =
ConVarBuilder.Build<string[]>("server.favorites", []);
@@ -29,7 +34,13 @@ public static class LauncherConVar
"WizDen",
[
"https://harpy.durenko.tatar/auth-api/",
"https://auth.spacestation14.com/",
"https://auth.fallback.spacestation14.com/",
]),
new AuthServerCredentials(
"SimpleStation",
[
"https://auth.simplestation.org/",
])
]);

View File

@@ -2,16 +2,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:views="clr-namespace:Nebula.Launcher.Views"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
Width="600"
Height="400"
x:Class="Nebula.Launcher.MessageBox.MessageView">
<Grid RowDefinitions="50,*" ColumnDefinitions="*">
<Border Grid.Column="0" Background="#222222" Padding="10" BorderBrush="#444444" BorderThickness="0,0,0,3">
<Label VerticalAlignment="Center" x:Name="Title">Text</Label>
</Border>
<Panel Margin="5" Grid.Row="1">
<Label x:Name="Message">Message</Label>
</Panel>
</Grid>
<views:VisualErrorView x:Name="ErrorView"/>
</UserControl>

View File

@@ -1,21 +1,22 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Nebula.Launcher.ViewModels;
namespace Nebula.Launcher.MessageBox;
public partial class MessageView : UserControl, IMessageContainerProvider
{
public MessageView(out IMessageContainerProvider provider)
private readonly VisualErrorViewModel _context;
public MessageView()
{
InitializeComponent();
provider = this;
_context = new VisualErrorViewModel();
ErrorView.Content = _context;
}
public void ShowMessage(string message, string title)
{
Title.Content = title;
Message.Content = message;
_context.Title = title;
_context.Description = message;
}
}

View File

@@ -3,10 +3,52 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:messageBox="clr-namespace:Nebula.Launcher.MessageBox"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
SystemDecorations="BorderOnly"
mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="260"
Width="600"
Height="400"
Height="260"
CanResize="False"
x:Class="Nebula.Launcher.MessageBox.MessageWindow"
Title="MessageWindow">
<Grid ColumnDefinitions="*" RowDefinitions="30,*">
<messageBox:MessageView
Grid.Column="0"
Grid.Row="0"
Grid.RowSpan="2"
x:Name="MessageView" />
<Border
BorderThickness="0,0,0,2"
CornerRadius="0"
Grid.Column="0"
Grid.Row="0">
<Border.BorderBrush>
<LinearGradientBrush EndPoint="100%,50%" StartPoint="0%,50%">
<GradientStop Color="#222222" Offset="0.0" />
<GradientStop Color="#442222" Offset="1.0" />
</LinearGradientBrush>
</Border.BorderBrush>
<Panel
Height="30"
PointerPressed="InputElement_OnPointerPressed">
<TextBlock
FontSize="10"
Foreground="White"
IsVisible="False"
Margin="15,0"
Text="Nebula Launcher"
VerticalAlignment="Center" />
<StackPanel
HorizontalAlignment="Right"
Margin="5,0,5,0"
Orientation="Horizontal"
Spacing="8">
<Button
Click="Close_Click"
Content="🗙"
Foreground="Azure" />
</StackPanel>
</Panel>
</Border>
</Grid>
</Window>

View File

@@ -1,12 +1,28 @@
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
namespace Nebula.Launcher.MessageBox;
public partial class MessageWindow : Window
public partial class MessageWindow : Window, IMessageContainerProvider
{
public MessageWindow(out IMessageContainerProvider provider)
public MessageWindow()
{
InitializeComponent();
Content = new MessageView(out provider);
}
public void ShowMessage(string message, string title)
{
MessageView.ShowMessage(message, title);
}
private void Close_Click(object? sender, RoutedEventArgs e)
{
Close();
}
private void InputElement_OnPointerPressed(object? sender, PointerPressedEventArgs e)
{
BeginMoveDrag(e);
}
}

View File

@@ -1,11 +1,13 @@
using System.Text.Json.Serialization;
using System.Windows.Input;
using Avalonia.Media;
using Nebula.Shared.Services;
namespace Nebula.Launcher.Models.Auth;
public sealed record ProfileAuthCredentials(
string Login,
string Password,
string AuthServer,
AuthTokenCredentials Credentials,
string AuthName,
Color Color,
[property: JsonIgnore] ICommand OnSelect = default!,
[property: JsonIgnore] ICommand OnDelete = default!);

View File

@@ -3,6 +3,7 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
using Nebula.Launcher.ViewModels.Pages;
using Nebula.Shared;
using Nebula.Shared.Models;
using Nebula.Shared.Services;
@@ -10,7 +11,7 @@ using Nebula.Shared.Services;
namespace Nebula.Launcher.ProcessHelper;
[ServiceRegister(isSingleton:false)]
public sealed class GameProcessStartInfoProvider(DotnetResolverService resolverService, AuthService authService) :
public sealed class GameProcessStartInfoProvider(DotnetResolverService resolverService, AccountInfoViewModel accountInfoViewModel) :
DotnetProcessStartInfoProviderBase(resolverService)
{
private string? _publicKey;
@@ -34,7 +35,7 @@ public sealed class GameProcessStartInfoProvider(DotnetResolverService resolverS
{
var baseStart = await base.GetProcessStartInfo();
var authProv = authService.SelectedAuth;
var authProv = accountInfoViewModel.Credentials;
if(authProv is null)
throw new Exception("Client is without selected auth");

View File

@@ -9,7 +9,7 @@ using Nebula.Shared.Services;
namespace Nebula.Launcher.ProcessHelper;
[ServiceRegister]
public sealed class GameRunnerPreparer(IServiceProvider provider, ContentService contentService, EngineService engineService, DebugService debugService)
public sealed class GameRunnerPreparer(IServiceProvider provider, ContentService contentService, EngineService engineService)
{
public async Task<ProcessRunHandler<GameProcessStartInfoProvider>> GetGameProcessStartInfoProvider(RobustUrl address, ILoadingHandler loadingHandler, CancellationToken cancellationToken = default)
{

View File

@@ -14,7 +14,8 @@ namespace Nebula.Launcher.Services;
public partial class LocalisationService
{
[GenerateProperty] private ConfigurationService ConfigurationService { get; }
[GenerateProperty] private DebugService DebugService { get; }
private CultureInfo _currentCultureInfo = CultureInfo.CurrentCulture;
private static MessageContext? _currentMessageContext;
@@ -42,6 +43,7 @@ public partial class LocalisationService
_currentMessageContext = mc;
} catch (Exception e) {
DebugService.GetLogger("localisationService").Error(e);
LoadLanguage(CultureInfo.GetCultureInfo("en-US"));
}
}

View File

@@ -41,17 +41,17 @@ public partial class MainViewModel : ViewModelBase
[ObservableProperty] private bool _popup;
[ObservableProperty] private ListItemTemplate? _selectedListItem;
public bool IsLoggedIn => AuthService.SelectedAuth is not null;
public string LoginName => AuthService.SelectedAuth?.Login ?? string.Empty;
public bool IsLoggedIn => AccountInfoViewModel.Credentials is not null;
public string LoginText => Services.LocalisationService.GetString("auth-current-login-name",
public string LoginText => LocalisationService.GetString("auth-current-login-name",
new Dictionary<string, object>
{
{ "login", LoginName }
{ "login", AccountInfoViewModel.Credentials?.Login ?? "" },
{ "auth_server", AccountInfoViewModel.CurrentAuthServerName}
});
[GenerateProperty] private LocalisationService LocalisationService { get; }
[GenerateProperty] private AuthService AuthService { get; }
[GenerateProperty] private LocalisationService LocalisationService { get; } // Не убирать! Без этой хуйни вся локализация идет в пизду!
[GenerateProperty] private AccountInfoViewModel AccountInfoViewModel { get; }
[GenerateProperty] private DebugService DebugService { get; } = default!;
[GenerateProperty] private PopupMessageService PopupMessageService { get; } = default!;
[GenerateProperty] private ContentService ContentService { get; } = default!;
@@ -66,7 +66,7 @@ public partial class MainViewModel : ViewModelBase
{
Items = new ObservableCollection<ListItemTemplate>(_templates.Select(a=>
{
return new ListItemTemplate(a.ModelType, a.IconKey, LocalisationService.GetString(a.Label));
return a with { Label = LocalisationService.GetString(a.Label) };
}
));
RequirePage<AccountInfoViewModel>();
@@ -74,6 +74,15 @@ public partial class MainViewModel : ViewModelBase
protected override void Initialise()
{
AccountInfoViewModel.PropertyChanged += (sender, args) =>
{
if (args.PropertyName != nameof(AccountInfoViewModel.Credentials))
return;
OnPropertyChanged(nameof(LoginText));
OnPropertyChanged(nameof(IsLoggedIn));
};
_logger = DebugService.GetLogger(this);
using var stream = typeof(MainViewModel).Assembly
@@ -89,6 +98,11 @@ public partial class MainViewModel : ViewModelBase
CheckMigration();
var loadingHandler = ViewHelperService.GetViewModel<LoadingContextViewModel>();
loadingHandler.LoadingName = LocalisationService.GetString("migration-config-task");
loadingHandler.IsCancellable = false;
ConfigurationService.MigrateConfigs(loadingHandler);
if (!VCRuntimeDllChecker.AreVCRuntimeDllsPresent())
{
OnPopupRequired(LocalisationService.GetString("vcruntime-check-error"));
@@ -146,12 +160,6 @@ public partial class MainViewModel : ViewModelBase
CurrentPage = obj;
}
public void InvokeChangeAuth()
{
OnPropertyChanged(nameof(IsLoggedIn));
OnPropertyChanged(nameof(LoginText));
}
public void PopupMessage(PopupViewModelBase viewModelBase)
{
if (CurrentPopup == null)
@@ -184,6 +192,11 @@ public partial class MainViewModel : ViewModelBase
RequirePage<AccountInfoViewModel>();
}
public void OpenRootPath()
{
ExplorerHelper.OpenFolder(FileService.RootPath);
}
public void OpenLink()
{
Helper.OpenBrowser("https://durenko.tatar/nebula");

View File

@@ -3,13 +3,17 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using Avalonia.Media;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Nebula.Launcher.Models.Auth;
using Nebula.Launcher.Services;
using Nebula.Launcher.ViewModels.Popup;
using Nebula.Launcher.Views.Pages;
using Nebula.Shared.Models.Auth;
using Nebula.Shared.Services;
using Nebula.Shared.Services.Logging;
using Nebula.Shared.Utils;
@@ -22,22 +26,17 @@ namespace Nebula.Launcher.ViewModels.Pages;
public partial class AccountInfoViewModel : ViewModelBase
{
[ObservableProperty] private bool _authMenuExpand;
[ObservableProperty] private bool _authUrlConfigExpand;
[ObservableProperty] private int _authViewSpan = 1;
[ObservableProperty] private string _currentAuthServer = string.Empty;
[ObservableProperty] private string _currentLogin = string.Empty;
[ObservableProperty] private string _currentPassword = string.Empty;
[ObservableProperty] private bool _isLogged;
[ObservableProperty] private bool _doRetryAuth;
[ObservableProperty] private AuthTokenCredentials? _credentials;
[ObservableProperty] private AuthServerCredentials _authItemSelect;
private bool _isProfilesEmpty;
[GenerateProperty] private LocalisationService LocalisationService { get; }
[GenerateProperty] private PopupMessageService PopupMessageService { get; } = default!;
[GenerateProperty] private ConfigurationService ConfigurationService { get; } = default!;
[GenerateProperty] private DebugService DebugService { get; }
@@ -46,18 +45,22 @@ public partial class AccountInfoViewModel : ViewModelBase
public ObservableCollection<ProfileAuthCredentials> Accounts { get; } = new();
public ObservableCollection<AuthServerCredentials> AuthUrls { get; } = new();
[ObservableProperty] private AuthServerCredentials _authItemSelect;
public string CurrentAuthServerName => GetServerAuthName(Credentials);
private ILogger _logger;
partial void OnCredentialsChanged(AuthTokenCredentials? value)
{
OnPropertyChanged(nameof(CurrentAuthServerName));
}
//Design think
protected override void InitialiseInDesignMode()
{
AddAccount(new AuthLoginPassword("Binka", "12341", ""));
AddAccount(new AuthLoginPassword("Binka", "12341", ""));
AuthUrls.Add(new AuthServerCredentials("Test",["example.com"]));
AddAccount(new AuthTokenCredentials(Guid.Empty, LoginToken.Empty, "Binka", "example.com"));
AddAccount(new AuthTokenCredentials(Guid.Empty, LoginToken.Empty, "Binka", ""));
}
//Real think
@@ -67,13 +70,31 @@ public partial class AccountInfoViewModel : ViewModelBase
Task.Run(ReadAuthConfig);
}
public void AuthByProfile(ProfileAuthCredentials credentials)
public async void AuthByProfile(ProfileAuthCredentials credentials)
{
CurrentLogin = credentials.Login;
CurrentPassword = credentials.Password;
CurrentAuthServer = credentials.AuthServer;
var message = ViewHelperService.GetViewModel<InfoPopupViewModel>();
message.InfoText = LocalisationService.GetString("auth-try-auth-profile");
message.IsInfoClosable = false;
PopupMessageService.Popup(message);
DoAuth();
try
{
await CatchAuthError(async () => await TryAuth(credentials.Credentials), () => message.Dispose());
}
catch (Exception ex)
{
CurrentLogin = credentials.Credentials.Login;
CurrentAuthServer = credentials.Credentials.AuthServer;
var unexpectedError = new Exception(LocalisationService.GetString("auth-error"), ex);
_logger.Error(unexpectedError);
PopupMessageService.Popup(unexpectedError);
return;
}
ConfigurationService.SetConfigValue(LauncherConVar.AuthCurrent, Credentials);
message.Dispose();
}
public void DoAuth(string? code = null)
@@ -117,22 +138,28 @@ public partial class AccountInfoViewModel : ViewModelBase
});
}
private async Task TryAuth(CurrentAuthInfo currentAuthInfo)
private async Task TryAuth(AuthTokenCredentials authTokenCredentials)
{
CurrentLogin = currentAuthInfo.Login;
CurrentAuthServer = currentAuthInfo.AuthServer;
await AuthService.SetAuth(currentAuthInfo);
CurrentLogin = authTokenCredentials.Login;
CurrentAuthServer = authTokenCredentials.AuthServer;
await SetAuth(authTokenCredentials);
IsLogged = true;
}
private async Task SetAuth(AuthTokenCredentials authTokenCredentials)
{
await AuthService.EnsureToken(authTokenCredentials);
Credentials = authTokenCredentials;
}
private async Task TryAuth(string login, string password, string authServer, string? code)
{
await AuthService.Auth(new AuthLoginPassword(login, password, authServer), code);
Credentials = await AuthService.Auth(login, password, authServer, code);
CurrentLogin = login;
CurrentPassword = password;
CurrentAuthServer = authServer;
IsLogged = true;
ConfigurationService.SetConfigValue(LauncherConVar.AuthCurrent, AuthService.SelectedAuth);
ConfigurationService.SetConfigValue(LauncherConVar.AuthCurrent, Credentials);
}
private async Task CatchAuthError(Func<Task> a, Action? onError)
@@ -142,7 +169,6 @@ public partial class AccountInfoViewModel : ViewModelBase
try
{
await a();
ViewHelperService.GetViewModel<MainViewModel>().InvokeChangeAuth();
}
catch (AuthException e)
{
@@ -200,8 +226,14 @@ public partial class AccountInfoViewModel : ViewModelBase
public void Logout()
{
IsLogged = false;
AuthService.ClearAuth();
ViewHelperService.GetViewModel<MainViewModel>().InvokeChangeAuth();
Credentials = null;
CurrentAuthServer = "";
}
public string GetServerAuthName(AuthTokenCredentials? credentials)
{
if (credentials is null) return "";
return AuthUrls.FirstOrDefault(p => p.Servers.Contains(credentials.AuthServer))?.Name ?? "CustomAuth";
}
private void UpdateAuthMenu()
@@ -212,15 +244,17 @@ public partial class AccountInfoViewModel : ViewModelBase
AuthViewSpan = 1;
}
private void AddAccount(AuthLoginPassword authLoginPassword)
private void AddAccount(AuthTokenCredentials credentials)
{
var onDelete = new DelegateCommand<ProfileAuthCredentials>(OnDeleteProfile);
var onSelect = new DelegateCommand<ProfileAuthCredentials>(AuthByProfile);
var serverName = GetServerAuthName(credentials);
var alpm = new ProfileAuthCredentials(
authLoginPassword.Login,
authLoginPassword.Password,
authLoginPassword.AuthServer,
credentials,
serverName,
ColorUtils.GetColorFromString(credentials.AuthServer),
onSelect,
onDelete);
@@ -236,16 +270,18 @@ public partial class AccountInfoViewModel : ViewModelBase
message.InfoText = LocalisationService.GetString("auth-config-read");
message.IsInfoClosable = false;
PopupMessageService.Popup(message);
foreach (var profile in
ConfigurationService.GetConfigValue(LauncherConVar.AuthProfiles)!)
AddAccount(new AuthLoginPassword(profile.Login, profile.Password, profile.AuthServer));
if (Accounts.Count == 0) UpdateAuthMenu();
AuthUrls.Clear();
var authUrls = ConfigurationService.GetConfigValue(LauncherConVar.AuthServers)!;
foreach (var url in authUrls) AuthUrls.Add(url);
if(authUrls.Length > 0) AuthItemSelect = authUrls[0];
foreach (var profile in
ConfigurationService.GetConfigValue(LauncherConVar.AuthProfiles)!)
AddAccount(profile);
if (Accounts.Count == 0) UpdateAuthMenu();
message.Dispose();
DoCurrentAuth();
@@ -281,7 +317,9 @@ public partial class AccountInfoViewModel : ViewModelBase
[RelayCommand]
private void OnSaveProfile()
{
AddAccount(new AuthLoginPassword(CurrentLogin, CurrentPassword, CurrentAuthServer));
if(Credentials is null) return;
AddAccount(Credentials);
_isProfilesEmpty = Accounts.Count == 0;
UpdateAuthMenu();
DirtyProfile();
@@ -322,6 +360,20 @@ public partial class AccountInfoViewModel : ViewModelBase
private void DirtyProfile()
{
ConfigurationService.SetConfigValue(LauncherConVar.AuthProfiles,
Accounts.ToArray());
Accounts.Select(a => a.Credentials).ToArray());
}
}
public static class ColorUtils
{
public static Color GetColorFromString(string input)
{
var hash = MD5.HashData(Encoding.UTF8.GetBytes(input));
var r = byte.Clamp(hash[0], 10, 200);
var g = byte.Clamp(hash[1], 10, 100);
var b = byte.Clamp(hash[2], 10, 100);
return Color.FromArgb(Byte.MaxValue, r, g, b);
}
}

View File

@@ -7,7 +7,6 @@ using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Avalonia;
using Avalonia.Controls;
@@ -195,7 +194,7 @@ public sealed class ComplexUnitConfigControl : Border, IConfigControl
var propValue = propInfo.GetValue(value);
var control = ConfigControlHelper.GetConfigControl(propInfo.Name, propValue);
var control = ConfigControlHelper.GetConfigControl(propInfo.Name, propValue!);
((Control)control).Margin = new Thickness(5);
_panel.Children.Add((Control)control);
@@ -211,7 +210,7 @@ public sealed class ComplexUnitConfigControl : Border, IConfigControl
fieldInfo.SetValue(obj, configControl.GetValue());
}
return obj;
return obj!;
}
}

View File

@@ -15,8 +15,8 @@ public sealed partial class LoadingContextViewModel : PopupViewModelBase, ILoadi
[GenerateProperty] public CancellationService CancellationService { get; }
[ObservableProperty] private int _currJobs;
[ObservableProperty] private int _resolvedJobs;
[ObservableProperty] private string _message = string.Empty;
public string LoadingName { get; set; } = LocalisationService.GetString("popup-loading");
public bool IsCancellable { get; set; } = true;
@@ -44,6 +44,11 @@ public sealed partial class LoadingContextViewModel : PopupViewModelBase, ILoadi
return ResolvedJobs;
}
public void SetLoadingMessage(string message)
{
Message = message + "\n" + Message;
}
public void Cancel(){
if(!IsCancellable) return;
CancellationService.Cancel();
@@ -56,5 +61,30 @@ public sealed partial class LoadingContextViewModel : PopupViewModelBase, ILoadi
protected override void InitialiseInDesignMode()
{
SetJobsCount(5);
SetResolvedJobsCount(2);
string[] debugMessages = {
"Debug: Starting phase 1...",
"Debug: Loading assets...",
"Debug: Connecting to server...",
"Debug: Fetching user data...",
"Debug: Applying configurations...",
"Debug: Starting phase 2...",
"Debug: Rendering UI...",
"Debug: Preparing scene...",
"Debug: Initializing components...",
"Debug: Running diagnostics...",
"Debug: Checking dependencies...",
"Debug: Verifying files...",
"Debug: Cleaning up cache...",
"Debug: Finalizing setup...",
"Debug: Setup complete.",
"Debug: Ready for launch."
};
foreach (string message in debugMessages)
{
SetLoadingMessage(message);
}
}
}

View File

@@ -47,7 +47,7 @@ public partial class ServerEntryModelView : ViewModelBase, IFilterConsumer, ILis
public LogPopupModelView CurrLog;
public RobustUrl Address { get; private set; }
[GenerateProperty] private AuthService AuthService { get; }
[GenerateProperty] private AccountInfoViewModel AccountInfoViewModel { get; }
[GenerateProperty] private CancellationService CancellationService { get; } = default!;
[GenerateProperty] private DebugService DebugService { get; } = default!;
[GenerateProperty] private PopupMessageService PopupMessageService { get; } = default!;
@@ -174,7 +174,7 @@ public partial class ServerEntryModelView : ViewModelBase, IFilterConsumer, ILis
private async Task RunInstanceAsync(bool ignoreLoginCredentials = false)
{
if (!ignoreLoginCredentials && AuthService.SelectedAuth is null)
if (!ignoreLoginCredentials && AccountInfoViewModel.Credentials is null)
{
var warningContext = ViewHelperService.GetViewModel<IsLoginCredentialsNullPopupViewModel>()
.WithServerEntry(this);

View File

@@ -0,0 +1,22 @@
using CommunityToolkit.Mvvm.ComponentModel;
using Nebula.Launcher.Views;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels;
[ViewModelRegister(typeof(VisualErrorView))]
public partial class VisualErrorViewModel : ViewModelBase
{
[ObservableProperty] private string _imgPath = "cinka";
[ObservableProperty] private string _title = "Error";
[ObservableProperty] private string _description = "This is an error.";
protected override void InitialiseInDesignMode()
{
}
protected override void Initialise()
{
}
}

View File

@@ -127,10 +127,30 @@
Padding="0"
CornerRadius="0"
Command="{Binding OpenAuthPage}">
<Panel>
<TextBlock Foreground="#777777" IsVisible="{Binding IsLoggedIn}" Text="{Binding LoginText}"/>
<TextBlock Foreground="#777777" IsVisible="{Binding !IsLoggedIn}" Text="{services:LocaledText auth-current-login-no-name}"/>
</Panel>
<StackPanel Spacing="5" Orientation="Horizontal">
<Svg
Height="40"
Path="/Assets/svg/user.svg"
Width="10" />
<Panel>
<TextBlock Foreground="#777777" IsVisible="{Binding IsLoggedIn}" Text="{Binding LoginText}"/>
<TextBlock Foreground="#777777" IsVisible="{Binding !IsLoggedIn}" Text="{services:LocaledText auth-current-login-no-name}"/>
</Panel>
</StackPanel>
</Button>
<TextBlock>|</TextBlock>
<Button
Margin="0"
Padding="0"
CornerRadius="0"
Command="{Binding OpenRootPath}">
<StackPanel Orientation="Horizontal" Spacing="5">
<Svg
Height="40"
Path="/Assets/svg/folder.svg"
Width="10" />
<TextBlock Foreground="#777777" Text="{services:LocaledText goto-path-home}"/>
</StackPanel>
</Button>
<TextBlock>|</TextBlock>
<TextBlock Text="{Binding VersionInfo}"/>

View File

@@ -1,6 +1,6 @@
<UserControl
d:DesignHeight="450"
d:DesignWidth="800"
d:DesignWidth="1000"
mc:Ignorable="d"
x:Class="Nebula.Launcher.Views.Pages.AccountInfoView"
x:DataType="pages:AccountInfoViewModel"
@@ -39,39 +39,56 @@
Padding="0">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type auth:ProfileAuthCredentials}">
<Border
BoxShadow="0 1 15 -2 #121212"
CornerRadius="0,10,0,10"
Margin="5,5,5,0"
VerticalAlignment="Center">
<Border.Background>
<LinearGradientBrush EndPoint="50%,100%" StartPoint="50%,0%">
<GradientStop Color="#292222" Offset="0.0" />
<GradientStop Color="#222222" Offset="1.0" />
</LinearGradientBrush>
</Border.Background>
<Panel>
<StackPanel Margin="10,5,5,5" Orientation="Horizontal">
<Grid ColumnDefinitions="4*,*">
<Border
BoxShadow="0 1 15 -2 #121212"
CornerRadius="0,10,0,10"
Margin="5,5,5,0">
<Border.Background>
<LinearGradientBrush EndPoint="100%,50%" StartPoint="20%,50%">
<GradientStop Color="{Binding Color}" Offset="0.0" />
<GradientStop Color="#222222" Offset="1.0" />
</LinearGradientBrush>
</Border.Background>
<Label>
<TextBlock Text="{Binding AuthName}" Margin="5"/>
</Label>
</Border>
<Border Grid.Column="0"
CornerRadius="0,10,0,10"
Margin="5,5,5,0">
<Border.Background>
<LinearGradientBrush EndPoint="100%,50%" StartPoint="20%,50%">
<GradientStop Color="#aa222222" Offset="0.0" />
<GradientStop Color="#222222" Offset="0.4" />
</LinearGradientBrush>
</Border.Background>
<Button
HorizontalAlignment="Stretch"
Command="{Binding OnSelect}">
<Label>
<TextBlock Text="{Binding Login}" />
<TextBlock Text="{Binding Credentials.Login}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,5,0"/>
</Label>
</StackPanel>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button
Command="{Binding OnSelect}"
CornerRadius="0,0,0,10"
Padding="5">
<customControls:LocalizedLabel LocalId="account-profile-select"/>
</Button>
<Button
Command="{Binding OnDelete}"
CornerRadius="0,10,0,0"
Padding="5">
<customControls:LocalizedLabel LocalId="account-profile-delete"/>
</Button>
</StackPanel>
</Panel>
</Border>
</Button>
</Border>
<Border
BoxShadow="0 1 15 -2 #121212"
CornerRadius="0,10,0,10"
Margin="0,5,5,0" Grid.Column="1" Padding="0">
<Border.Background>
<LinearGradientBrush EndPoint="100%,50%" StartPoint="20%,50%">
<GradientStop Color="#292222" Offset="1.0" />
<GradientStop Color="#222222" Offset="1.0" />
</LinearGradientBrush>
</Border.Background>
<Button Command="{Binding OnDelete}" CornerRadius="0,10,0,10" HorizontalAlignment="Stretch">
<Svg
Height="15"
Path="/Assets/svg/delete.svg"
Width="15" />
</Button>
</Border>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
@@ -156,14 +173,6 @@
<customControls:LocalizedLabel LocalId="account-auth-button"/>
</Button>
</Border>
<Border BoxShadow="{StaticResource DefaultShadow}">
<Button
Command="{Binding SaveProfileCommand}"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Center">
<customControls:LocalizedLabel LocalId="account-auth-save"/>
</Button>
</Border>
<Button Command="{Binding ExpandAuthViewCommand}" HorizontalAlignment="Right">
<Label>
>
@@ -177,9 +186,15 @@
Margin="0,0,0,20"
Path="/Assets/svg/user.svg" />
<Label>
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<customControls:LocalizedLabel LocalId="account-auth-hello"/>
<TextBlock Text="{Binding CurrentLogin}" />
<StackPanel>
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Spacing="5">
<customControls:LocalizedLabel LocalId="account-auth-hello"/>
<TextBlock Text="{Binding CurrentLogin}" />
</StackPanel>
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Spacing="5">
<customControls:LocalizedLabel LocalId="account-auth-current-server"/>
<TextBlock Text="{Binding CurrentAuthServerName}" />
</StackPanel>
</StackPanel>
</Label>
<StackPanel

View File

@@ -33,5 +33,10 @@
<customControls:LocalizedLabel LocalId="task-cancel"/>
</Button>
</Panel>
<Panel>
<Border Background="{StaticResource DefaultForeground}" MinHeight="210">
<TextBlock TextWrapping="Wrap" Text="{Binding Message}" MaxLines="10" Margin="15"/>
</Border>
</Panel>
</StackPanel>
</UserControl>

View File

@@ -0,0 +1,39 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewModels="clr-namespace:Nebula.Launcher.ViewModels"
xmlns:converters="clr-namespace:Nebula.Launcher.Converters"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:DataType="viewModels:VisualErrorViewModel"
x:Class="Nebula.Launcher.Views.VisualErrorView">
<Design.DataContext>
<viewModels:VisualErrorViewModel />
</Design.DataContext>
<Grid RowDefinitions="30,*" ColumnDefinitions="200,*">
<Border Grid.Row="1" Grid.Column="0"
CornerRadius="10,0,0,10"
BorderThickness="0,0,2,0"
BorderBrush="{StaticResource DefaultForeground}">
<Image Source="{Binding ImgPath, Converter={x:Static converters:TypeConverters.ImageConverter}}" Width="200" Height="200"/>
</Border>
<Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" CornerRadius="10,10,0,0">
<Border.Background>
<LinearGradientBrush EndPoint="100%,50%" StartPoint="10%,20%">
<GradientStop Color="#FF6B6B" Offset="0.0" />
<GradientStop Color="#FF8E53" Offset="0.3" />
<GradientStop Color="#FF5E3A" Offset="0.6" />
<GradientStop Color="#FF5e5e" Offset="1.0" />
</LinearGradientBrush>
</Border.Background>
<Label HorizontalAlignment="Center"><TextBlock Text="{Binding Title}"/></Label>
</Border>
<TextBlock
Grid.Row="1"
Grid.Column="1"
Margin="15"
HorizontalAlignment="Center"
TextWrapping="Wrap"
Text="{Binding Description}"/>
</Grid>
</UserControl>

View File

@@ -0,0 +1,11 @@
using Avalonia.Controls;
namespace Nebula.Launcher.Views;
public partial class VisualErrorView : UserControl
{
public VisualErrorView()
{
InitializeComponent();
}
}

View File

@@ -47,65 +47,3 @@ public sealed class App(RunnerService runnerService, ContentService contentServi
await runnerService.Run(args.ToArray(), buildInfo, this, new ConsoleLoadingHandler(), cancelTokenSource.Token);
}
}
public sealed class ConsoleLoadingHandler : ILoadingHandler
{
private int _currJobs;
private float _percent;
private int _resolvedJobs;
public void SetJobsCount(int count)
{
_currJobs = count;
UpdatePercent();
Draw();
}
public int GetJobsCount()
{
return _currJobs;
}
public void SetResolvedJobsCount(int count)
{
_resolvedJobs = count;
UpdatePercent();
Draw();
}
public int GetResolvedJobsCount()
{
return _resolvedJobs;
}
private void UpdatePercent()
{
if (_currJobs == 0)
{
_percent = 0;
return;
}
if (_resolvedJobs > _currJobs) return;
_percent = _resolvedJobs / (float)_currJobs;
}
private void Draw()
{
var barCount = 10;
var fullCount = (int)(barCount * _percent);
var emptyCount = barCount - fullCount;
Console.Write("\r");
for (var i = 0; i < fullCount; i++) Console.Write("#");
for (var i = 0; i < emptyCount; i++) Console.Write(" ");
Console.Write($"\t {_resolvedJobs}/{_currJobs}");
}
}

View File

@@ -1,6 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using Nebula.Shared;
using Nebula.Shared.Services;
namespace Nebula.Runner;

View File

@@ -0,0 +1,39 @@
using Microsoft.Extensions.DependencyInjection;
using Nebula.Shared.Models;
using Nebula.Shared.Services;
namespace Nebula.Shared.ConfigMigrations;
public class ProfileMigrationV2(string oldName, string newName)
: BaseConfigurationMigration<ProfileAuthCredentialsV2[], AuthTokenCredentials[]>(oldName, newName)
{
protected override async Task<AuthTokenCredentials[]> Migrate(IServiceProvider serviceProvider, ProfileAuthCredentialsV2[] oldValue, ILoadingHandler loadingHandler)
{
loadingHandler.SetLoadingMessage("Migrating Profile V2 -> V3");
var list = new List<AuthTokenCredentials>();
var authService = serviceProvider.GetRequiredService<AuthService>();
var logger = serviceProvider.GetRequiredService<DebugService>().GetLogger("ProfileMigrationV2");
foreach (var oldCredentials in oldValue)
{
try
{
loadingHandler.SetLoadingMessage($"Migrating {oldCredentials.Login}");
var newCred = await authService.Auth(oldCredentials.Login, oldCredentials.Password, oldCredentials.AuthServer);
list.Add(newCred);
}
catch (Exception e)
{
logger.Error(e);
loadingHandler.SetLoadingMessage(e.Message);
}
}
loadingHandler.SetLoadingMessage("Migration done!");
return list.ToArray();
}
}
public sealed record ProfileAuthCredentialsV2(
string Login,
string Password,
string AuthServer);

View File

@@ -1,3 +1,6 @@
namespace Nebula.Shared.Models.Auth;
public sealed record LoginToken(string Token, DateTimeOffset ExpireTime);
public sealed record LoginToken(string Token, DateTimeOffset ExpireTime)
{
public static LoginToken Empty = new(string.Empty, DateTimeOffset.Now);
}

View File

@@ -7,6 +7,7 @@ public interface ILoadingHandler
public void SetResolvedJobsCount(int count);
public int GetResolvedJobsCount();
public void SetLoadingMessage(string message);
public void AppendJob(int count = 1)
{

View File

@@ -1,6 +1,5 @@
using System.Net;
using System.Net.Http.Headers;
using System.Text.Json;
using System.Text.Json.Serialization;
using Nebula.Shared.Models.Auth;
using Nebula.Shared.Services.Logging;
@@ -15,15 +14,10 @@ public class AuthService(
CancellationService cancellationService)
{
private readonly HttpClient _httpClient = new();
public CurrentAuthInfo? SelectedAuth { get; private set; }
private readonly ILogger _logger = debugService.GetLogger("AuthService");
public async Task Auth(AuthLoginPassword authLoginPassword, string? code = null)
public async Task<AuthTokenCredentials> Auth(string login, string password, string authServer, string? code = null)
{
var authServer = authLoginPassword.AuthServer;
var login = authLoginPassword.Login;
var password = authLoginPassword.Password;
_logger.Debug($"Auth to {authServer}api/auth/authenticate {login}");
var authUrl = new Uri($"{authServer}api/auth/authenticate");
@@ -34,8 +28,8 @@ public class AuthService(
await restService.PostAsync<AuthenticateResponse, AuthenticateRequest>(
new AuthenticateRequest(login, null, password, code), authUrl, cancellationService.Token);
SelectedAuth = new CurrentAuthInfo(result.UserId,
new LoginToken(result.Token, result.ExpireTime), authLoginPassword.Login, authLoginPassword.AuthServer);
return new AuthTokenCredentials(result.UserId,
new LoginToken(result.Token, result.ExpireTime), login, authServer);
}
catch (RestRequestException e)
{
@@ -48,32 +42,17 @@ public class AuthService(
}
}
public void ClearAuth()
public async Task EnsureToken(AuthTokenCredentials tokenCredentials)
{
SelectedAuth = null;
}
public async Task SetAuth(CurrentAuthInfo info)
{
SelectedAuth = info;
await EnsureToken();
}
public async Task EnsureToken()
{
if (SelectedAuth is null) throw new Exception("Auth info is not set!");
var authUrl = new Uri($"{SelectedAuth.AuthServer}api/auth/ping");
var authUrl = new Uri($"{tokenCredentials.AuthServer}api/auth/ping");
using var requestMessage = new HttpRequestMessage(HttpMethod.Get, authUrl);
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("SS14Auth", SelectedAuth.Token.Token);
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("SS14Auth", tokenCredentials.Token.Token);
using var resp = await _httpClient.SendAsync(requestMessage, cancellationService.Token);
}
}
public sealed record CurrentAuthInfo(Guid UserId, LoginToken Token, string Login, string AuthServer);
public record AuthLoginPassword(string Login, string Password, string AuthServer);
public sealed record AuthTokenCredentials(Guid UserId, LoginToken Token, string Login, string AuthServer);
public sealed record AuthDenyError(string[] Errors, AuthenticateDenyCode Code);

View File

@@ -1,6 +1,8 @@
using System.Diagnostics.CodeAnalysis;
using System.Text.Json;
using Microsoft.Extensions.DependencyInjection;
using Nebula.Shared.FileApis.Interfaces;
using Nebula.Shared.Models;
using Nebula.Shared.Services.Logging;
using Robust.LoaderApi;
@@ -30,23 +32,116 @@ public static class ConVarBuilder
return new ConVar<T>(name, defaultValue);
}
public static ConVar<T> BuildWithMigration<T>(string name, IConfigurationMigration migration, T? defaultValue = default)
{
if (string.IsNullOrWhiteSpace(name))
throw new ArgumentException("ConVar name cannot be null or whitespace.", nameof(name));
ConfigurationService.AddConfigurationMigration(migration);
return new ConVar<T>(name, defaultValue);
}
}
public interface IConfigurationMigration
{
public Task DoMigrate(ConfigurationService configurationService, IServiceProvider serviceProvider, ILoadingHandler loadingHandler);
}
public abstract class BaseConfigurationMigration<T1,T2> : IConfigurationMigration
{
protected ConVar<T1> OldConVar;
protected ConVar<T2> NewConVar;
public BaseConfigurationMigration(string oldName, string newName)
{
OldConVar = ConVarBuilder.Build<T1>(oldName);
NewConVar = ConVarBuilder.Build<T2>(newName);
}
public async Task DoMigrate(ConfigurationService configurationService, IServiceProvider serviceProvider, ILoadingHandler loadingHandler)
{
var oldValue = configurationService.GetConfigValue(OldConVar);
if(oldValue == null) return;
var newValue = await Migrate(serviceProvider, oldValue, loadingHandler);
configurationService.SetConfigValue(NewConVar, newValue);
configurationService.ClearConfigValue(OldConVar);
}
protected abstract Task<T2> Migrate(IServiceProvider serviceProvider, T1 oldValue, ILoadingHandler loadingHandler);
}
public class MigrationQueue(List<IConfigurationMigration> migrations) : IConfigurationMigration
{
public async Task DoMigrate(ConfigurationService configurationService, IServiceProvider serviceProvider , ILoadingHandler loadingHandler)
{
foreach (var migration in migrations)
{
await migration.DoMigrate(configurationService, serviceProvider, loadingHandler);
}
}
}
public class MigrationQueueBuilder
{
public static MigrationQueueBuilder Instance => new();
private readonly List<IConfigurationMigration> _migrations = [];
public MigrationQueueBuilder With(IConfigurationMigration migration)
{
_migrations.Add(migration);
return this;
}
public MigrationQueue Build()
{
return new MigrationQueue(_migrations);
}
}
[ServiceRegister]
public class ConfigurationService
{
private readonly IServiceProvider _serviceProvider;
private static List<IConfigurationMigration> _migrations = [];
public static void AddConfigurationMigration(IConfigurationMigration configurationMigration)
{
_migrations.Add(configurationMigration);
}
public delegate void OnConfigurationChangedDelegate<in T>(T value);
public IReadWriteFileApi ConfigurationApi { get; init; }
public IReadWriteFileApi ConfigurationApi { get; }
private readonly ILogger _logger;
public ConfigurationService(FileService fileService, DebugService debugService)
public ConfigurationService(FileService fileService, DebugService debugService, IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
_logger = debugService.GetLogger(this);
ConfigurationApi = fileService.CreateFileApi("config");
}
public void MigrateConfigs(ILoadingHandler loadingHandler)
{
Task.Run(async () =>
{
foreach (var migration in _migrations)
{
await migration.DoMigrate(this, _serviceProvider, loadingHandler);
}
if (loadingHandler is IDisposable disposable)
{
disposable.Dispose();
}
});
}
public ConfigChangeSubscriberDisposable<T> SubscribeVarChanged<T>(ConVar<T> convar, OnConfigurationChangedDelegate<T?> @delegate, bool invokeNow = false)
{
convar.OnValueChanged += @delegate;
@@ -112,12 +207,17 @@ public class ConfigurationService
return false;
}
public void ClearConfigValue<T>(ConVar<T> conVar)
{
ConfigurationApi.Remove(GetFileName(conVar));
conVar.OnValueChanged?.Invoke(conVar.DefaultValue);
}
public void SetConfigValue<T>(ConVar<T> conVar, T? value)
{
if (value == null)
{
ConfigurationApi.Remove(GetFileName(conVar));
conVar.OnValueChanged?.Invoke(conVar.DefaultValue);
ClearConfigValue(conVar);
return;
}

View File

@@ -52,6 +52,7 @@ public partial class ContentService
items = allItems.Where(a=> !hashApi.Has(a)).ToList();
loadingHandler.SetLoadingMessage("Download Count:" + items.Count);
_logger.Log("Download Count:" + items.Count);
await Download(downloadUri, items, hashApi, loadingHandler, cancellationToken);
@@ -62,6 +63,7 @@ public partial class ContentService
CancellationToken cancellationToken)
{
_logger.Log("Getting manifest: " + info.Hash);
loadingHandler.SetLoadingMessage("Getting manifest: " + info.Hash);
if (ManifestFileApi.TryOpen(info.Hash, out var stream))
{
@@ -72,6 +74,7 @@ public partial class ContentService
SetServerHash(info.ManifestUri.ToString(), info.Hash);
_logger.Log("Fetching manifest from: " + info.ManifestUri);
loadingHandler.SetLoadingMessage("Fetching manifest from: " + info.ManifestUri);
var response = await _http.GetAsync(info.ManifestUri, cancellationToken);
if (!response.IsSuccessStatusCode) throw new Exception();
@@ -127,6 +130,7 @@ public partial class ContentService
var downloadJobWatch = loadingHandler.GetQueryJob();
loadingHandler.SetLoadingMessage("Downloading from: " + contentCdn);
_logger.Log("Downloading from: " + contentCdn);
var requestBody = new byte[toDownload.Count * 4];
@@ -151,7 +155,7 @@ public partial class ContentService
if (cancellationToken.IsCancellationRequested)
{
_logger.Log("Downloading is cancelled!");
_logger.Log("Downloading cancelled!");
return;
}
@@ -201,7 +205,7 @@ public partial class ContentService
{
if (cancellationToken.IsCancellationRequested)
{
_logger.Log("Downloading is cancelled!");
_logger.Log("Downloading cancelled!");
decompressContext?.Dispose();
compressContext?.Dispose();
return;

View File

@@ -122,6 +122,11 @@ public sealed class ConsoleLoadingHandler : ILoadingHandler
return _resolvedJobs;
}
public void SetLoadingMessage(string message)
{
}
private void UpdatePercent()
{
if (_currJobs == 0)

View File

@@ -1,6 +1,7 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArchiving_002EUtils_002EWindows_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F27e9f12ad1e4318b9b02849ec3e6a502fa3ee761c4f0522ba756ab30cde1c_003FArchiving_002EUtils_002EWindows_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssembly_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F501151723a8d43558c75acbd334f26322066fa4b1c82b1297291314bf92ff_003FAssembly_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAuthenticationHeaderValue_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F88b338246f59cffdb6f3dc3d8dbcfc169599dc71d6f44a8f2732983db7f73a_003FAuthenticationHeaderValue_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAvaloniaXamlLoader_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F80462644bd1cc7e0b229dc4f5752b48c01cb67b46ae563b1b5078cc2556b98_003FAvaloniaXamlLoader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABorder_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F5fda7f1253ea19edc15f91b94a33322b857f1a9319fbffea8d26e9d304178_003FBorder_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABrushes_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F86e7f7d5cebacb8f8e37f52cb9a1f6a4b8933239631e3d969a4bc881ae92f9_003FBrushes_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -19,6 +20,7 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFileShare_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fa6b7f037ba7b44df80b8d3aa7e58eeb2e8e938_003F54_003Fc3f4f140_003FFileShare_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFile_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F3f31e7e8aa33de883c2ccfa62a9c81bfc246c36e825b489476f9472032e512_003FFile_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFrozenDictionary_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F89dff9063ddb01ff8125b579122b88bf4de94526490d77bcbbef7d0ee662a_003FFrozenDictionary_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFuncValueConverter_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fe91c13e7e24d7ba324e0e6eb12a24ea8c7761299d3c4703e55c86dd120835e61_003FFuncValueConverter_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFuture_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fb3575a2f41d7c2dbfaa36e866b8a361e11dd7223ff82bc574c1d5d4b7522f735_003FFuture_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpClient_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fc439425da351c75ac7d966a1cc8324b51a9c471865af79d2f2f3fcb65e392_003FHttpClient_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpContent_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F9657cc383c70851dc2bdcf91eff27f21196844abfe552fc9c3243ff36974cd_003FHttpContent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -26,13 +28,17 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpMessageHandler_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ffcc079c54e9940c5ac59f0141dda9ad01b4928_003Fa7_003F885f5fd9_003FHttpMessageHandler_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpMessageHandler_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F5ec756ee3c4a8815819863993a738eedef67396d5517846a3eed524729bb9_003FHttpMessageHandler_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpMessageInvoker_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ffcc079c54e9940c5ac59f0141dda9ad01b4928_003Fb5_003F70346b10_003FHttpMessageInvoker_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpRequestHeaders_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F5f9b1c879b45ff7e03890c1477da12b182b50f33d473239e11396c66179557_003FHttpRequestHeaders_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpRequestMessage_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F86529590f9604f327a3b1b19aec3ff2310f0654aa06bb8cef2e3d820ea3bfd_003FHttpRequestMessage_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpResponseMessage_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F4cfeb8b377bc81e1fbb5f7d7a02492cb6ac23e88c8c9d7155944f0716f3d4b_003FHttpResponseMessage_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIDispatcherImpl_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F22d92db124764b1ab49745245c66f01b1e1a00_003F0f_003F01061787_003FIDispatcherImpl_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIDisposable_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fa6b7f037ba7b44df80b8d3aa7e58eeb2e8e938_003F98_003Fd1b23281_003FIDisposable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AImage_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F2b95745d8f2ddf7b8ad6130e01c5b2782e253ff11247a9aeefcef47277b1ab_003FImage_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIndex_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F2a1a813823579c69832f1304f97761e7be433bd6aa928f351d138050b56a38_003FIndex_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AInt32_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fa882d183338544fdbcbdfc7b6d3dcb78916630765551644a221b5be9c45a121b_003FInt32_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AInterop_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc4d71b51722245ae8cde97bfd996e68386928_003F3a_003F004a1338_003FInterop_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJsonSerializer_002ERead_002EString_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F27c4858128168eda568c1334d70d5241efb9461e2a3209258a04deee5d9c367_003FJsonSerializer_002ERead_002EString_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AKnownHeader_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F1079f3c57a31ec97cba3b6ebb3d45c5a4afcdf6fa483a4db57c3d58ea59d7a9_003FKnownHeader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AListBox_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F3a6cdc26ff4d30986a9a16b6bbc9bb6a7f2657431c82cde5c66dd377cf51e2b_003FListBox_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMetricServer_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb07ddb833489431aae882d295a4e94797e00_003Fcf_003F23af7cad_003FMetricServer_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMetricServer_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F66d3496ea2e7f3cbfb5f2ba1362869af0588ac72e87912659693443b5b7c3a_003FMetricServer_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String>
@@ -40,6 +46,7 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANativeLibrary_002ECoreCLR_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F88c2c65e1618f68cb5969f70dfc0986e9571015ac8d487b18d26e89c926264_003FNativeLibrary_002ECoreCLR_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANativeLibrary_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F49393f3cda2f9a5c2fa811fc9179dcbaf5bd94d9dc8afc76aaff2bc23287f3_003FNativeLibrary_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AObservableCollection_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F3e2c48e6b3ec8b39cf721287f93972c7f3df25d306753bcc539eaad73126c68_003FObservableCollection_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AObservableObject_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F3e432edeee9469b7cfdb81d6e6bd278cf57afb9e54ab75649b8bb2f52cdde69_003FObservableObject_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APanel_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F9b699722324e3615b57977447b25bf953fccb2d6e912ae584f16b7e691ad9d3_003FPanel_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AParallel_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F36fd1a9641998bb3afbf2091e26eafa6aaafabcb494bc746c0ba7471db513143_003FParallel_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AParallel_002EForEachAsync_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fc1d1ed6be2d5d4de542b4af5b36e82f6d1d1a389a35a4e4f9748d137d1c651_003FParallel_002EForEachAsync_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>