diff --git a/src/NFury/Commands/Run/Request.cs b/src/NFury/Commands/Run/Request.cs index 121978d..ead56c4 100644 --- a/src/NFury/Commands/Run/Request.cs +++ b/src/NFury/Commands/Run/Request.cs @@ -1,4 +1,4 @@ -namespace NFury.Commands.Run; +namespace NFury.Commands.Run; internal sealed record Request(string Url, string Method, string? Body, string? ContentType, int NumberOfRequests) { diff --git a/src/NFury/Commands/Run/Response.cs b/src/NFury/Commands/Run/Response.cs index 73c39b5..03de2ab 100644 --- a/src/NFury/Commands/Run/Response.cs +++ b/src/NFury/Commands/Run/Response.cs @@ -1,5 +1,5 @@ -using System.Net; +using System.Net; namespace NFury.Commands.Run; -internal sealed record Response(Guid Id, long ElapsedTime, HttpStatusCode StatusCode); \ No newline at end of file +internal sealed record Response(Guid Id, long ElapsedTime, HttpStatusCode StatusCode); diff --git a/src/NFury/Commands/Run/RunCommand.cs b/src/NFury/Commands/Run/RunCommand.cs index fc5fd74..bf52331 100644 --- a/src/NFury/Commands/Run/RunCommand.cs +++ b/src/NFury/Commands/Run/RunCommand.cs @@ -1,8 +1,8 @@ -using Spectre.Console; -using Spectre.Console.Cli; using System.Collections.Concurrent; using System.Diagnostics; using System.Text; +using Spectre.Console; +using Spectre.Console.Cli; namespace NFury.Commands.Run; @@ -277,4 +277,4 @@ private static long CalculatePercentile(List values, int percentile) return (long)(values[intIndex] + fraction * (values[intIndex + 1] - values[intIndex])); } } -} \ No newline at end of file +} diff --git a/src/NFury/Commands/Run/RunSettings.cs b/src/NFury/Commands/Run/RunSettings.cs index 0a52458..656c5b0 100644 --- a/src/NFury/Commands/Run/RunSettings.cs +++ b/src/NFury/Commands/Run/RunSettings.cs @@ -1,5 +1,5 @@ -using Spectre.Console.Cli; using System.ComponentModel; +using Spectre.Console.Cli; namespace NFury.Commands.Run; @@ -30,7 +30,7 @@ public class RunSettings : CommandSettings [CommandOption("-t|--content-type")] [DefaultValue("application/json")] [Description("Define the content type of request. Default is application/json.")] - public string? ContentType { get; set;} + public string? ContentType { get; set; } [CommandOption("-d|--duration")] [Description("Define the duration of test in seconds.")] diff --git a/src/NFury/Commands/Server/ServerCommand.cs b/src/NFury/Commands/Server/ServerCommand.cs index 8df8dcb..d0707aa 100644 --- a/src/NFury/Commands/Server/ServerCommand.cs +++ b/src/NFury/Commands/Server/ServerCommand.cs @@ -1,3 +1,4 @@ +using System.Diagnostics.CodeAnalysis; using NFury.Web; using NFury.Web.Data; using NFury.Web.Hubs; @@ -7,8 +8,21 @@ namespace NFury.Commands.Server; +/// +/// Command to start the NFury web server with API endpoints and SignalR hub +/// public class ServerCommand : AsyncCommand { + /// + /// Executes the server command, starting the web application + /// + /// The command context + /// The server settings including port and host + /// Exit code (0 for success) + [UnconditionalSuppressMessage("AOT", "IL2026:RequiresUnreferencedCode", + Justification = "ASP.NET Core Minimal APIs with source-generated JSON serialization is AOT compatible")] + [UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", + Justification = "ASP.NET Core Minimal APIs with source-generated JSON serialization is AOT compatible")] public override async Task ExecuteAsync(CommandContext context, ServerSettings settings) { AnsiConsole.MarkupLine("[bold blue]Starting NFury Web Server...[/]"); diff --git a/src/NFury/Commands/Server/ServerSettings.cs b/src/NFury/Commands/Server/ServerSettings.cs index 9a15f12..11cee49 100644 --- a/src/NFury/Commands/Server/ServerSettings.cs +++ b/src/NFury/Commands/Server/ServerSettings.cs @@ -1,5 +1,5 @@ -using Spectre.Console.Cli; using System.ComponentModel; +using Spectre.Console.Cli; namespace NFury.Commands.Server; diff --git a/src/NFury/Program.cs b/src/NFury/Program.cs index 623a4a0..d964649 100644 --- a/src/NFury/Program.cs +++ b/src/NFury/Program.cs @@ -1,8 +1,8 @@ -using NFury.Commands.Run; +using System.Reflection; +using NFury.Commands.Run; using NFury.Commands.Server; using Spectre.Console; using Spectre.Console.Cli; -using System.Reflection; WriteCopyrigth(); @@ -43,4 +43,4 @@ static void WriteCopyrigth() ]); AnsiConsole.Write(grid); AnsiConsole.WriteLine(); -} \ No newline at end of file +}