eliminates region sections

This commit is contained in:
BinaryAlley committed 2024-10-12 22:03:57 +03:00
1 parent 705c02b90d
commit 405fc1ff9a
370 files changed
+47 -1618

No files matched your search

@@ -13,11 +13,8 @@ namespace Lumina.Presentation.Api.Common.Configuration;
/// </summary>
public class ConfigureSwaggerOptions : IConfigureNamedOptions<SwaggerGenOptions>
{
#region ================================================================== FIELD MEMBERS ================================================================================
private readonly IApiVersionDescriptionProvider _provider;
#endregion
#region ====================================================================== CTOR =====================================================================================
/// <summary>
/// Initializes a new instance of the <see cref="ConfigureSwaggerOptions"/> class.
/// </summary>
@@ -26,9 +23,7 @@ public class ConfigureSwaggerOptions : IConfigureNamedOptions<SwaggerGenOptions>
{
_provider = provider;
}
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Configures the Swagger options.
/// </summary>
@@ -66,5 +61,4 @@ public class ConfigureSwaggerOptions : IConfigureNamedOptions<SwaggerGenOptions>
info.Description += " This API version has been deprecated.";
return info;
}
#endregion
}
@@ -12,7 +12,6 @@ namespace Lumina.Presentation.Api.Common.DependencyInjection;
/// </summary>
internal static class PresentationApiLayerConfiguration
{
#region ================================================================== METHODS ===================================================================================
/// <summary>
/// Extension method for adding the Presentation API layer configuration to the DI container.
/// </summary>
@@ -31,5 +30,4 @@ internal static class PresentationApiLayerConfiguration
return services;
}
#endregion
}
@@ -17,7 +17,6 @@ namespace Lumina.Presentation.Api.Common.DependencyInjection;
/// </summary>
public static class PresentationApiLayerServices
{
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Registers the services of the Presentation API layer into the dependency injection container.
/// </summary>
@@ -71,5 +70,4 @@ public static class PresentationApiLayerServices
return services;
}
#endregion
}
@@ -19,12 +19,9 @@ namespace Lumina.Presentation.Api.Common.Errors;
/// </summary>
public class CustomProblemDetailsFactory : ProblemDetailsFactory
{
#region ================================================================== FIELD MEMBERS ================================================================================
private readonly ApiBehaviorOptions _options;
private readonly Action<ProblemDetailsContext>? _configure;
#endregion
#region ====================================================================== CTOR =====================================================================================
/// <summary>
/// Initializes a new instance of the <see cref="CustomProblemDetailsFactory"/> class.
/// </summary>
@@ -36,9 +33,7 @@ public class CustomProblemDetailsFactory : ProblemDetailsFactory
_options = apiBehaviorOptions?.Value ?? throw new ArgumentNullException(nameof(apiBehaviorOptions));
_configure = problemDetailsOptions?.Value?.CustomizeProblemDetails;
}
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Creates a <see cref="ProblemDetails"/> instance that configures defaults based on values specified in <see cref="ApiBehaviorOptions"/>.
/// </summary>
@@ -120,5 +115,4 @@ public class CustomProblemDetailsFactory : ProblemDetailsFactory
//problemDetails.Extensions.Add("errorCodes", errors.Select(e => e.Type.ToString()));
_configure?.Invoke(new() { HttpContext = httpContext!, ProblemDetails = problemDetails });
}
#endregion
}
@@ -7,7 +7,5 @@ namespace Lumina.Presentation.Api.Common.Http;
/// </summary>
public static class HttpContextItemKeys
{
#region ================================================================== FIELD MEMBERS ================================================================================
public const string ERRORS = "errors";
#endregion
}
@@ -11,7 +11,6 @@ namespace Lumina.Presentation.Api.Common.Mapping.WrittenContentLibrary.BookLibra
/// </summary>
public class BookMappingConfig : IRegister
{
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Registers the mapping configuration.
/// </summary>
@@ -25,5 +24,4 @@ public class BookMappingConfig : IRegister
.Map(dest => dest.OCLCNumber, src => src.OCLCNumber)
.MapToConstructor(true);
}
#endregion
}
@@ -11,7 +11,6 @@ namespace Lumina.Presentation.Api.Common.ModelBinders;
/// </summary>
public class UrlStringBinder : IModelBinder
{
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Binds a model to a value by using the specified controller context and binding context.
/// </summary>
@@ -36,5 +35,4 @@ public class UrlStringBinder : IModelBinder
bindingContext.Result = ModelBindingResult.Success(value);
return Task.CompletedTask;
}
#endregion
}
@@ -11,7 +11,6 @@ namespace Lumina.Presentation.Api.Common.Utilities;
/// </summary>
public static class MimeTypes
{
#region ================================================================== FIELD MEMBERS ================================================================================
private static readonly FrozenDictionary<ImageType, string> s_imageTypeToMimeType = new Dictionary<ImageType, string>
{
{ ImageType.BMP, "image/bmp" },
@@ -30,9 +29,7 @@ public static class MimeTypes
{ ImageType.TGA, "image/x-tga" },
{ ImageType.SVG, "image/svg+xml" }
}.ToFrozenDictionary();
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Gets the mime type of <paramref name="type"/>.
/// </summary>
@@ -42,5 +39,4 @@ public static class MimeTypes
{
return s_imageTypeToMimeType.TryGetValue(type, out string? mimeType) ? mimeType : "application/octet-stream";
}
#endregion
}