1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2025-04-07 20:15:46 +02:00

Remove unnecessary trailing spaces

This commit is contained in:
chylex 2023-10-22 23:05:24 +02:00
parent 339b958e45
commit 627e7436fd
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548
95 changed files with 95 additions and 95 deletions
Agent
Common
Controller
Utils
Web

View File

@ -1,4 +1,4 @@
namespace Phantom.Agent.Minecraft.Command;
namespace Phantom.Agent.Minecraft.Command;
public static class MinecraftCommand {
public const string SaveOn = "save-on";

View File

@ -1,7 +1,7 @@
using Phantom.Utils.Collections;
using Phantom.Utils.Processes;
namespace Phantom.Agent.Minecraft.Instance;
namespace Phantom.Agent.Minecraft.Instance;
public sealed class InstanceProcess : IDisposable {
public InstanceProperties InstanceProperties { get; }

View File

@ -1,6 +1,6 @@
using Phantom.Common.Data.Java;
namespace Phantom.Agent.Minecraft.Java;
namespace Phantom.Agent.Minecraft.Java;
public sealed class JavaRuntimeExecutable {
internal string ExecutablePath { get; }

View File

@ -1,6 +1,6 @@
using Phantom.Agent.Minecraft.Java;
using Phantom.Agent.Minecraft.Server;
namespace Phantom.Agent.Minecraft.Launcher;
namespace Phantom.Agent.Minecraft.Launcher;
public sealed record LaunchServices(MinecraftServerExecutables ServerExecutables, JavaRuntimeRepository JavaRuntimeRepository);

View File

@ -3,7 +3,7 @@ using Phantom.Agent.Minecraft.Instance;
using Phantom.Utils.IO;
using Serilog;
namespace Phantom.Agent.Minecraft.Launcher.Types;
namespace Phantom.Agent.Minecraft.Launcher.Types;
public sealed class FabricLauncher : BaseLauncher {
public FabricLauncher(InstanceProperties instanceProperties) : base(instanceProperties) {}

View File

@ -1,7 +1,7 @@
using Phantom.Agent.Minecraft.Server;
using Serilog;
namespace Phantom.Agent.Minecraft.Launcher.Types;
namespace Phantom.Agent.Minecraft.Launcher.Types;
public sealed class InvalidLauncher : IServerLauncher {
public static InvalidLauncher Instance { get; } = new ();

View File

@ -1,6 +1,6 @@
using Phantom.Agent.Minecraft.Instance;
namespace Phantom.Agent.Minecraft.Launcher.Types;
namespace Phantom.Agent.Minecraft.Launcher.Types;
public sealed class VanillaLauncher : BaseLauncher {
public VanillaLauncher(InstanceProperties instanceProperties) : base(instanceProperties) {}

View File

@ -1,6 +1,6 @@
using Phantom.Agent.Minecraft.Java;
namespace Phantom.Agent.Minecraft.Properties;
namespace Phantom.Agent.Minecraft.Properties;
abstract class MinecraftServerProperty<T> {
private readonly string key;

View File

@ -1,4 +1,4 @@
namespace Phantom.Agent.Minecraft.Server;
namespace Phantom.Agent.Minecraft.Server;
public sealed class DownloadProgressEventArgs : EventArgs {
public ulong DownloadedBytes { get; }

View File

@ -1,3 +1,3 @@
namespace Phantom.Agent.Minecraft.Server;
namespace Phantom.Agent.Minecraft.Server;
sealed record MinecraftServerExecutableDownloadListener(EventHandler<DownloadProgressEventArgs> DownloadProgressEventHandler, CancellationToken CancellationToken);

View File

@ -6,7 +6,7 @@ using System.Text;
using Phantom.Common.Logging;
using Serilog;
namespace Phantom.Agent.Minecraft.Server;
namespace Phantom.Agent.Minecraft.Server;
public sealed class ServerStatusProtocol {
private readonly ILogger logger;

View File

@ -4,7 +4,7 @@ using Phantom.Common.Messages;
using Phantom.Common.Messages.BiDirectional;
using Phantom.Utils.Rpc.Message;
namespace Phantom.Agent.Rpc;
namespace Phantom.Agent.Rpc;
public sealed class RpcServerConnection {
private readonly ClientSocket socket;

View File

@ -1,3 +1,3 @@
namespace Phantom.Agent.Services;
namespace Phantom.Agent.Services;
public readonly record struct AgentServiceConfiguration(int MaxConcurrentCompressionTasks);

View File

@ -7,7 +7,7 @@ using Phantom.Common.Logging;
using Phantom.Utils.IO;
using Serilog;
namespace Phantom.Agent.Services.Backups;
namespace Phantom.Agent.Services.Backups;
sealed class BackupArchiver {
private readonly string destinationBasePath;

View File

@ -2,7 +2,7 @@
using Phantom.Utils.Processes;
using Serilog;
namespace Phantom.Agent.Services.Backups;
namespace Phantom.Agent.Services.Backups;
static class BackupCompressor {
private static ILogger Logger { get; } = PhantomLogger.Create(nameof(BackupCompressor));

View File

@ -23,7 +23,7 @@ sealed class BackupScheduler : CancellableBackgroundTask {
private readonly ServerStatusProtocol serverStatusProtocol;
private readonly ManualResetEventSlim serverOutputWhileWaitingForOnlinePlayers = new ();
public event EventHandler<BackupCreationResult>? BackupCompleted;
public event EventHandler<BackupCreationResult>? BackupCompleted;
public BackupScheduler(TaskManager taskManager, BackupManager backupManager, InstanceProcess process, IInstanceContext context, int serverPort) : base(PhantomLogger.Create<BackupScheduler>(context.ShortName), taskManager, "Backup scheduler for " + context.ShortName) {
this.backupManager = backupManager;

View File

@ -3,7 +3,7 @@ using Phantom.Agent.Services.Instances.States;
using Phantom.Common.Data.Instance;
using Serilog;
namespace Phantom.Agent.Services.Instances;
namespace Phantom.Agent.Services.Instances;
interface IInstanceContext {
string ShortName { get; }

View File

@ -27,7 +27,7 @@ sealed class Instance : IAsyncDisposable {
private IInstanceState currentState;
public bool IsRunning => currentState is not InstanceNotRunningState;
public event EventHandler? IsRunningChanged;
public event EventHandler? IsRunningChanged;
private readonly InstanceProcedureManager procedureManager;

View File

@ -2,6 +2,6 @@
using Phantom.Agent.Services.Backups;
using Phantom.Utils.Tasks;
namespace Phantom.Agent.Services.Instances;
namespace Phantom.Agent.Services.Instances;
sealed record InstanceServices(TaskManager TaskManager, PortManager PortManager, BackupManager BackupManager, LaunchServices LaunchServices);

View File

@ -1,6 +1,6 @@
using Phantom.Agent.Services.Instances.States;
namespace Phantom.Agent.Services.Instances.Procedures;
namespace Phantom.Agent.Services.Instances.Procedures;
interface IInstanceProcedure {
Task<IInstanceState?> Run(IInstanceContext context, CancellationToken cancellationToken);

View File

@ -1,4 +1,4 @@
namespace Phantom.Agent.Services.Instances.States;
namespace Phantom.Agent.Services.Instances.States;
interface IInstanceState {
void Initialize();

View File

@ -1,4 +1,4 @@
namespace Phantom.Agent.Services.Instances.States;
namespace Phantom.Agent.Services.Instances.States;
sealed class InstanceNotRunningState : IInstanceState {
public void Initialize() {}

View File

@ -3,7 +3,7 @@ using Phantom.Common.Logging;
using Phantom.Utils.IO;
using Serilog;
namespace Phantom.Agent;
namespace Phantom.Agent;
static class GuidFile {
private static ILogger Logger { get; } = PhantomLogger.Create(nameof(GuidFile));

View File

@ -1,6 +1,6 @@
using NUnit.Framework;
namespace Phantom.Common.Data.Tests;
namespace Phantom.Common.Data.Tests;
[TestFixture]
public sealed class AllowedPortsTests {

View File

@ -1,4 +1,4 @@
namespace Phantom.Common.Data.Instance;
namespace Phantom.Common.Data.Instance;
public interface IInstanceEventVisitor {
void OnLaunchSucceeded(InstanceLaunchSuccededEvent e);

View File

@ -1,7 +1,7 @@
using MemoryPack;
using Phantom.Common.Data.Minecraft;
namespace Phantom.Common.Data.Instance;
namespace Phantom.Common.Data.Instance;
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial record InstanceLaunchProperties(

View File

@ -1,6 +1,6 @@
using MemoryPack;
namespace Phantom.Common.Data.Java;
namespace Phantom.Common.Data.Java;
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial record TaggedJavaRuntime(

View File

@ -2,7 +2,7 @@
using Phantom.Utils.Cryptography;
using Phantom.Utils.IO;
namespace Phantom.Common.Data.Minecraft;
namespace Phantom.Common.Data.Minecraft;
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial class FileDownloadInfo {

View File

@ -1,4 +1,4 @@
namespace Phantom.Common.Data.Minecraft;
namespace Phantom.Common.Data.Minecraft;
public enum MinecraftServerKind : ushort {
Vanilla = 1,

View File

@ -1,4 +1,4 @@
namespace Phantom.Common.Data.Minecraft;
namespace Phantom.Common.Data.Minecraft;
public sealed record MinecraftVersion(
string Id,

View File

@ -1,4 +1,4 @@
namespace Phantom.Common.Data.Replies;
namespace Phantom.Common.Data.Replies;
public enum ConfigureInstanceResult : byte {
Success

View File

@ -1,4 +1,4 @@
namespace Phantom.Common.Data.Replies;
namespace Phantom.Common.Data.Replies;
public enum RegisterAgentFailure : byte {
ConnectionAlreadyHasAnAgent,

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Serilog.Events;
namespace Phantom.Common.Logging;
namespace Phantom.Common.Logging;
static class DefaultLogLevel {
private const string ENVIRONMENT_VARIABLE = "LOG_LEVEL";

View File

@ -1,6 +1,6 @@
using Serilog;
namespace Phantom.Common.Logging;
namespace Phantom.Common.Logging;
public static class LoggerExtensions {
private static readonly string HeadingPadding = new (' ', 23);

View File

@ -2,7 +2,7 @@
using Phantom.Common.Messages.ToServer;
using Phantom.Utils.Rpc.Message;
namespace Phantom.Common.Messages;
namespace Phantom.Common.Messages;
public interface IMessageToServerListener {
bool IsDisposed { get; }

View File

@ -5,7 +5,7 @@ using Phantom.Common.Messages.ToAgent;
using Phantom.Common.Messages.ToServer;
using Phantom.Utils.Rpc.Message;
namespace Phantom.Common.Messages;
namespace Phantom.Common.Messages;
public static class MessageRegistries {
public static MessageRegistry<IMessageToAgentListener> ToAgent { get; } = new (PhantomLogger.Create("MessageRegistry:ToAgent"));

View File

@ -1,7 +1,7 @@
using MemoryPack;
using Phantom.Common.Data.Replies;
namespace Phantom.Common.Messages.ToAgent;
namespace Phantom.Common.Messages.ToAgent;
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial record LaunchInstanceMessage(

View File

@ -1,7 +1,7 @@
using MemoryPack;
using Phantom.Common.Data.Replies;
namespace Phantom.Common.Messages.ToAgent;
namespace Phantom.Common.Messages.ToAgent;
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial record SendCommandToInstanceMessage(

View File

@ -2,7 +2,7 @@
using Phantom.Common.Data.Minecraft;
using Phantom.Common.Data.Replies;
namespace Phantom.Common.Messages.ToAgent;
namespace Phantom.Common.Messages.ToAgent;
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial record StopInstanceMessage(

View File

@ -3,7 +3,7 @@ using MemoryPack;
using Phantom.Common.Data.Java;
using Phantom.Utils.Rpc.Message;
namespace Phantom.Common.Messages.ToServer;
namespace Phantom.Common.Messages.ToServer;
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial record AdvertiseJavaRuntimesMessage(

View File

@ -1,7 +1,7 @@
using MemoryPack;
using Phantom.Utils.Rpc.Message;
namespace Phantom.Common.Messages.ToServer;
namespace Phantom.Common.Messages.ToServer;
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial record AgentIsAliveMessage : IMessageToServer {

View File

@ -2,7 +2,7 @@
using Phantom.Common.Data;
using Phantom.Utils.Rpc.Message;
namespace Phantom.Common.Messages.ToServer;
namespace Phantom.Common.Messages.ToServer;
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial record ReportAgentStatusMessage(

View File

@ -2,7 +2,7 @@
using Phantom.Common.Data.Instance;
using Phantom.Utils.Rpc.Message;
namespace Phantom.Common.Messages.ToServer;
namespace Phantom.Common.Messages.ToServer;
[MemoryPackable(GenerateType.VersionTolerant)]
public sealed partial record ReportInstanceEventMessage(

View File

@ -1,6 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
namespace Phantom.Controller.Database;
namespace Phantom.Controller.Database;
public sealed class DatabaseProvider {
private readonly IServiceScopeFactory serviceScopeFactory;

View File

@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Text.Json;
using Phantom.Controller.Database.Enums;
namespace Phantom.Controller.Database.Entities;
namespace Phantom.Controller.Database.Entities;
[Table("AuditLog", Schema = "system")]
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global")]

View File

@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Text.Json;
using Phantom.Controller.Database.Enums;
namespace Phantom.Controller.Database.Entities;
namespace Phantom.Controller.Database.Entities;
[Table("EventLog", Schema = "system")]
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global")]

View File

@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis;
using Phantom.Common.Data;
using Phantom.Common.Data.Minecraft;
namespace Phantom.Controller.Database.Entities;
namespace Phantom.Controller.Database.Entities;
[Table("Instances", Schema = "agents")]
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global")]

View File

@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Phantom.Controller.Database.Entities;
namespace Phantom.Controller.Database.Entities;
[Table("Permissions", Schema = "identity")]
public sealed class PermissionEntity {

View File

@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Phantom.Controller.Database.Entities;
namespace Phantom.Controller.Database.Entities;
[Table("Roles", Schema = "identity")]
public sealed class RoleEntity {

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Phantom.Controller.Database.Entities;
namespace Phantom.Controller.Database.Entities;
[Table("RolePermissions", Schema = "identity")]
public sealed class RolePermissionEntity {

View File

@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Phantom.Controller.Database.Entities;
namespace Phantom.Controller.Database.Entities;
[Table("Users", Schema = "identity")]
public sealed class UserEntity {

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Phantom.Controller.Database.Entities;
namespace Phantom.Controller.Database.Entities;
[Table("UserRoles", Schema = "identity")]
public sealed class UserRoleEntity {

View File

@ -1,4 +1,4 @@
namespace Phantom.Controller.Database.Enums;
namespace Phantom.Controller.Database.Enums;
public enum AuditLogSubjectType {
User,

View File

@ -1,4 +1,4 @@
namespace Phantom.Controller.Database.Enums;
namespace Phantom.Controller.Database.Enums;
public enum EventLogSubjectType {
Instance

View File

@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using Phantom.Controller.Database.Entities;
namespace Phantom.Controller.Database.Factories;
namespace Phantom.Controller.Database.Factories;
public sealed class AgentEntityUpsert : AbstractUpsertHelper<AgentEntity> {
internal AgentEntityUpsert(ApplicationDbContext ctx) : base(ctx) {}

View File

@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using Phantom.Controller.Database.Entities;
namespace Phantom.Controller.Database.Factories;
namespace Phantom.Controller.Database.Factories;
public sealed class InstanceEntityUpsert : AbstractUpsertHelper<InstanceEntity> {
internal InstanceEntityUpsert(ApplicationDbContext ctx) : base(ctx) {}

View File

@ -1,4 +1,4 @@
namespace Phantom.Controller.Rpc;
namespace Phantom.Controller.Rpc;
sealed class RpcClientConnectionClosedEventArgs : EventArgs {
public uint RoutingId { get; }

View File

@ -2,7 +2,7 @@
using Phantom.Common.Data.Java;
using Phantom.Utils.Collections;
namespace Phantom.Controller.Services.Agents;
namespace Phantom.Controller.Services.Agents;
public sealed class AgentJavaRuntimesManager {
private readonly RwLockedDictionary<Guid, ImmutableArray<TaggedJavaRuntime>> runtimes = new (LockRecursionPolicy.NoRecursion);

View File

@ -1,6 +1,6 @@
using System.Text.Json;
using Phantom.Controller.Database.Enums;
namespace Phantom.Controller.Services.Audit;
namespace Phantom.Controller.Services.Audit;
public sealed record AuditLogItem(DateTime UtcTime, Guid? UserGuid, string? UserName, AuditLogEventType EventType, AuditLogSubjectType SubjectType, string? SubjectId, JsonDocument? Data);

View File

@ -4,7 +4,7 @@ using Phantom.Controller.Database.Entities;
using Phantom.Controller.Database.Enums;
using Phantom.Utils.Tasks;
namespace Phantom.Controller.Services.Events;
namespace Phantom.Controller.Services.Events;
public sealed partial class EventLog {
private readonly CancellationToken cancellationToken;

View File

@ -1,6 +1,6 @@
using System.Text.Json;
using Phantom.Controller.Database.Enums;
namespace Phantom.Controller.Services.Events;
namespace Phantom.Controller.Services.Events;
public sealed record EventLogItem(DateTime UtcTime, Guid? AgentGuid, EventLogEventType EventType, EventLogSubjectType SubjectType, string SubjectId, JsonDocument? Data);

View File

@ -1,6 +1,6 @@
using Phantom.Common.Data.Instance;
namespace Phantom.Controller.Services.Instances;
namespace Phantom.Controller.Services.Instances;
public sealed record Instance(
InstanceConfiguration Configuration,

View File

@ -5,7 +5,7 @@ using Phantom.Utils.Collections;
using Phantom.Utils.Events;
using ILogger = Serilog.ILogger;
namespace Phantom.Controller.Services.Instances;
namespace Phantom.Controller.Services.Instances;
public sealed class InstanceLogManager {
private const int RetainedLines = 1000;

View File

@ -3,7 +3,7 @@ using Phantom.Controller.Services.Agents;
using Phantom.Controller.Services.Events;
using Phantom.Controller.Services.Instances;
namespace Phantom.Controller.Services.Rpc;
namespace Phantom.Controller.Services.Rpc;
public sealed class MessageToServerListenerFactory {
private readonly ServiceConfiguration configuration;

View File

@ -1,4 +1,4 @@
namespace Phantom.Controller.Services.Users;
namespace Phantom.Controller.Services.Users;
public enum AddRoleError : byte {
NameIsEmpty,

View File

@ -1,4 +1,4 @@
namespace Phantom.Controller.Services.Users;
namespace Phantom.Controller.Services.Users;
public enum DeleteUserResult : byte {
Deleted,

View File

@ -1,6 +1,6 @@
using Serilog;
namespace Phantom.Utils.Events;
namespace Phantom.Utils.Events;
public abstract class ObservableState<T> {
public EventSubscribers<T> Subs { get; }

View File

@ -1,4 +1,4 @@
namespace Phantom.Utils.Rpc.Message;
namespace Phantom.Utils.Rpc.Message;
public interface IMessage<TListener, TReply> {
Task<TReply> Accept(TListener listener);

View File

@ -1,7 +1,7 @@
using Phantom.Utils.Tasks;
using Serilog;
namespace Phantom.Utils.Rpc.Message;
namespace Phantom.Utils.Rpc.Message;
public abstract class MessageHandler<TListener> {
protected TListener Listener { get; }

View File

@ -1,4 +1,4 @@
namespace Phantom.Utils.Rpc.Message;
namespace Phantom.Utils.Rpc.Message;
public readonly struct NoReply {
public static NoReply Instance { get; } = new ();

View File

@ -1,7 +1,7 @@
using System.Collections.Immutable;
using System.Diagnostics.CodeAnalysis;
namespace Phantom.Utils.Collections;
namespace Phantom.Utils.Collections;
public static class EnumerableExtensions {
[SuppressMessage("ReSharper", "LoopCanBeConvertedToQuery")]

View File

@ -1,4 +1,4 @@
namespace Phantom.Utils.Collections;
namespace Phantom.Utils.Collections;
public sealed class RingBuffer<T> {
private readonly T[] buffer;

View File

@ -1,4 +1,4 @@
namespace Phantom.Utils.Cryptography;
namespace Phantom.Utils.Cryptography;
public static class StableHashCode {
public static int ForString(string str) {

View File

@ -1,4 +1,4 @@
namespace Phantom.Utils.IO;
namespace Phantom.Utils.IO;
public static class Chmod {
public const UnixFileMode URWX = UnixFileMode.UserRead | UnixFileMode.UserWrite | UnixFileMode.UserExecute;

View File

@ -1,4 +1,4 @@
namespace Phantom.Utils.IO;
namespace Phantom.Utils.IO;
public static class Directories {
public static void Create(string path, UnixFileMode mode) {

View File

@ -1,4 +1,4 @@
namespace Phantom.Utils.IO;
namespace Phantom.Utils.IO;
public static class Paths {
public static string ExpandTilde(string path) {

View File

@ -1,6 +1,6 @@
using System.Buffers;
namespace Phantom.Utils.IO;
namespace Phantom.Utils.IO;
public sealed class StreamCopier : IDisposable {
private const int DefaultBufferSize = 81920;

View File

@ -1,7 +1,7 @@
using System.Collections.ObjectModel;
using System.Diagnostics;
namespace Phantom.Utils.Processes;
namespace Phantom.Utils.Processes;
public sealed class ProcessConfigurator {
private readonly ProcessStartInfo startInfo = new () {

View File

@ -1,6 +1,6 @@
using System.Reflection;
namespace Phantom.Utils.Runtime;
namespace Phantom.Utils.Runtime;
public static class AssemblyAttributes {
public static string GetFullVersion(Assembly assembly) {

View File

@ -1,4 +1,4 @@
namespace Phantom.Utils.Runtime;
namespace Phantom.Utils.Runtime;
/// <summary>
/// Custom exception used to signal a procedure should stop. This exception should not be logged or propagated.

View File

@ -1,4 +1,4 @@
namespace Phantom.Utils.Tasks;
namespace Phantom.Utils.Tasks;
public static class AsyncTasks {
public static TaskCompletionSource CreateCompletionSource() {

View File

@ -1,6 +1,6 @@
using Serilog;
namespace Phantom.Utils.Tasks;
namespace Phantom.Utils.Tasks;
public abstract class CancellableBackgroundTask {
private readonly CancellationTokenSource cancellationTokenSource = new ();

View File

@ -2,7 +2,7 @@
using Phantom.Utils.Collections;
using Serilog;
namespace Phantom.Utils.Tasks;
namespace Phantom.Utils.Tasks;
public sealed class TaskManager {
private readonly ILogger logger;

View File

@ -1,4 +1,4 @@
namespace Phantom.Utils.Threading;
namespace Phantom.Utils.Threading;
public sealed class ThreadSafeLinkedList<T> : IDisposable {
private readonly LinkedList<T> list = new ();

View File

@ -1,4 +1,4 @@
namespace Phantom.Utils.Threading;
namespace Phantom.Utils.Threading;
public sealed class ThreadSafeStructRef<T> : IDisposable where T : struct {
private T? value;

View File

@ -1,4 +1,4 @@
namespace Phantom.Web.Components.Forms.Base;
namespace Phantom.Web.Components.Forms.Base;
public interface ICustomFormField {
bool TwoWayValueBinding { get; set; }

View File

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Components.Forms;
using Phantom.Web.Components.Utils;
namespace Phantom.Web.Components.Forms;
namespace Phantom.Web.Components.Forms;
public abstract class FormModel {
public EditContext EditContext { get; }

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Components.Forms;
namespace Phantom.Web.Components.Utils;
namespace Phantom.Web.Components.Utils;
public static class EditContextExtensions {
public static void RevalidateWhenFieldChanges(this EditContext editContext, string tracked, string revalidated) {

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace Phantom.Web.Components.Utils;
namespace Phantom.Web.Components.Utils;
public abstract class FormValidationAttribute<TModel, TValue> : ValidationAttribute {
public sealed override bool IsValid(object? value) {

View File

@ -4,7 +4,7 @@ using Phantom.Common.Logging;
using Phantom.Utils.Tasks;
using ILogger = Serilog.ILogger;
namespace Phantom.Web.Identity.Authentication;
namespace Phantom.Web.Identity.Authentication;
public sealed class PhantomLoginStore {
private static readonly ILogger Logger = PhantomLogger.Create<PhantomLoginStore>();

View File

@ -1,7 +1,7 @@
using System.Collections.Immutable;
using Phantom.Web.Identity.Data;
namespace Phantom.Web.Identity.Authorization;
namespace Phantom.Web.Identity.Authorization;
public sealed class IdentityPermissions {
internal static IdentityPermissions None { get; } = new ();

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Authorization;
using Phantom.Web.Identity.Data;
namespace Phantom.Web.Identity.Authorization;
namespace Phantom.Web.Identity.Authorization;
sealed record PermissionBasedPolicyRequirement(Permission Permission) : IAuthorizationRequirement;

View File

@ -1,6 +1,6 @@
using Phantom.Controller.Database.Entities;
namespace Phantom.Web.Identity.Interfaces;
namespace Phantom.Web.Identity.Interfaces;
public interface ILoginEvents {
void UserLoggedIn(UserEntity user);

View File

@ -3,7 +3,7 @@ using System.Web;
using Microsoft.AspNetCore.Components;
using Phantom.Web.Identity.Interfaces;
namespace Phantom.Web.Base;
namespace Phantom.Web.Base;
sealed class Navigation : INavigation {
public static Func<IServiceProvider, Navigation> Create(string basePath) {

View File

@ -5,7 +5,7 @@ using Phantom.Web.Identity.Authorization;
using Phantom.Web.Identity.Data;
using ILogger = Serilog.ILogger;
namespace Phantom.Web.Base;
namespace Phantom.Web.Base;
public abstract class PhantomComponent : ComponentBase {
private static readonly ILogger Logger = PhantomLogger.Create<PhantomComponent>();