6 Commits

Author SHA1 Message Date
a3c96174b2 - add: Foolproof 2025-07-05 20:39:36 +03:00
3bfae32c25 - fix: harmony assembly include 2025-07-03 12:46:28 +03:00
ae17ff2d89 - add: Unit tests 2025-07-03 12:17:15 +03:00
517fadaab8 - tweak: View autogenerator 2025-07-02 21:32:51 +03:00
9e95d68c4a - tweak: style thinks 2025-06-28 14:05:19 +03:00
01ebe3219d - add: Metrics 2025-06-27 21:31:38 +03:00
85 changed files with 1210 additions and 415 deletions

View File

@@ -33,6 +33,7 @@
<entry key="Nebula.Launcher/Views/Popup/ExceptionListView.axaml" value="Nebula.Launcher/Nebula.Launcher.csproj" />
<entry key="Nebula.Launcher/Views/Popup/ExceptionView.axaml" value="Nebula.Launcher/Nebula.Launcher.csproj" />
<entry key="Nebula.Launcher/Views/Popup/InfoPopupView.axaml" value="Nebula.Launcher/Nebula.Launcher.csproj" />
<entry key="Nebula.Launcher/Views/Popup/IsLoginCredentialsNullPopupView.axaml" value="Nebula.Launcher/Nebula.Launcher.csproj" />
<entry key="Nebula.Launcher/Views/Popup/LoadingContextView.axaml" value="Nebula.Launcher/Nebula.Launcher.csproj" />
<entry key="Nebula.Launcher/Views/Popup/LogPopupView.axaml" value="Nebula.Launcher/Nebula.Launcher.csproj" />
<entry key="Nebula.Launcher/Views/Popup/MessagePopupView.axaml" value="Nebula.Launcher/Nebula.Launcher.csproj" />

View File

@@ -107,10 +107,10 @@
pages|StringUnitConfigControl.ConfigBorder,
pages|IntUnitConfigControl.ConfigBorder,
pages|FloatUnitConfigControl.ConfigBorder">
<Setter Property="Background" Value="#333333" />
<Setter Property="CornerRadius" Value="5"/>
<Setter Property="BorderThickness" Value="1,0,1,2" />
<Setter Property="BorderBrush" Value="Azure" />
<Setter Property="Background" Value="#33333355" />
<Setter Property="CornerRadius" Value="0"/>
<Setter Property="BorderThickness" Value="1,0,0,2" />
<Setter Property="BorderBrush" Value="#3f3f3f5f" />
</Style>
</Styles>

View File

@@ -25,6 +25,8 @@ account-auth-button = Authenticate
account-auth-save = Save Profile
account-auth-hello = Hello,
account-auth-logout = Log out
auth-current-login-name = Current login: {$login}
auth-current-login-no-name = Profile not selected
auth-processing = Processing authentication request...
auth-error = An authentication error has occurred.
@@ -40,11 +42,14 @@ config-export-logs = Export logs
config-open-data = Open data path
config-reset = Reset to default
config-save = Save changes
config-remove-content-all = Remove all content
filter-roleplay = Roleplay
filter-language = Language
favorite-add = Add to favorites
popup-add-favorite-invalid-ip = Please enter a valid IP
servername-set = Set server name
servername-clear = Clear server name
twofa-enabled = You have two-factor authentication enabled. Please enter the code.
twofa-set = Proceed
@@ -54,4 +59,10 @@ serverentry-map = Map
serverentry-preset = Preset
content-view-server = Server url
content-view-path = Path
content-view-path = Path
popup-login-credentials-warning = Warning! No credentials provided!
popup-login-credentials-warning-label = Warning! No credentials provided! The servers will not be able to let you in due to lack of authorization. Please keep this in mind.
popup-login-credentials-warning-go-auth = Go to auth page
popup-login-credentials-warning-cancel = Cancel
popup-login-credentials-warning-proceed = Proceed

View File

@@ -25,6 +25,8 @@ account-auth-button = Аутентифицировать
account-auth-save = Сохранить профиль
account-auth-hello = Привет,
account-auth-logout = Выйти
auth-current-login-name = Текущий профиль: {$login}
auth-current-login-no-name = Профиль не выбран
auth-processing = Обработка запроса аутентификации...
auth-error = Произошла ошибка аутентификации.
@@ -40,11 +42,14 @@ config-export-logs = Экспортировать логи
config-open-data = Открыть путь данных
config-reset = Сбросить к значениям по умолчанию
config-save = Сохранить изменения
config-remove-content-all = Удалить весь контент
filter-roleplay = Ролевая игра
filter-language = Язык
favorite-add = Добавить в избранное
popup-add-favorite-invalid-ip = Пожалуйста, введите валидный адрес
servername-set = Установить имя сервера
servername-clear = Очистить
twofa-enabled = У вас включена двухфакторная аутентификация. Введите код.
twofa-set = Продолжить
@@ -54,4 +59,10 @@ serverentry-map = Карта
serverentry-preset = Режим
content-view-server = Сервер
content-view-path = Путь
content-view-path = Путь
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 = Продолжить

View File

@@ -1,4 +1,5 @@
using Avalonia.Controls;
using Nebula.Launcher.Models;
using Nebula.Launcher.ServerListProviders;
using Nebula.Launcher.ViewModels;
using Nebula.Launcher.ViewModels.Pages;

View File

@@ -1,2 +1 @@
global using Nebula.Shared.Attributes;
global using Nebula.Launcher.ViewHelper;
global using Nebula.Shared.Attributes;

View File

@@ -1,6 +1,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.Services;

View File

@@ -0,0 +1,6 @@
namespace Nebula.Launcher.Models.Auth;
public sealed record AuthServerCredentials(
string Name,
string[] Servers
);

View File

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

View File

@@ -0,0 +1,32 @@
using Nebula.Launcher.ProcessHelper;
using Nebula.Launcher.ViewModels.Popup;
using Nebula.Shared.Services;
namespace Nebula.Launcher.Models;
public sealed class ContentLogConsumer : IProcessLogConsumer
{
private readonly LogPopupModelView _currLog;
private readonly PopupMessageService _popupMessageService;
public ContentLogConsumer(LogPopupModelView currLog, PopupMessageService popupMessageService)
{
_currLog = currLog;
_popupMessageService = popupMessageService;
}
public void Out(string text)
{
_currLog.Append(text);
}
public void Error(string text)
{
_currLog.Append(text);
}
public void Fatal(string text)
{
_popupMessageService.Popup("Fatal error while stop instance:" + text);
}
}

View File

@@ -0,0 +1,8 @@
using Nebula.Launcher.ViewModels.Pages;
namespace Nebula.Launcher.Models;
public interface IFilterConsumer
{
public void ProcessFilter(ServerFilter? serverFilter);
}

View File

@@ -0,0 +1,40 @@
using System.Text.RegularExpressions;
using Avalonia.Media;
namespace Nebula.Launcher.Models;
public sealed class LogInfo
{
public string Category { get; set; } = "LOG";
public IBrush CategoryColor { get; set; } = Brush.Parse("#424242");
public string Message { get; set; } = "";
public static LogInfo FromString(string input)
{
var matches = Regex.Matches(input, @"(\[(?<c>.*)\] (?<m>.*))|(?<m>.*)");
var category = "All";
if (matches[0].Groups.TryGetValue("c", out var c)) category = c.Value;
var color = Brush.Parse("#444444");
switch (category)
{
case "DEBG":
color = Brush.Parse("#2436d4");
break;
case "ERRO":
color = Brush.Parse("#d42436");
break;
case "INFO":
color = Brush.Parse("#0ab3c9");
break;
}
var message = matches[0].Groups["m"].Value;
return new LogInfo
{
Category = category, Message = message, CategoryColor = color
};
}
}

View File

@@ -54,6 +54,8 @@
<Copy SourceFiles="..\Nebula.Runner\bin\$(Configuration)\$(TargetFramework)\Nebula.Runner.pdb" DestinationFolder="$(OutDir)"/>
<Copy SourceFiles="..\Nebula.Runner\bin\$(Configuration)\$(TargetFramework)\Nebula.Runner.deps.json" DestinationFolder="$(OutDir)"/>
<Copy SourceFiles="..\Nebula.Runner\bin\$(Configuration)\$(TargetFramework)\Nebula.Runner.runtimeconfig.json" DestinationFolder="$(OutDir)"/>
<Copy SourceFiles="..\Nebula.Runner\bin\$(Configuration)\$(TargetFramework)\0Harmony.dll" DestinationFolder="$(OutDir)"/>
</Target>
<Target Name="PublishCheck" AfterTargets="Publish">
@@ -61,6 +63,8 @@
<Copy SourceFiles="..\Nebula.Runner\bin\$(Configuration)\$(TargetFramework)\Nebula.Runner.pdb" DestinationFolder="$(PublishDir)"/>
<Copy SourceFiles="..\Nebula.Runner\bin\$(Configuration)\$(TargetFramework)\Nebula.Runner.deps.json" DestinationFolder="$(PublishDir)"/>
<Copy SourceFiles="..\Nebula.Runner\bin\$(Configuration)\$(TargetFramework)\Nebula.Runner.runtimeconfig.json" DestinationFolder="$(PublishDir)"/>
<Copy SourceFiles="..\Nebula.Runner\bin\$(Configuration)\$(TargetFramework)\0Harmony.dll" DestinationFolder="$(PublishDir)"/>
</Target>
<ItemGroup>

View File

@@ -7,6 +7,7 @@ using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Threading;
using Microsoft.Extensions.DependencyInjection;
using Nebula.Launcher.Views;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher;

View File

@@ -51,16 +51,15 @@ public partial class LocalisationService
Initialise();
}
public static string GetString(string locale)
public static string GetString(string locale, Dictionary<string, object>? options = null)
{
if (_currentMessageContext is null)
{
Console.WriteLine("ERROR SHIT BITHC!");
return locale;
}
var message = _currentMessageContext.GetMessage(locale);
if (message == null) return locale;
return _currentMessageContext.Format(message, new Dictionary<string, object>());
return _currentMessageContext.Format(message, options ?? []);
}
}

View File

@@ -1,16 +0,0 @@
using System;
namespace Nebula.Launcher.ViewHelper;
[AttributeUsage(AttributeTargets.Class)]
public class ViewModelRegisterAttribute : Attribute
{
public ViewModelRegisterAttribute(Type? type = null, bool isSingleton = true)
{
Type = type;
IsSingleton = isSingleton;
}
public Type? Type { get; }
public bool IsSingleton { get; }
}

View File

@@ -4,6 +4,7 @@ using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Nebula.Launcher.ViewModels;
using Nebula.Launcher.Views;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher;

View File

@@ -10,10 +10,10 @@ using Nebula.Launcher.Services;
using Nebula.Launcher.ViewModels.Pages;
using Nebula.Launcher.ViewModels.Popup;
using Nebula.Launcher.Views;
using Nebula.Shared.Models;
using Nebula.Shared.Services;
using Nebula.Shared.Services.Logging;
using Nebula.Shared.Utils;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels;
@@ -41,7 +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 string LoginText => Services.LocalisationService.GetString("auth-current-login-name",
new Dictionary<string, object>
{
{ "login", LoginName }
});
[GenerateProperty] private LocalisationService LocalisationService { get; }
[GenerateProperty] private AuthService AuthService { get; }
[GenerateProperty] private DebugService DebugService { get; } = default!;
[GenerateProperty] private PopupMessageService PopupMessageService { get; } = default!;
[GenerateProperty] private ContentService ContentService { get; } = default!;
@@ -136,6 +146,12 @@ public partial class MainViewModel : ViewModelBase
CurrentPage = obj;
}
public void InvokeChangeAuth()
{
OnPropertyChanged(nameof(IsLoggedIn));
OnPropertyChanged(nameof(LoginText));
}
public void PopupMessage(PopupViewModelBase viewModelBase)
{
if (CurrentPopup == null)
@@ -163,6 +179,11 @@ public partial class MainViewModel : ViewModelBase
Popup = true;
}
public void OpenAuthPage()
{
RequirePage<AccountInfoViewModel>();
}
public void OpenLink()
{
Helper.OpenBrowser("https://durenko.tatar/nebula");

View File

@@ -3,17 +3,17 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Net.Http;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using System.Windows.Input;
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.Services;
using Nebula.Shared.Services.Logging;
using Nebula.Shared.Utils;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels.Pages;
@@ -142,6 +142,7 @@ public partial class AccountInfoViewModel : ViewModelBase
try
{
await a();
ViewHelperService.GetViewModel<MainViewModel>().InvokeChangeAuth();
}
catch (AuthException e)
{
@@ -200,6 +201,7 @@ public partial class AccountInfoViewModel : ViewModelBase
{
IsLogged = false;
AuthService.ClearAuth();
ViewHelperService.GetViewModel<MainViewModel>().InvokeChangeAuth();
}
private void UpdateAuthMenu()
@@ -322,16 +324,4 @@ public partial class AccountInfoViewModel : ViewModelBase
ConfigurationService.SetConfigValue(LauncherConVar.AuthProfiles,
Accounts.ToArray());
}
}
public sealed record ProfileAuthCredentials(
string Login,
string Password,
string AuthServer,
[property: JsonIgnore] ICommand OnSelect = default!,
[property: JsonIgnore] ICommand OnDelete = default!);
public sealed record AuthServerCredentials(
string Name,
string[] Servers
);
}

View File

@@ -7,13 +7,17 @@ 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;
using Avalonia.Layout;
using Nebula.Launcher.Services;
using Nebula.Launcher.ViewModels.Popup;
using Nebula.Launcher.Views.Pages;
using Nebula.Shared;
using Nebula.Shared.Services;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels.Pages;
@@ -26,14 +30,18 @@ public partial class ConfigurationViewModel : ViewModelBase
[GenerateProperty] private ConfigurationService ConfigurationService { get; } = default!;
[GenerateProperty] private PopupMessageService PopupService { get; } = default!;
[GenerateProperty] private FileService FileService { get; set; } = default!;
[GenerateProperty] private ContentService ContentService { get; set; } = default!;
[GenerateProperty] private CancellationService CancellationService { get; set; } = default!;
[GenerateProperty] private ViewHelperService ViewHelperService { get; set; } = default!;
public List<(object, Type)> ConVarList = new();
private readonly List<(object, Type)> _conVarList = new();
public void AddCvarConf<T>(ConVar<T> cvar)
{
ConfigurationVerbose.Add(
ConfigControlHelper.GetConfigControl(cvar.Name, ConfigurationService.GetConfigValue(cvar)));
ConVarList.Add((cvar, cvar.Type));
ConfigControlHelper.GetConfigControl(cvar.Name, ConfigurationService.GetConfigValue(cvar)!));
_conVarList.Add((cvar, cvar.Type));
}
public void InvokeUpdateConfiguration()
@@ -44,7 +52,7 @@ public partial class ConfigurationViewModel : ViewModelBase
if(!conVarControl.Dirty)
continue;
var conVar = ConVarList[i];
var conVar = _conVarList[i];
var methodInfo = ConfigurationService.GetType().GetMethod("SetConfigValue")!.MakeGenericMethod(conVar.Item2);
methodInfo.Invoke(ConfigurationService, [conVar.Item1, conVarControl.GetValue()]);
}
@@ -52,13 +60,13 @@ public partial class ConfigurationViewModel : ViewModelBase
public void ResetConfig()
{
foreach (var conVar in ConVarList)
foreach (var conVar in _conVarList)
{
var methodInfo = ConfigurationService.GetType().GetMethod("SetConfigValue")!.MakeGenericMethod(conVar.Item2);
methodInfo.Invoke(ConfigurationService, [conVar.Item1, null]);
}
ConVarList.Clear();
_conVarList.Clear();
ConfigurationVerbose.Clear();
InitConfiguration();
@@ -80,7 +88,18 @@ public partial class ConfigurationViewModel : ViewModelBase
ZipFile.CreateFromDirectory(logPath, Path.Join(path, DateTime.Now.ToString("yyyy-MM-dd") + ".zip"));
ExplorerHelper.OpenFolder(path);
}
public void RemoveAllContent()
{
Task.Run(() =>
{
using var loader = ViewHelperService.GetViewModel<LoadingContextViewModel>();
loader.LoadingName = "Removing content";
PopupService.Popup(loader);
ContentService.RemoveAllContent(loader, CancellationService.Token);
});
}
private void InitConfiguration()
{
AddCvarConf(LauncherConVar.ILSpyUrl);

View File

@@ -18,6 +18,7 @@ using Nebula.Shared.FileApis;
using Nebula.Shared.Models;
using Nebula.Shared.Services;
using Nebula.Shared.Utils;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels.Pages;

View File

@@ -14,6 +14,7 @@ using Nebula.Launcher.Views.Pages;
using Nebula.Shared;
using Nebula.Shared.Models;
using Nebula.Shared.Services;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels.Pages;
@@ -28,8 +29,7 @@ public partial class ServerOverviewModel : ViewModelBase
[ObservableProperty] private ServerListView _currentServerList = new();
public readonly ServerFilter CurrentFilter = new();
public Action? OnSearchChange;
[GenerateProperty] private IServiceProvider ServiceProvider { get; }
[GenerateProperty] private ConfigurationService ConfigurationService { get; }
[GenerateProperty] private FavoriteServerListProvider FavoriteServerListProvider { get; }
@@ -71,13 +71,11 @@ public partial class ServerOverviewModel : ViewModelBase
Items = new ObservableCollection<ServerListTabTemplate>(tempItems);
SelectedItem = Items[0];
OnSearchChange += SearchChangeEvent;
}
private void SearchChangeEvent()
partial void OnSearchTextChanged(string value)
{
CurrentFilter.SearchText = SearchText;
CurrentFilter.SearchText = value;
ApplyFilter();
}
@@ -318,6 +316,4 @@ public sealed class ServerFilter
{
return IsMatchByName(name) && IsMatchByTags(itemTags);
}
}
public sealed record ServerCustomNameEntry(string Url, string Name);
}

View File

@@ -7,6 +7,7 @@ using Nebula.Launcher.Views.Pages;
using Nebula.Shared.Services;
using Nebula.Shared.Services.Logging;
using Nebula.Shared.Utils;
using Nebula.Shared.ViewHelper;
using AddFavoriteView = Nebula.Launcher.Views.Popup.AddFavoriteView;
namespace Nebula.Launcher.ViewModels.Popup;
@@ -41,6 +42,9 @@ public partial class AddFavoriteViewModel : PopupViewModelBase
{
try
{
if(string.IsNullOrWhiteSpace(IpInput))
throw new Exception(LocalisationService.GetString("popup-add-favorite-invalid-ip"));
var uri = IpInput.ToRobustUrl();
FavoriteServerListProvider.AddFavorite(uri);
Dispose();

View File

@@ -2,6 +2,7 @@ using CommunityToolkit.Mvvm.ComponentModel;
using Nebula.Launcher.Services;
using Nebula.Launcher.Views.Popup;
using Nebula.Shared.Services;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels.Popup;
@@ -24,8 +25,7 @@ public sealed partial class EditServerNameViewModel : PopupViewModelBase
if (string.IsNullOrWhiteSpace(NameInput))
{
RemoveServerName();
Dispose();
OnClear();
return;
}
@@ -33,6 +33,12 @@ public sealed partial class EditServerNameViewModel : PopupViewModelBase
Dispose();
}
public void OnClear()
{
RemoveServerName();
Dispose();
}
private void AddServerName()
{
var currentNames = ConfigurationService.GetConfigValue(LauncherConVar.ServerCustomNames)!;

View File

@@ -3,6 +3,7 @@ using System.Collections.ObjectModel;
using Nebula.Launcher.Services;
using Nebula.Launcher.Views.Popup;
using Nebula.Shared.Services;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels.Popup;

View File

@@ -2,6 +2,7 @@ using CommunityToolkit.Mvvm.ComponentModel;
using Nebula.Launcher.Services;
using Nebula.Launcher.Views.Popup;
using Nebula.Shared.Services;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels.Popup;

View File

@@ -0,0 +1,50 @@
using Nebula.Launcher.Services;
using Nebula.Launcher.ViewModels.Pages;
using Nebula.Launcher.Views.Popup;
using Nebula.Shared.Services;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels.Popup;
[ConstructGenerator, ViewModelRegister(typeof(IsLoginCredentialsNullPopupView))]
public partial class IsLoginCredentialsNullPopupViewModel : PopupViewModelBase
{
private ServerEntryModelView _entry;
[GenerateProperty] public override PopupMessageService PopupMessageService { get; }
[GenerateProperty, DesignConstruct] private ViewHelperService ViewHelperService { get; }
protected override void InitialiseInDesignMode()
{
}
protected override void Initialise()
{
}
public IsLoginCredentialsNullPopupViewModel WithServerEntry(ServerEntryModelView entryModelView)
{
_entry = entryModelView;
return this;
}
public void Proceed()
{
_entry.RunInstanceIgnoreAuth();
Dispose();
}
public void Cancel()
{
Dispose();
}
public void GotoAuthPage()
{
ViewHelperService.GetViewModel<MainViewModel>().RequirePage<AccountInfoViewModel>();
Dispose();
}
public override string Title => LocalisationService.GetString("popup-login-credentials-warning");
public override bool IsClosable => true;
}

View File

@@ -3,6 +3,7 @@ using Nebula.Launcher.Services;
using Nebula.Launcher.Views.Popup;
using Nebula.Shared.Models;
using Nebula.Shared.Services;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels.Popup;

View File

@@ -1,8 +1,8 @@
using System.Collections.ObjectModel;
using System.Text.RegularExpressions;
using Avalonia.Media;
using Nebula.Launcher.Models;
using Nebula.Launcher.Views.Popup;
using Nebula.Shared.Services;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels.Popup;
@@ -42,40 +42,4 @@ public sealed partial class LogPopupModelView : PopupViewModelBase
{
Logs.Clear();
}
}
public sealed class LogInfo
{
public string Category { get; set; } = "LOG";
public IBrush CategoryColor { get; set; } = Brush.Parse("#424242");
public string Message { get; set; } = "";
public static LogInfo FromString(string input)
{
var matches = Regex.Matches(input, @"(\[(?<c>.*)\] (?<m>.*))|(?<m>.*)");
var category = "All";
if (matches[0].Groups.TryGetValue("c", out var c)) category = c.Value;
var color = Brush.Parse("#444444");
switch (category)
{
case "DEBG":
color = Brush.Parse("#2436d4");
break;
case "ERRO":
color = Brush.Parse("#d42436");
break;
case "INFO":
color = Brush.Parse("#0ab3c9");
break;
}
var message = matches[0].Groups["m"].Value;
return new LogInfo
{
Category = category, Message = message, CategoryColor = color
};
}
}

View File

@@ -2,6 +2,7 @@ using System;
using Nebula.Launcher.Services;
using Nebula.Launcher.Views.Popup;
using Nebula.Shared.Services;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels.Popup;

View File

@@ -6,11 +6,13 @@ using Avalonia.Media;
using Avalonia.Threading;
using CommunityToolkit.Mvvm.ComponentModel;
using Microsoft.Extensions.DependencyInjection;
using Nebula.Launcher.Models;
using Nebula.Launcher.ServerListProviders;
using Nebula.Launcher.ViewModels.Pages;
using Nebula.Launcher.Views;
using Nebula.Shared.Models;
using Nebula.Shared.Services;
using Nebula.Shared.ViewHelper;
using BindingFlags = System.Reflection.BindingFlags;
namespace Nebula.Launcher.ViewModels;
@@ -27,6 +29,8 @@ public sealed partial class ServerCompoundEntryViewModel :
[ObservableProperty] private bool _loading = true;
private string? _name;
private RobustUrl? _url;
private ServerFilter? _currentFilter;
public string? Name
{
@@ -58,14 +62,16 @@ public sealed partial class ServerCompoundEntryViewModel :
{
Task.Run(async () =>
{
_url = url;
try
{
Message = "Loading server entry...";
var status = await RestService.GetAsync<ServerStatus>(url.StatusUri, cancellationToken);
var status = await RestService.GetAsync<ServerStatus>(_url.StatusUri, cancellationToken);
CurrentEntry = ServiceProvider.GetService<ServerEntryModelView>()!.WithData(url,name, status);
CurrentEntry = ServiceProvider.GetService<ServerEntryModelView>()!.WithData(_url,name, status);
CurrentEntry.IsFavorite = IsFavorite;
CurrentEntry.Loading = false;
CurrentEntry.ProcessFilter(_currentFilter);
Loading = false;
}
catch (Exception e)
@@ -79,12 +85,20 @@ public sealed partial class ServerCompoundEntryViewModel :
public void ToggleFavorites()
{
if (CurrentEntry is null && _url is not null)
{
IsFavorite = !IsFavorite;
if(IsFavorite) FavoriteServerListProvider.AddFavorite(_url);
else FavoriteServerListProvider.RemoveFavorite(_url);
}
CurrentEntry?.ToggleFavorites();
}
public void ProcessFilter(ServerFilter? serverFilter)
{
_currentFilter = serverFilter;
if(CurrentEntry is IFilterConsumer filterConsumer)
filterConsumer.ProcessFilter(serverFilter);
}

View File

@@ -6,6 +6,7 @@ using System.Threading.Tasks;
using System.Windows.Input;
using Avalonia.Controls;
using CommunityToolkit.Mvvm.ComponentModel;
using Nebula.Launcher.Models;
using Nebula.Launcher.ProcessHelper;
using Nebula.Launcher.ServerListProviders;
using Nebula.Launcher.Services;
@@ -16,6 +17,7 @@ using Nebula.Shared.Models;
using Nebula.Shared.Services;
using Nebula.Shared.Services.Logging;
using Nebula.Shared.Utils;
using Nebula.Shared.ViewHelper;
namespace Nebula.Launcher.ViewModels;
@@ -45,7 +47,7 @@ public partial class ServerEntryModelView : ViewModelBase, IFilterConsumer, ILis
public LogPopupModelView CurrLog;
public RobustUrl Address { get; private set; }
[GenerateProperty] private ConfigurationService ConfigurationService { get; } = default!;
[GenerateProperty] private AuthService AuthService { get; }
[GenerateProperty] private CancellationService CancellationService { get; } = default!;
[GenerateProperty] private DebugService DebugService { get; } = default!;
[GenerateProperty] private PopupMessageService PopupMessageService { get; } = default!;
@@ -161,11 +163,26 @@ public partial class ServerEntryModelView : ViewModelBase, IFilterConsumer, ILis
public void RunInstance()
{
CurrLog.Clear();
Task.Run(RunInstanceAsync);
Task.Run(async ()=> await RunInstanceAsync());
}
private async void RunInstanceAsync()
public void RunInstanceIgnoreAuth()
{
CurrLog.Clear();
Task.Run(async ()=> await RunInstanceAsync(true));
}
private async Task RunInstanceAsync(bool ignoreLoginCredentials = false)
{
if (!ignoreLoginCredentials && AuthService.SelectedAuth is null)
{
var warningContext = ViewHelperService.GetViewModel<IsLoginCredentialsNullPopupViewModel>()
.WithServerEntry(this);
PopupMessageService.Popup(warningContext);
return;
}
using var loadingContext = ViewHelperService.GetViewModel<LoadingContextViewModel>();
loadingContext.LoadingName = "Loading instance...";
((ILoadingHandler)loadingContext).AppendJob();
@@ -217,35 +234,6 @@ public partial class ServerEntryModelView : ViewModelBase, IFilterConsumer, ILis
}
}
public sealed class ContentLogConsumer : IProcessLogConsumer
{
private readonly LogPopupModelView _currLog;
private readonly PopupMessageService _popupMessageService;
public ContentLogConsumer(LogPopupModelView currLog, PopupMessageService popupMessageService)
{
_currLog = currLog;
_popupMessageService = popupMessageService;
}
public void Out(string text)
{
_currLog.Append(text);
}
public void Error(string text)
{
_currLog.Append(text);
}
public void Fatal(string text)
{
_popupMessageService.Popup("Fatal error while stop instance:" + text);
}
}
public class LinkGoCommand : ICommand
{
public LinkGoCommand()
@@ -265,9 +253,4 @@ public class LinkGoCommand : ICommand
}
public event EventHandler? CanExecuteChanged;
}
public interface IFilterConsumer
{
public void ProcessFilter(ServerFilter? serverFilter);
}

View File

@@ -1,22 +1,11 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Nebula.Launcher.ViewModels.Pages;
namespace Nebula.Launcher.Views;
public partial class FileContentEntryView : UserControl
{
// This constructor is used when the view is created by the XAML Previewer
public FileContentEntryView()
{
InitializeComponent();
}
// This constructor is used when the view is created via dependency injection
public FileContentEntryView(FolderContentEntry viewModel)
: this()
{
DataContext = viewModel;
}
}

View File

@@ -8,10 +8,10 @@
xmlns:converters="clr-namespace:Nebula.Launcher.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:models="clr-namespace:Nebula.Shared.Models;assembly=Nebula.Shared"
xmlns:viewModels="clr-namespace:Nebula.Launcher.ViewModels"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:models1="clr-namespace:Nebula.Launcher.Models">
xmlns:models1="clr-namespace:Nebula.Launcher.Models"
xmlns:services="clr-namespace:Nebula.Launcher.Services">
<Design.DataContext>
<viewModels:MainViewModel />
</Design.DataContext>
@@ -121,7 +121,20 @@
https://durenko.tatar/nebula/
</TextBlock>
</Button>
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding VersionInfo}"/>
<StackPanel Spacing="5" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
<Button
Margin="0"
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>
</Button>
<TextBlock>|</TextBlock>
<TextBlock Text="{Binding VersionInfo}"/>
</StackPanel>
</Panel>
</Label>
</Border>

View File

@@ -1,20 +1,11 @@
using Avalonia.Controls;
using Nebula.Launcher.ViewModels;
namespace Nebula.Launcher.Views;
public partial class MainView : UserControl
{
// This constructor is used when the view is created by the XAML Previewer
public MainView()
{
InitializeComponent();
}
// This constructor is used when the view is created via dependency injection
public MainView(MainViewModel viewModel)
: this()
{
DataContext = viewModel;
}
}

View File

@@ -9,7 +9,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pages="clr-namespace:Nebula.Launcher.ViewModels.Pages"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:auth="clr-namespace:Nebula.Launcher.Models.Auth">
<Design.DataContext>
<pages:AccountInfoViewModel />
</Design.DataContext>
@@ -37,7 +38,7 @@
ItemsSource="{Binding Accounts}"
Padding="0">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type pages:ProfileAuthCredentials}">
<DataTemplate DataType="{x:Type auth:ProfileAuthCredentials}">
<Border
BoxShadow="0 1 15 -2 #121212"
CornerRadius="0,10,0,10"

View File

@@ -1,5 +1,4 @@
using Avalonia.Controls;
using AccountInfoViewModel = Nebula.Launcher.ViewModels.Pages.AccountInfoViewModel;
namespace Nebula.Launcher.Views.Pages;
@@ -9,10 +8,4 @@ public partial class AccountInfoView : UserControl
{
InitializeComponent();
}
public AccountInfoView(AccountInfoViewModel viewModel)
: this()
{
DataContext = viewModel;
}
}

View File

@@ -22,7 +22,8 @@
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
<StackPanel Orientation="Horizontal" Spacing="5">
<WrapPanel Orientation="Horizontal">
<Button
Classes="ConfigBorder"
VerticalAlignment="Bottom"
@@ -60,7 +61,17 @@
Command="{Binding ExportLogs}">
<customControls:LocalizedLabel LocalId="config-export-logs"/>
</Button>
</StackPanel>
<Button
Classes="ConfigBorder"
VerticalAlignment="Bottom"
HorizontalAlignment="Stretch"
Padding="5"
Margin="5"
Command="{Binding RemoveAllContent}">
<customControls:LocalizedLabel LocalId="config-remove-content-all"/>
</Button>
</WrapPanel>
</StackPanel>
</ScrollViewer>
</UserControl>

View File

@@ -1,7 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Nebula.Launcher.ViewModels.Pages;
namespace Nebula.Launcher.Views.Pages;
@@ -11,10 +8,4 @@ public partial class ConfigurationView : UserControl
{
InitializeComponent();
}
public ConfigurationView(ConfigurationViewModel viewModel)
: this()
{
DataContext = viewModel;
}
}

View File

@@ -1,5 +1,4 @@
using Avalonia.Controls;
using ContentBrowserViewModel = Nebula.Launcher.ViewModels.Pages.ContentBrowserViewModel;
namespace Nebula.Launcher.Views.Pages;
@@ -9,10 +8,4 @@ public partial class ContentBrowserView : UserControl
{
InitializeComponent();
}
public ContentBrowserView(ContentBrowserViewModel viewModel)
: this()
{
DataContext = viewModel;
}
}

View File

@@ -71,7 +71,6 @@
<TextBox
Margin="25,0,0,0"
Text="{Binding SearchText}"
TextChanged="TextBox_OnTextChanged"
VerticalAlignment="Center"
Watermark="{services:LocaledText 'server-search'}" />
<Button

View File

@@ -1,11 +1,9 @@
using Avalonia.Controls;
using Nebula.Launcher.ViewModels.Pages;
namespace Nebula.Launcher.Views.Pages;
public partial class ServerOverviewView : UserControl
{
// This constructor is used when the view is created by the XAML Previewer
public ServerOverviewView()
{
InitializeComponent();
@@ -19,17 +17,4 @@ public partial class ServerOverviewView : UserControl
LanguageFilters.AddFilter("RU","lang:ru");
LanguageFilters.AddFilter("EN","lang:en");
}
// This constructor is used when the view is created via dependency injection
public ServerOverviewView(ServerOverviewModel viewModel)
: this()
{
DataContext = viewModel;
}
private void TextBox_OnTextChanged(object? sender, TextChangedEventArgs e)
{
var context = (ServerOverviewModel?)DataContext;
context?.OnSearchChange?.Invoke();
}
}

View File

@@ -1,5 +1,4 @@
using Avalonia.Controls;
using Nebula.Launcher.ViewModels.Popup;
namespace Nebula.Launcher.Views.Popup;
@@ -9,10 +8,4 @@ public partial class AddFavoriteView : UserControl
{
InitializeComponent();
}
public AddFavoriteView(AddFavoriteViewModel viewModel)
: this()
{
DataContext = viewModel;
}
}

View File

@@ -23,5 +23,10 @@
<customControls:LocalizedLabel HorizontalAlignment="Center" LocalId="servername-set"/>
</Button>
</Border>
<Border Background="{StaticResource DefaultSelected}" BoxShadow="{StaticResource DefaultShadow}">
<Button Command="{Binding OnClear}" HorizontalAlignment="Stretch">
<customControls:LocalizedLabel HorizontalAlignment="Center" LocalId="servername-clear"/>
</Button>
</Border>
</StackPanel>
</UserControl>

View File

@@ -1,7 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Nebula.Launcher.ViewModels.Popup;
namespace Nebula.Launcher.Views.Popup;
@@ -11,10 +8,4 @@ public partial class EditServerNameView : UserControl
{
InitializeComponent();
}
public EditServerNameView(EditServerNameViewModel viewModel)
: this()
{
DataContext = viewModel;
}
}

View File

@@ -1,5 +1,4 @@
using Avalonia.Controls;
using Nebula.Launcher.ViewModels.Popup;
namespace Nebula.Launcher.Views.Popup;
@@ -9,9 +8,4 @@ public partial class ExceptionListView : UserControl
{
InitializeComponent();
}
public ExceptionListView(ExceptionListViewModel listViewModel) : this()
{
DataContext = listViewModel;
}
}

View File

@@ -1,5 +1,4 @@
using Avalonia.Controls;
using InfoPopupViewModel = Nebula.Launcher.ViewModels.Popup.InfoPopupViewModel;
namespace Nebula.Launcher.Views.Popup;
@@ -9,9 +8,4 @@ public partial class InfoPopupView : UserControl
{
InitializeComponent();
}
public InfoPopupView(InfoPopupViewModel viewModel) : this()
{
DataContext = viewModel;
}
}

View File

@@ -0,0 +1,35 @@
<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:popup="clr-namespace:Nebula.Launcher.ViewModels.Popup"
xmlns:controls="clr-namespace:Nebula.Launcher.Controls"
xmlns:services="clr-namespace:Nebula.Launcher.Services"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Nebula.Launcher.Views.Popup.IsLoginCredentialsNullPopupView"
x:DataType="popup:IsLoginCredentialsNullPopupViewModel">
<Design.DataContext>
<popup:IsLoginCredentialsNullPopupViewModel />
</Design.DataContext>
<StackPanel Margin="15" Orientation="Vertical" Spacing="15">
<TextBlock HorizontalAlignment="Center" Text="{services:LocaledText popup-login-credentials-warning-label}" TextWrapping="Wrap"/>
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Spacing="5">
<Border Background="{StaticResource DefaultSelected}" BoxShadow="{StaticResource DefaultShadow}">
<Button Command="{Binding GotoAuthPage}">
<TextBlock Text="{services:LocaledText popup-login-credentials-warning-go-auth}"/>
</Button>
</Border>
<Border Background="{StaticResource DefaultSelected}" BoxShadow="{StaticResource DefaultShadow}">
<Button Command="{Binding Cancel}">
<TextBlock Text="{services:LocaledText popup-login-credentials-warning-cancel}"/>
</Button>
</Border>
<Border Background="{StaticResource DefaultSelected}" BoxShadow="{StaticResource DefaultShadow}">
<Button Command="{Binding Proceed}">
<TextBlock Text="{services:LocaledText popup-login-credentials-warning-proceed}"/>
</Button>
</Border>
</StackPanel>
</StackPanel>
</UserControl>

View File

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

View File

@@ -1,5 +1,4 @@
using Avalonia.Controls;
using LoadingContextViewModel = Nebula.Launcher.ViewModels.Popup.LoadingContextViewModel;
namespace Nebula.Launcher.Views.Popup;
@@ -9,9 +8,4 @@ public partial class LoadingContextView : UserControl
{
InitializeComponent();
}
public LoadingContextView(LoadingContextViewModel viewModel) : this()
{
DataContext = viewModel;
}
}

View File

@@ -4,6 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewModels="clr-namespace:Nebula.Launcher.ViewModels"
xmlns:popup="clr-namespace:Nebula.Launcher.ViewModels.Popup"
xmlns:models="clr-namespace:Nebula.Launcher.Models"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Nebula.Launcher.Views.Popup.LogPopupView"
x:DataType="popup:LogPopupModelView">
@@ -17,7 +18,7 @@
ItemsSource="{Binding Logs}"
Padding="0">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type popup:LogInfo}">
<DataTemplate DataType="{x:Type models:LogInfo}">
<Border CornerRadius="5" Margin="0,0,0,5">
<StackPanel Orientation="Horizontal" Spacing="5" Margin="0">
<Border MinWidth="100"

View File

@@ -1,5 +1,4 @@
using Avalonia.Controls;
using Nebula.Launcher.ViewModels.Popup;
namespace Nebula.Launcher.Views.Popup;
@@ -9,9 +8,4 @@ public partial class LogPopupView : UserControl
{
InitializeComponent();
}
public LogPopupView(LogPopupModelView viewModel) : this()
{
DataContext = viewModel;
}
}

View File

@@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using Nebula.Launcher.ViewModels.Popup;
namespace Nebula.Launcher.Views.Popup;
@@ -88,11 +85,6 @@ public partial class TfaView : UserControl
return (TextBox)box.Child!;
}
public TfaView(TfaViewModel tfaViewModel) : this()
{
DataContext = tfaViewModel;
}
private void Button_OnClick(object? sender, RoutedEventArgs e)
{
CheckupCode();

View File

@@ -1,5 +1,4 @@
using Avalonia.Controls;
using Nebula.Launcher.ViewModels;
namespace Nebula.Launcher.Views;
@@ -9,9 +8,4 @@ public partial class ServerCompoundEntryView : UserControl
{
InitializeComponent();
}
public ServerCompoundEntryView(ServerCompoundEntryViewModel viewModel) : this()
{
DataContext = viewModel;
}
}

View File

@@ -22,10 +22,7 @@ public partial class ServerEntryView : UserControl
StartAutoScrolling();
}
public ServerEntryView(ServerEntryModelView modelView) : this()
{
DataContext = modelView;
}
private void StartAutoScrolling()
{

View File

@@ -1,3 +1,4 @@
using Nebula.Runner.Services;
using Nebula.Shared;
using Nebula.Shared.Models;
using Nebula.Shared.Services;
@@ -27,21 +28,14 @@ public sealed class App(RunnerService runnerService, ContentService contentServi
var args = new List<string>
{
// Pass username to launched client.
// We don't load username from client_config.toml when launched via launcher.
"--username", login,
// Tell game we are launcher
"--cvar", "launch.launcher=true"
};
var connectionString = url.ToString();
if (!string.IsNullOrEmpty(buildInfo.BuildInfo.ConnectAddress))
connectionString = buildInfo.BuildInfo.ConnectAddress;
// We are using the launcher. Don't show main menu etc..
// Note: --launcher also implied --connect.
// For this reason, content bundles do not set --launcher.
args.Add("--launcher");
args.Add("--connect-address");

View File

@@ -12,6 +12,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lib.Harmony" Version="2.3.6" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0"/>
<PackageReference Include="SharpZstd.Interop" Version="1.5.6"/>
</ItemGroup>

View File

@@ -0,0 +1,54 @@
using System.Data;
using HarmonyLib;
using Nebula.Shared;
namespace Nebula.Runner.Services;
[ServiceRegister]
public class HarmonyService(ReflectionService reflectionService)
{
private HarmonyInstance? _instance;
public HarmonyInstance Instance
{
get
{
if (_instance is null)
CreateInstance();
return _instance!;
}
}
public void CreateInstance()
{
if (_instance is not null)
throw new Exception();
_instance = new HarmonyInstance();
UnShittyWizard();
}
/// <summary>
/// Я помню пенис большой,Я помню пенис большой, Я помню пенис большой, я помню....
/// </summary>
private void UnShittyWizard()
{
var method = reflectionService.GetType("Robust.Client.GameController").TypeInitializer;
_instance!.Harmony.Patch(method, new HarmonyMethod(Prefix));
}
static bool Prefix()
{
return false;
}
}
public class HarmonyInstance
{
public readonly Harmony Harmony;
internal HarmonyInstance()
{
Harmony = new Harmony("ru.cinka.patch");
}
}

View File

@@ -0,0 +1,59 @@
using System.Reflection;
using Nebula.Shared;
using Nebula.Shared.FileApis;
using Nebula.Shared.Services;
namespace Nebula.Runner.Services;
[ServiceRegister]
public class ReflectionService(AssemblyService assemblyService)
{
private Dictionary<string, Assembly> _typeCache = new();
public void RegisterAssembly(Assembly robustAssembly)
{
_typeCache.Add(robustAssembly.GetName().Name!, robustAssembly);
}
public void RegisterRobustAssemblies(AssemblyApi engine)
{
RegisterAssembly(GetRobustAssembly("Robust.Shared", engine));
RegisterAssembly(GetRobustAssembly("Robust.Client", engine));
}
private Assembly GetRobustAssembly(string assemblyName, AssemblyApi engine)
{
if(!assemblyService.TryOpenAssembly(assemblyName, engine, out var assembly))
throw new Exception($"Unable to locate {assemblyName}.dll in engine build!");
return assembly;
}
public Type? GetTypeImp(string name)
{
foreach (var (prefix,assembly) in _typeCache)
{
string appendedName = prefix + name;
var theType = assembly.GetType(appendedName);
if (theType != null)
{
return theType;
}
}
return null;
}
public Type GetType(string name)
{
var prefix = ExtrackPrefix(name);
return !_typeCache.TryGetValue(prefix, out var assembly)
? GetTypeImp(name)!
: assembly.GetType(name)!;
}
private string ExtrackPrefix(string path)
{
var sp = path.Split(".");
return sp[0] + "." + sp[1];
}
}

View File

@@ -1,8 +1,14 @@
using Nebula.Shared.Models;
using System.Globalization;
using System.Reflection;
using System.Reflection.Emit;
using HarmonyLib;
using Nebula.Shared;
using Nebula.Shared.Models;
using Nebula.Shared.Services;
using Nebula.Shared.Services.Logging;
using Robust.LoaderApi;
namespace Nebula.Shared.Services;
namespace Nebula.Runner.Services;
[ServiceRegister]
public sealed class RunnerService(
@@ -10,9 +16,12 @@ public sealed class RunnerService(
DebugService debugService,
ConfigurationService varService,
EngineService engineService,
AssemblyService assemblyService)
AssemblyService assemblyService,
ReflectionService reflectionService,
HarmonyService harmonyService)
{
private ILogger _logger = debugService.GetLogger("RunnerService");
private bool MetricEnabled = false; //TODO: ADD METRIC THINKS LATER
public async Task Run(string[] runArgs, RobustBuildInfo buildInfo, IRedialApi redialApi,
ILoadingHandler loadingHandler,
@@ -52,11 +61,81 @@ public sealed class RunnerService(
if (!assemblyService.TryOpenAssembly(varService.GetConfigValue(CurrentConVar.RobustAssemblyName)!, engine,
out var clientAssembly))
throw new Exception("Unable to locate Robust.Client.dll in engine build!");
if (!assemblyService.TryGetLoader(clientAssembly, out var loader))
return;
if(!assemblyService.TryOpenAssembly("Prometheus.NetStandard", engine, out var prometheusAssembly))
return;
reflectionService.RegisterRobustAssemblies(engine);
harmonyService.CreateInstance();
IDisposable? metricServer = null;
if (MetricEnabled)
{
MetricsEnabledPatcher.ApplyPatch(reflectionService, harmonyService);
metricServer = RunHelper.RunMetric(prometheusAssembly);
}
await Task.Run(() => loader.Main(args), cancellationToken);
metricServer?.Dispose();
}
}
public static class MetricsEnabledPatcher
{
public static void ApplyPatch(ReflectionService reflectionService, HarmonyService harmonyService)
{
var harmony = harmonyService.Instance.Harmony;
var targetType = reflectionService.GetType("Robust.Shared.GameObjects.EntitySystemManager");
var targetMethod = targetType.GetProperty("MetricsEnabled").GetGetMethod();
var prefix = typeof(MetricsEnabledPatcher).GetMethod(nameof(MetricsEnabledGetterPrefix),
BindingFlags.Static | BindingFlags.NonPublic);
var prefixMethod = new HarmonyMethod(prefix);
harmony.Patch(targetMethod, prefix: prefixMethod);
}
private static bool MetricsEnabledGetterPrefix(ref bool __result)
{
__result = true;
return false; // Skip original method
}
}
public static class RunHelper
{
public static IDisposable RunMetric(Assembly prometheusAssembly)
{
var metricServerType = prometheusAssembly.GetType("Prometheus.MetricServer");
var collectorRegistryType = prometheusAssembly.GetType("Prometheus.CollectorRegistry");
var ctor = metricServerType!.GetConstructor(new Type[]
{
typeof(string),
typeof(int),
typeof(string),
collectorRegistryType!,
typeof(bool)
});
var hostname = "localhost";
var port = 51235;
var url = "metrics/";
object? registry = null;
var useHttps = false;
var metricServerInstance = ctor!.Invoke(new object[] { hostname, port, url, registry!, useHttps });
metricServerType.GetMethod("Start")!.Invoke(metricServerInstance, BindingFlags.Default, null, null, CultureInfo.CurrentCulture);
return (IDisposable)metricServerInstance;
}
}

View File

@@ -28,6 +28,8 @@ public static class CurrentConVar
ConVarBuilder.Build<Dictionary<string, EngineVersionInfo>>("engine.manifest.backup");
public static readonly ConVar<ModulesInfo> ModuleManifestBackup =
ConVarBuilder.Build<ModulesInfo>("module.manifest.backup");
public static readonly ConVar<Dictionary<string, string>> ServerManifestHash =
ConVarBuilder.Build<Dictionary<string, string>>("server.manifest.hash",[]);
public static readonly ConVar<Dictionary<string,string>> DotnetUrl = ConVarBuilder.Build<Dictionary<string,string>>("dotnet.url",
new(){

View File

@@ -1,74 +0,0 @@
using System.Net;
using FluentFTP;
using Nebula.Shared.FileApis.Interfaces;
namespace Nebula.Shared.FileApis;
public class FtpFileApi : IWriteFileApi, IDisposable
{
private readonly string _ftpHost;
private readonly string _username;
private readonly string _password;
private readonly FtpClient Client;
public FtpFileApi(string ftpHost, string username, string password)
{
_ftpHost = ftpHost;
_username = username;
_password = password;
Client = CreateClient();
Client.AutoConnect();
}
public bool Save(string path, Stream input)
{
try
{
var result = Client.UploadStream(input, path, FtpRemoteExists.Overwrite, true);
return result == FtpStatus.Success;
}
catch
{
return false;
}
}
public bool Remove(string path)
{
try
{
Client.DeleteFile(path);
return true;
}
catch
{
return false;
}
}
public bool Has(string path)
{
try
{
return Client.FileExists(path);
}
catch
{
return false;
}
}
private FtpClient CreateClient()
{
var client = new FtpClient(_ftpHost, _username, _password);
client.Config.EncryptionMode = FtpEncryptionMode.None;
client.Config.ValidateAnyCertificate = true;
return client;
}
public void Dispose()
{
Client.Dispose();
}
}

View File

@@ -55,6 +55,11 @@ public class HashApi : IFileApi
return _fileApi.Has(GetManifestPath(item));
}
public bool Remove(RobustManifestItem item)
{
return _fileApi.Remove(GetManifestPath(item));
}
private string GetManifestPath(RobustManifestItem item){
return GetManifestPath(item.Hash);
}

View File

@@ -36,7 +36,7 @@ public sealed record ServerInfo(
[property: JsonPropertyName("auth")] AuthInfo Auth,
[property: JsonPropertyName("build")] BuildInfo Build,
[property: JsonPropertyName("desc")] string Desc,
[property: JsonPropertyName("links")] List<ServerLink> Links);
[property: JsonPropertyName("links")] List<ServerLink>? Links);
public sealed record EngineVersionInfo(
[property: JsonPropertyName("insecure")]

View File

@@ -11,7 +11,6 @@
<EmbeddedResource Include="Utils\runtime.json">
<LogicalName>Utility.runtime.json</LogicalName>
</EmbeddedResource>
<PackageReference Include="FluentFTP" Version="52.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0" />
<PackageReference Include="Robust.Natives" Version="0.1.1" />
<PackageReference Include="SharpZstd.Interop" Version="1.5.6" />

View File

@@ -112,7 +112,7 @@ public class ConfigurationService
return false;
}
public void SetConfigValue<T>(ConVar<T> conVar, T value)
public void SetConfigValue<T>(ConVar<T> conVar, T? value)
{
if (value == null)
{

View File

@@ -13,10 +13,24 @@ public partial class ContentService
{
public readonly IReadWriteFileApi ContentFileApi = fileService.CreateFileApi("content");
public readonly IReadWriteFileApi ManifestFileApi = fileService.CreateFileApi("manifest");
public bool CheckManifestExist(RobustManifestItem item)
public void SetServerHash(string address, string hash)
{
return ContentFileApi.Has(item.Hash);
var dict = varService.GetConfigValue(CurrentConVar.ServerManifestHash)!;
if (dict.TryGetValue(address, out var oldHash))
{
if(oldHash == hash) return;
ManifestFileApi.Remove(oldHash);
}
dict[address] = hash;
varService.SetConfigValue(CurrentConVar.ServerManifestHash, dict);
}
public HashApi CreateHashApi(List<RobustManifestItem> manifestItems)
{
return new HashApi(manifestItems, ContentFileApi);
}
public async Task<HashApi> EnsureItems(ManifestReader manifestReader, Uri downloadUri,
@@ -34,7 +48,7 @@ public partial class ContentService
allItems.Add(item.Value);
}
var hashApi = new HashApi(allItems, ContentFileApi);
var hashApi = CreateHashApi(allItems);
items = allItems.Where(a=> !hashApi.Has(a)).ToList();
@@ -54,6 +68,8 @@ public partial class ContentService
_logger.Log("Loading manifest from: " + info.Hash);
return await EnsureItems(new ManifestReader(stream), info.DownloadUri, loadingHandler, cancellationToken);
}
SetServerHash(info.ManifestUri.ToString(), info.Hash);
_logger.Log("Fetching manifest from: " + info.ManifestUri);

View File

@@ -9,7 +9,7 @@ public partial class ContentService
{
_logger.Log("Checking migration...");
var migrationList = ContentFileApi.AllFiles.Where(f => !f.Contains("\\")).ToList();
var migrationList = ContentFileApi.AllFiles.Where(f => !f.Contains('\\')).ToList();
if(migrationList.Count == 0) return false;
_logger.Log($"Found {migrationList.Count} migration files. Starting migration...");

View File

@@ -1,5 +1,4 @@
using System.Data;
using Nebula.Shared.Models;
using Nebula.Shared.Models;
using Nebula.Shared.Services.Logging;
namespace Nebula.Shared.Services;
@@ -28,4 +27,10 @@ public partial class ContentService(
return info;
}
public void RemoveAllContent(ILoadingHandler loadingHandler, CancellationToken cancellationToken)
{
fileService.RemoveAllFiles("content", loadingHandler, cancellationToken);
fileService.RemoveAllFiles("manifest", loadingHandler, cancellationToken);
}
}

View File

@@ -1,8 +1,8 @@
using System.IO.Compression;
using System.Runtime.InteropServices;
using Nebula.Shared.FileApis;
using Nebula.Shared.FileApis.Interfaces;
using Nebula.Shared.Models;
using Nebula.Shared.Services.Logging;
using Robust.LoaderApi;
namespace Nebula.Shared.Services;
@@ -10,14 +10,14 @@ namespace Nebula.Shared.Services;
[ServiceRegister]
public class FileService
{
public static readonly string RootPath = Path.Join(Environment.GetFolderPath(
public static string RootPath = Path.Join(Environment.GetFolderPath(
Environment.SpecialFolder.ApplicationData), "Datum");
private readonly DebugService _debugService;
private readonly ILogger _logger;
public FileService(DebugService debugService)
{
_debugService = debugService;
_logger = debugService.GetLogger(this);
if(!Directory.Exists(RootPath))
Directory.CreateDirectory(RootPath);
@@ -25,6 +25,7 @@ public class FileService
public IReadWriteFileApi CreateFileApi(string path)
{
_logger.Debug($"Creating file api for {path}");
return new FileApi(Path.Join(RootPath, path));
}
@@ -32,6 +33,7 @@ public class FileService
{
path = Path.Combine(Path.GetTempPath(), "tempThink"+Path.GetRandomFileName());
Directory.CreateDirectory(path);
_logger.Debug($"Ensuring temp directory for {path}");
return new FileApi(path);
}
@@ -53,6 +55,38 @@ public class FileService
throw;
}
}
public void RemoveAllFiles(string fileApiName,ILoadingHandler loadingHandler, CancellationToken cancellationToken)
{
_logger.Debug($"Deleting files from {fileApiName}");
var path = Path.Combine(RootPath, fileApiName);
var di = new DirectoryInfo(path);
var files = di.GetFiles();
var dirs = di.GetDirectories();
loadingHandler.AppendJob(files.Length);
loadingHandler.AppendJob(dirs.Length);
if(cancellationToken.IsCancellationRequested)
return;
foreach (var file in files)
{
if(cancellationToken.IsCancellationRequested)
return;
file.Delete();
loadingHandler.AppendResolvedJob();
}
foreach (var dir in dirs)
{
if(cancellationToken.IsCancellationRequested)
return;
dir.Delete(true);
loadingHandler.AppendResolvedJob();
}
}
}
public sealed class ConsoleLoadingHandler : ILoadingHandler

View File

@@ -11,7 +11,7 @@ namespace Nebula.Shared.Services;
[ServiceRegister]
public class RestService
{
private readonly HttpClient _client = new();
private readonly HttpClient _client;
private readonly ILogger _logger;
private readonly JsonSerializerOptions _serializerOptions = new()
@@ -20,8 +20,9 @@ public class RestService
WriteIndented = true
};
public RestService(DebugService debug)
public RestService(DebugService debug, HttpClient? client = null)
{
_client = client ?? new HttpClient();
_logger = debug.GetLogger(this);
}

View File

@@ -94,8 +94,16 @@ public class ManifestReader : StreamReader
{
var line = ReadLine();
if (line == null) return null;
var splited = line.Split(" ");
return new RobustManifestItem(splited[0], line.Substring(splited[0].Length + 1), CurrentId++);
var firstSpaceIndex = line.IndexOf(' ');
if (firstSpaceIndex == -1)
return new RobustManifestItem(line, string.Empty, CurrentId++);
var span = line.AsSpan();
var firstPart = span.Slice(0, firstSpaceIndex);
var secondPart = span.Slice(firstSpaceIndex + 1);
return new RobustManifestItem(firstPart.ToString(), secondPart.ToString(), CurrentId++);
}
public bool TryReadItem([NotNullWhen(true)] out RobustManifestItem? item)

View File

@@ -0,0 +1,8 @@
namespace Nebula.Shared.ViewHelper;
[AttributeUsage(AttributeTargets.Class)]
public class ViewModelRegisterAttribute(Type? type = null, bool isSingleton = true) : Attribute
{
public Type? Type { get; } = type;
public bool IsSingleton { get; } = isSingleton;
}

View File

@@ -71,7 +71,7 @@ partial class {className}
";
// Add the source code to the compilation.
context.AddSource($"{className}.g.cs", SourceText.From(code, Encoding.UTF8));
context.AddSource($"{className}_dependencyAuto.g.cs", SourceText.From(code, Encoding.UTF8));
}
}

View File

@@ -7,24 +7,6 @@ namespace Nebula.SourceGenerators;
public static class SourceHelper
{
public static void GenerateAttribute(string attributeName, string usage,
IncrementalGeneratorInitializationContext context)
{
var attributeSourceCode = $@"// <auto-generated/>
namespace SourceGen
{{
[System.AttributeUsage(System.AttributeTargets.{usage})]
public class {attributeName} : System.Attribute
{{
}}
}}";
context.RegisterPostInitializationOutput(ctx => ctx.AddSource(
$"{attributeName}.g.cs",
SourceText.From(attributeSourceCode, Encoding.UTF8)));
}
public static bool HasAttribute(ISymbol type, string attributeName)
{
foreach (var attribute in type.GetAttributes())

View File

@@ -1,4 +1,6 @@
using System;
using System.Collections.Immutable;
using System.Linq;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
@@ -6,53 +8,82 @@ using Microsoft.CodeAnalysis.Text;
namespace Nebula.SourceGenerators;
//[Generator]
public class ViewConstructGenerator : IIncrementalGenerator
[Generator]
public class ViewConstructorGenerator : IIncrementalGenerator
{
public static string ViewForModelAttributeName = "ViewForModelAttribute";
private static readonly string ViewModelAttribute = "Nebula.Shared.ViewHelper.ViewModelRegisterAttribute";
public void Initialize(IncrementalGeneratorInitializationContext context)
{
var provider = context.SyntaxProvider
.CreateSyntaxProvider(
(s, _) => s is ClassDeclarationSyntax, (ctx, _) =>
SourceHelper.GetClassDeclarationForSourceGen(ctx,ViewForModelAttributeName)
)
(s, _) => s is ClassDeclarationSyntax,
(ctx, _) => SourceHelper.GetClassDeclarationForSourceGen(ctx,ViewModelAttribute))
.Where(t => t.reportAttributeFound)
.Select((t,_) => t.Item1);
context.RegisterSourceOutput(context.CompilationProvider.Combine(provider.Collect()), (ctx,t)=> GenerateCode(ctx, t.Left, t.Right));
.Select((t, _) => t.Item1);
context.RegisterSourceOutput(context.CompilationProvider.Combine(provider.Collect()),
(ctx, t) => GenerateCode(ctx, t.Left, t.Right));
}
private void GenerateCode(SourceProductionContext context, Compilation compilation, ImmutableArray<ClassDeclarationSyntax> syntaxes)
private void GenerateCode(SourceProductionContext context, Compilation compilation,
ImmutableArray<ClassDeclarationSyntax> classDeclarations)
{
foreach (var classDeclarationSyntax in syntaxes)
foreach (var classDeclarationSyntax in classDeclarations)
{
var semanticModel = compilation.GetSemanticModel(classDeclarationSyntax.SyntaxTree);
if(semanticModel.GetDeclaredSymbol(classDeclarationSyntax) is not INamedTypeSymbol classSymbol)
if (semanticModel.GetDeclaredSymbol(classDeclarationSyntax) is not INamedTypeSymbol classSymbol)
continue;
var namespaceName = classSymbol.ContainingNamespace.ToDisplayString();
var className = classDeclarationSyntax.Identifier.Text;
var viewModelName = classSymbol.Name;
var viewModelNamespace = classSymbol.ContainingNamespace.ToDisplayString();
var code = $@"// <auto-generated/>
var viewModelRegisterAttr = classSymbol.GetAttributes()
.FirstOrDefault(attr => attr.AttributeClass?.ToDisplayString() == ViewModelAttribute);
using System;
using System.Collections.Generic;
var viewTypeArg = viewModelRegisterAttr?.ConstructorArguments.FirstOrDefault();
if (viewTypeArg?.Value is not INamedTypeSymbol viewTypeSymbol)
continue;
namespace {namespaceName};
partial class {className}
try
{
var viewName = viewTypeSymbol.Name;
var viewNamespace = viewTypeSymbol.ContainingNamespace.ToDisplayString();
var code = $@"
namespace {viewNamespace}
{{
public {className}() : base(){{
public partial class {viewName}
{{
public {viewName}({viewModelNamespace}.{viewModelName} viewModel)
: this()
{{
DataContext = viewModel;
}}
}}
}}
";
}}";
// Add the source code to the compilation.
context.AddSource($"{viewName}_viewConstructAuto.g.cs", SourceText.From(code, Encoding.UTF8));
}
catch (Exception e)
{
var coder1 = $@"
// <auto-generated/>
// Error!
namespace {viewModelNamespace}
{{
public partial class {viewModelName}
{{
// {e.Message}
}}
}}";
// Add the source code to the compilation.
context.AddSource($"{className}.g.cs", SourceText.From(code, Encoding.UTF8));
// Add the source code to the compilation.
context.AddSource($"{viewModelName}_viewError.g.cs", SourceText.From(coder1, Encoding.UTF8));
}
}
}
}

View File

@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0"/>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="NUnit" Version="3.14.0"/>
<PackageReference Include="NUnit.Analyzers" Version="3.9.0"/>
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0"/>
</ItemGroup>
<ItemGroup>
<Using Include="NUnit.Framework"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Nebula.Packager\Nebula.Packager.csproj" />
<ProjectReference Include="..\Nebula.Shared\Nebula.Shared.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,16 @@
using Microsoft.Extensions.DependencyInjection;
namespace Nebula.UnitTest.NebulaSharedTests;
public abstract class BaseSharedTest
{
protected SharedUnit _sharedUnit = default!;
public abstract void BeforeServiceBuild(IServiceCollection services);
public virtual void Setup()
{
_sharedUnit = TestServiceHelper.GetSharedUnit(BeforeServiceBuild);
}
}

View File

@@ -0,0 +1,90 @@
using Microsoft.Extensions.DependencyInjection;
using Nebula.Shared.Services;
namespace Nebula.UnitTest.NebulaSharedTests;
[TestFixture]
[TestOf(typeof(ConfigurationService))]
public sealed class ConfigurationServiceTests: BaseSharedTest
{
private ConfigurationService _conVarService;
public override void BeforeServiceBuild(IServiceCollection services)
{
TestServiceHelper.InitFileServiceTest();
}
[SetUp]
public override void Setup()
{
base.Setup();
_conVarService = _sharedUnit.GetService<ConfigurationService>();
}
[Test]
public void GetDefaultConVarTest()
{
var value = _conVarService.GetConfigValue(TestConVar.SimpleConvar);
Assert.NotNull(value);
Assert.That(value, Is.EqualTo(TestConVar.SimpleConvar.DefaultValue));
}
[Test]
public void GetNullConVarTest()
{
var value = _conVarService.GetConfigValue(TestConVar.NullConvar);
Assert.Null(value);
}
[Test]
public void WriteConVarTest()
{
var value = _conVarService.GetConfigValue(TestConVar.SimpleConvar);
Assert.That(value, Is.EqualTo(TestConVar.SimpleConvar.DefaultValue));
_conVarService.SetConfigValue(TestConVar.SimpleConvar, "notdefault");
value = _conVarService.GetConfigValue(TestConVar.SimpleConvar);
Assert.That(value, Is.Not.EqualTo(TestConVar.SimpleConvar.DefaultValue));
Assert.That(value, Is.EqualTo("notdefault"));
_conVarService.SetConfigValue(TestConVar.SimpleConvar, null);
value = _conVarService.GetConfigValue(TestConVar.SimpleConvar);
Assert.That(value, Is.EqualTo(TestConVar.SimpleConvar.DefaultValue));
}
[Test]
public void WriteComplexConvarTest()
{
var testVar = new TestVarObject("Alex", 2);
_conVarService.SetConfigValue(TestConVar.TestVarObject, testVar);
var value = _conVarService.GetConfigValue(TestConVar.TestVarObject);
Assert.That(value, Is.EqualTo(testVar));
_conVarService.SetConfigValue(TestConVar.TestVarObject, default);
}
[Test]
public void WriteArrayConvarTest()
{
var testVarArr = new[] { new TestVarObject("Alex", 2), new TestVarObject("Vitya", 3) };
_conVarService.SetConfigValue(TestConVar.TestVarArray, testVarArr);
var value = _conVarService.GetConfigValue(TestConVar.TestVarArray);
Assert.NotNull(value);
Assert.That(testVarArr.SequenceEqual(value));
_conVarService.SetConfigValue(TestConVar.TestVarArray, null);
}
}
public static class TestConVar
{
public static ConVar<string> SimpleConvar = ConVarBuilder.Build("test.convarsimple", "test");
public static ConVar<string?> NullConvar = ConVarBuilder.Build<string?>("test.convarsimplenull");
public static ConVar<TestVarObject> TestVarObject = ConVarBuilder.Build<TestVarObject>("test.convarobject", default);
public static ConVar<TestVarObject[]> TestVarArray = ConVarBuilder.Build<TestVarObject[]>("test.convarobject.array");
}
public record struct TestVarObject(string Name, int Count);

View File

@@ -0,0 +1,123 @@
using System.IO.Compression;
using Microsoft.Extensions.DependencyInjection;
using Moq;
using Nebula.Shared.Models;
using Nebula.Shared.Services;
using Robust.LoaderApi;
namespace Nebula.UnitTest.NebulaSharedTests;
[TestFixture]
[TestOf(typeof(FileService))]
public class FileServiceTests : BaseSharedTest
{
private FileService _fileService = default!;
public override void BeforeServiceBuild(IServiceCollection services)
{
TestServiceHelper.InitFileServiceTest();
}
[SetUp]
public override void Setup()
{
base.Setup();
_fileService = _sharedUnit.GetService<FileService>();
}
[Test]
public void CreateFileApi_CreatesCorrectPath()
{
var subPath = "test-folder";
var fileApi = _fileService.CreateFileApi(subPath);
using (var stream = new MemoryStream("test"u8.ToArray()))
{
fileApi.Save("test.txt", stream);
}
var expectedPath = Path.Combine(FileService.RootPath, subPath);
Assert.That(Directory.Exists(expectedPath), Is.True, $"Expected path to be created: {expectedPath}");
}
[Test]
public void EnsureTempDir_CreatesDirectoryAndReturnsApi()
{
var api = _fileService.EnsureTempDir(out var path);
Assert.That(Directory.Exists(path), Is.True);
Assert.That(api, Is.Not.Null);
}
[Test]
public void OpenZip_ReturnsZipFileApi_WhenValid()
{
var testZipPath = Path.Combine(FileService.RootPath, "test.zip");
using (var archive = ZipFile.Open(testZipPath, ZipArchiveMode.Create))
{
var entry = archive.CreateEntry("test.txt");
using var streamWriter = new StreamWriter(entry.Open());
streamWriter.Write(testZipPath);
streamWriter.Flush();
}
IDisposable? streamDisposable = null;
var mockFileApi = new Mock<IFileApi>();
mockFileApi
.Setup(x => x.TryOpen(testZipPath, out It.Ref<Stream>.IsAny))
.Returns((string _, out Stream stream) =>
{
stream = File.OpenRead(testZipPath);
streamDisposable = stream;
return true;
});
var zipApi = _fileService.OpenZip(testZipPath, mockFileApi.Object);
Assert.That(zipApi, Is.Not.Null);
Assert.That(zipApi.TryOpen("test.txt", out var textStream), Is.True);
using (var reader = new StreamReader(textStream!))
{
Assert.That(reader.ReadToEnd(), Is.EqualTo(testZipPath));
}
textStream!.Dispose();
streamDisposable?.Dispose();
File.Delete(testZipPath);
}
[Test]
public void RemoveAllFiles_DeletesAllFilesAndDirectories()
{
var testDir = Path.Combine(FileService.RootPath, "cleanup-test");
Directory.CreateDirectory(testDir);
File.WriteAllText(Path.Combine(testDir, "test1.txt"), "data");
Directory.CreateDirectory(Path.Combine(testDir, "subdir"));
var mockHandler = new Mock<ILoadingHandler>();
mockHandler.Setup(x => x.AppendJob(It.IsAny<int>())).Verifiable();
mockHandler.Setup(x => x.AppendResolvedJob(It.IsAny<int>())).Verifiable();
_fileService.RemoveAllFiles("cleanup-test", mockHandler.Object, CancellationToken.None);
Assert.That(Directory.Exists(testDir), Is.True);
Assert.That(Directory.GetFiles(testDir).Length, Is.EqualTo(0));
Assert.That(Directory.GetDirectories(testDir).Length, Is.EqualTo(0));
}
[Test]
public void OpenZip_ThrowsException_WhenFileApiFails()
{
var mockFileApi = new Mock<IFileApi>();
mockFileApi.Setup(x => x.TryOpen(It.IsAny<string>(), out It.Ref<Stream>.IsAny))
.Returns(false);
var result = _fileService.OpenZip("invalid.zip", mockFileApi.Object);
Assert.That(result, Is.Null);
}
}

View File

@@ -0,0 +1,42 @@
using Microsoft.Extensions.DependencyInjection;
using Nebula.Shared.Services;
namespace Nebula.UnitTest.NebulaSharedTests;
[TestFixture]
[TestOf(nameof(PopupMessageService))]
public class PopupMessageServiceTests : BaseSharedTest
{
public override void BeforeServiceBuild(IServiceCollection services)
{
}
[SetUp]
public override void Setup()
{
base.Setup();
var popupService = _sharedUnit.GetService<PopupMessageService>();
popupService.OnCloseRequired = (popup) => ((IDisposable)popup).Dispose();
}
[Test]
public void DisposeTest()
{
var popup = new TestPopup();
var popupService = _sharedUnit.GetService<PopupMessageService>();
popupService.ClosePopup(popup);
Assert.That(popup.Disposed, Is.True);
}
private sealed class TestPopup : IDisposable
{
public bool Disposed { get; private set; }
public void Dispose()
{
Disposed = true;
}
}
}

View File

@@ -0,0 +1,77 @@
using System.Net;
using System.Text;
using System.Text.Json;
using Microsoft.Extensions.DependencyInjection;
using Moq;
using Moq.Protected;
using Nebula.Shared.Services;
namespace Nebula.UnitTest.NebulaSharedTests;
[TestFixture]
[TestOf(typeof(RestService))]
public class RestServiceTests : BaseSharedTest
{
public static readonly TestDto ExpectedObject = new()
{
Id = 1,
Name = "Test",
};
public static string ObjectString => JsonSerializer.Serialize(ExpectedObject, SerializerOptions);
public static readonly JsonSerializerOptions SerializerOptions = new() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
public override void BeforeServiceBuild(IServiceCollection services)
{
var mockHandler = new Mock<HttpMessageHandler>();
mockHandler
.Protected()
.Setup<Task<HttpResponseMessage>>("SendAsync",
ItExpr.IsAny<HttpRequestMessage>(),
ItExpr.IsAny<CancellationToken>())
.ReturnsAsync(new HttpResponseMessage
{
StatusCode = HttpStatusCode.OK,
Content = new StringContent(ObjectString, Encoding.UTF8, "application/json")
});
var client = new HttpClient(mockHandler.Object);
services.AddSingleton(client);
}
[SetUp]
public override void Setup()
{
base.Setup();
}
[Test]
public async Task GetTest()
{
var restService = _sharedUnit.GetService<RestService>();
var result = await restService.GetAsync<TestDto>(new Uri("http://localhost/test"), CancellationToken.None);
Assert.NotNull(result);
Assert.That(result.Id, Is.EqualTo(ExpectedObject.Id));
Assert.That(result.Name, Is.EqualTo(ExpectedObject.Name));
}
[Test]
public async Task PostTest()
{
var restService = _sharedUnit.GetService<RestService>();
var result = await restService.PostAsync<TestDto, TestDto>(ExpectedObject,new Uri("http://localhost/test"), CancellationToken.None);
Assert.NotNull(result);
Assert.That(result.Id, Is.EqualTo(ExpectedObject.Id));
Assert.That(result.Name, Is.EqualTo(ExpectedObject.Name));
}
public class TestDto
{
public int Id { get; set; }
public string Name { get; set; }
}
}

View File

@@ -0,0 +1,46 @@
using Microsoft.Extensions.DependencyInjection;
using Nebula.Shared;
using Nebula.Shared.Services;
namespace Nebula.UnitTest;
public static class TestServiceHelper
{
public static SharedUnit GetSharedUnit(Action<IServiceCollection> beforeServiceBuild)
{
var services = new ServiceCollection();
beforeServiceBuild.Invoke(services);
services.AddServices();
var serviceProvider = services.BuildServiceProvider();
return new SharedUnit(serviceProvider);
}
public static void InitFileServiceTest()
{
var path = Path.Combine(Path.GetTempPath(), "tempThink"+Path.GetRandomFileName());
Directory.CreateDirectory(path);
FileService.RootPath = path;
Console.WriteLine("Change root path for file api: " + FileService.RootPath);
}
}
public sealed class LauncherUnit : SharedUnit
{
public LauncherUnit(IServiceProvider serviceProvider) : base(serviceProvider)
{
}
}
public class SharedUnit
{
public SharedUnit(IServiceProvider serviceProvider)
{
ServiceProvider = serviceProvider;
}
public IServiceProvider ServiceProvider { get; }
public T GetService<T>() where T : notnull => ServiceProvider.GetRequiredService<T>();
}

View File

@@ -14,6 +14,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nebula.UpdateResolver", "Ne
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nebula.Packager", "Nebula.Packager\Nebula.Packager.csproj", "{D444A5F9-4549-467F-9398-97DD6DB1E263}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nebula.UnitTest", "Nebula.UnitTest\Nebula.UnitTest.csproj", "{735691F8-949C-4476-B9E4-5DF6FF8D3D0B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -48,5 +50,9 @@ Global
{D444A5F9-4549-467F-9398-97DD6DB1E263}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D444A5F9-4549-467F-9398-97DD6DB1E263}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D444A5F9-4549-467F-9398-97DD6DB1E263}.Release|Any CPU.Build.0 = Release|Any CPU
{735691F8-949C-4476-B9E4-5DF6FF8D3D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{735691F8-949C-4476-B9E4-5DF6FF8D3D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{735691F8-949C-4476-B9E4-5DF6FF8D3D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{735691F8-949C-4476-B9E4-5DF6FF8D3D0B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@@ -1,5 +1,6 @@
<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_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>
@@ -11,6 +12,7 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AControl_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F57361bc4e5442f644ff63ec7e745da2eb4bbb6c769d1fb683bab5f6f952b1ab_003FControl_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADecorator_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Feecfe7fcb95caaf3978fdce4ae36e346b34986d1d844b0dce2fcb67e5952c_003FDecorator_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADesign_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F9a2912aa19f1b0ab2229159cec21d718356660fc49cd8e5257a66b584b69b_003FDesign_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fe5d623ea960f2c3c9fda144954d339f8d4cd3dad6dd8bd4ab96093a010ab_003FDictionary_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADispatcher_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fe6d04341b5ca8c55e2be617e1b6fc5a12cc8647f7272d94f614ae7fb1c0e8d_003FDispatcher_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADrawingContext_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F7f67edd2b798d6c80b015913cde68b729bfe416b62cf075ea3953ffeff639c_003FDrawingContext_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEnumerable_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fcae7ff14a5884c649c9045d4ef4f987ea0928_003Fa6_003F6011c781_003FEnumerable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -20,30 +22,43 @@
<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>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpListener_002EWindows_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Ffb21cfde6c1ffa9b6be622d15d56f666ad94ada7dd7d81451418d807b98f2_003FHttpListener_002EWindows_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_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_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_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_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>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMetrics_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb07ddb833489431aae882d295a4e94797e00_003F0f_003Fc9e3d448_003FMetrics_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<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_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>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APath_002EWindows_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F8bfc57955751d07e3fad13bb97d5f66af412d7a34486ec29ad916547ec8ce6b_003FPath_002EWindows_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APerfCounterCollector_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb07ddb833489431aae882d295a4e94797e00_003F4f_003F4c0b90e8_003FPerfCounterCollector_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AProcessStartInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fc5ffb8c166be164bc221db4c64e826a1e8ff54f2f1c9ee8e7f9cfabce707fa4_003FProcessStartInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APropertyInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F408236be4b0703755f3ed96daaae245919a792d65ce5eaa672d9fa945b1f_003FPropertyInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AScrollBar_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fda7bce95d5f888176a5f93c8965e402ca33cba794ac7e7aa776363c664488d_003FScrollBar_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AServiceCollectionContainerBuilderExtensions_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fa8ceca48b7b645dd875a40ee6d28725416d08_003F1b_003F6cd78dc8_003FServiceCollectionContainerBuilderExtensions_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AServiceProviderServiceExtensions_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4f1fdec7cbfe4433a7ec3a6d1bd0e54210118_003F04_003Fe2f5322d_003FServiceProviderServiceExtensions_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASingle_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fe27543f11ad92fdb62cde92eebaa1afb3de86a016ad85f76d1554b0389cd3f3_003FSingle_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASR_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc4d71b51722245ae8cde97bfd996e68386928_003F4d_003F9372fe61_003FSR_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStreamReader_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F6a802af2346a87e430fb66291f320aa22871259d47c2bc928a59f14b42aa34_003FStreamReader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AString_002EManipulation_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fe75a5575ba872c8ea754c015cb363850e6c661f39569712d5b74aaca67263c_003FString_002EManipulation_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStyle_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fcfbd5689fdab68d1c02f6a9b3c5921abcc409b8743dcc958da77cc1cfcb8e_003FStyle_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATextBox_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F43273dba3ac6a4e11aefe78fbbccf5d36f07542ca37ecebffb25c95d1a1c16b_003FTextBox_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AType_002ECoreCLR_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F5cde391207de75962d7bacb899ca2bd3985c86911b152d185b58999a422bf0_003FType_002ECoreCLR_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AUri_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F6a1fb5a19c4883d19f63515be2d0cce5e0e9929bb30469a912a58ad2e1e6152_003FUri_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AUserControl_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F0ceaca09f3944680b668dee8e1e0370b100a00_003F76_003F1f1e9043_003FUserControl_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AValuePrinter_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F80d1676fb411442983574149e0b6aebc72e00_003F2f_003F26a40f58_003FValuePrinter_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AZipFileExtensions_002EZipArchive_002ECreate_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F1dd11f63b66adf34b6a6d76e1e0c0fd1df69d78b5fbfdcdf31c67b6bb40e9e4_003FZipFileExtensions_002EZipArchive_002ECreate_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AZipFile_002ECreate_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F5161553fb4bfeb0f7caff73da46449e1fb0d343789e21ff4d481db57d521976_003FZipFile_002ECreate_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -51,4 +66,26 @@
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue">&lt;AssemblyExplorer&gt;&#xD;
&lt;Assembly Path="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\9.0.2\ref\net9.0\System.Net.Http.dll" /&gt;&#xD;
&lt;Assembly Path="C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.2\System.Net.Http.dll" /&gt;&#xD;
&lt;/AssemblyExplorer&gt;</s:String></wpf:ResourceDictionary>
&lt;Assembly Path="C:\Users\Cinka\.nuget\packages\prometheus-net\0.0.2\lib\net40\prometheus-net.dll" /&gt;&#xD;
&lt;Assembly Path="C:\Users\Cinka\.nuget\packages\microsoft.extensions.objectpool\7.0.0\lib\net7.0\Microsoft.Extensions.ObjectPool.dll" /&gt;&#xD;
&lt;Assembly Path="C:\Users\Cinka\.nuget\packages\netstandard.library\2.0.3\build\netstandard2.0\ref\netstandard.dll" /&gt;&#xD;
&lt;/AssemblyExplorer&gt;</s:String>
<s:String x:Key="/Default/Environment/UnitTesting/CreateUnitTestDialog/TestProjectMapping/=47519EA2_002D03C0_002D49D8_002D86CA_002D418F6B7267A4/@EntryIndexedValue">735691F8-949C-4476-B9E4-5DF6FF8D3D0B</s:String>
<s:String x:Key="/Default/Environment/UnitTesting/CreateUnitTestDialog/TestTemplateMapping/=NUnit3x/@EntryIndexedValue">db4927dd-2e12-48a7-9a84-2b7e3e31b9c8</s:String>
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=d7603912_002D51de_002D4bca_002D9082_002D886ee6d4c2f5/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" IsActive="True" Name="RestServiceTests" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;&#xD;
&lt;TestAncestor&gt;&#xD;
&lt;TestId&gt;NUnit3x::735691F8-949C-4476-B9E4-5DF6FF8D3D0B::net9.0::Nebula.UnitTest.NebulaSharedTests.RestServiceTests&lt;/TestId&gt;&#xD;
&lt;TestId&gt;NUnit3x::735691F8-949C-4476-B9E4-5DF6FF8D3D0B::net9.0::Nebula.UnitTest.NebulaSharedTests.PopupMessageServiceTests.PopupMessageServiceTest&lt;/TestId&gt;&#xD;
&lt;TestId&gt;NUnit3x::735691F8-949C-4476-B9E4-5DF6FF8D3D0B::net9.0::Nebula.UnitTest.NebulaSharedTests.PopupMessageServiceTests.DisposeTest&lt;/TestId&gt;&#xD;
&lt;TestId&gt;NUnit3x::735691F8-949C-4476-B9E4-5DF6FF8D3D0B::net9.0::Nebula.UnitTest.NebulaSharedTests.FileServiceTests.CreateFileApi_CreatesCorrectPath&lt;/TestId&gt;&#xD;
&lt;TestId&gt;NUnit3x::735691F8-949C-4476-B9E4-5DF6FF8D3D0B::net9.0::Nebula.UnitTest.NebulaSharedTests.FileServiceTests.EnsureTempDir_CreatesDirectoryAndReturnsApi&lt;/TestId&gt;&#xD;
&lt;TestId&gt;NUnit3x::735691F8-949C-4476-B9E4-5DF6FF8D3D0B::net9.0::Nebula.UnitTest.NebulaSharedTests.FileServiceTests.OpenZip_ReturnsZipFileApi_WhenValid&lt;/TestId&gt;&#xD;
&lt;TestId&gt;NUnit3x::735691F8-949C-4476-B9E4-5DF6FF8D3D0B::net9.0::Nebula.UnitTest.NebulaSharedTests.FileServiceTests.RemoveAllFiles_DeletesAllFilesAndDirectories&lt;/TestId&gt;&#xD;
&lt;TestId&gt;NUnit3x::735691F8-949C-4476-B9E4-5DF6FF8D3D0B::net9.0::Nebula.UnitTest.NebulaSharedTests.FileServiceTests.OpenZip_ThrowsException_WhenFileApiFails&lt;/TestId&gt;&#xD;
&lt;TestId&gt;NUnit3x::735691F8-949C-4476-B9E4-5DF6FF8D3D0B::net9.0::Nebula.UnitTest.NebulaSharedTests.EngineServiceTests.GetVersionInfo_ReturnsCorrectBuildInfo&lt;/TestId&gt;&#xD;
&lt;TestId&gt;NUnit3x::735691F8-949C-4476-B9E4-5DF6FF8D3D0B::net9.0::Nebula.UnitTest.NebulaSharedTests.EngineServiceTests.TryGetVersionInfo_ReturnsTrue&lt;/TestId&gt;&#xD;
&lt;TestId&gt;NUnit3x::735691F8-949C-4476-B9E4-5DF6FF8D3D0B::net9.0::Nebula.UnitTest.NebulaSharedTests.ConfigurationServiceTests.WriteConVarTest&lt;/TestId&gt;&#xD;
&lt;TestId&gt;NUnit3x::735691F8-949C-4476-B9E4-5DF6FF8D3D0B::net9.0::Nebula.UnitTest.NebulaSharedTests.ConfigurationServiceTests.WriteArrayConvarTest&lt;/TestId&gt;&#xD;
&lt;TestId&gt;NUnit3x::735691F8-949C-4476-B9E4-5DF6FF8D3D0B::net9.0::Nebula.UnitTest.NebulaSharedTests.ConfigurationServiceTests&lt;/TestId&gt;&#xD;
&lt;/TestAncestor&gt;&#xD;
&lt;/SessionState&gt;</s:String></wpf:ResourceDictionary>