refactor: sync namespace

This commit is contained in:
Polianin Nikita 2024-10-07 02:25:36 +03:00
parent 2b89dd07a9
commit 26dbf608b9
21 changed files with 36 additions and 38 deletions

View File

@ -1,4 +1,4 @@
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; using Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;

View File

@ -8,7 +8,7 @@ using System;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Mirea.Api.Endpoint.Middleware; namespace Mirea.Api.Endpoint.Configuration.Core.Middleware;
public class CacheMaxAgeMiddleware(RequestDelegate next, IServiceProvider serviceProvider) public class CacheMaxAgeMiddleware(RequestDelegate next, IServiceProvider serviceProvider)
{ {

View File

@ -7,7 +7,7 @@ using System;
using System.Text.Json; using System.Text.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Mirea.Api.Endpoint.Middleware; namespace Mirea.Api.Endpoint.Configuration.Core.Middleware;
public class CustomExceptionHandlerMiddleware(RequestDelegate next) public class CustomExceptionHandlerMiddleware(RequestDelegate next)
{ {

View File

@ -2,7 +2,7 @@
using Mirea.Api.Security.Common.Interfaces; using Mirea.Api.Security.Common.Interfaces;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Mirea.Api.Endpoint.Middleware; namespace Mirea.Api.Endpoint.Configuration.Core.Middleware;
public class JwtRevocationMiddleware(RequestDelegate next) public class JwtRevocationMiddleware(RequestDelegate next)
{ {

View File

@ -3,7 +3,7 @@ using Mirea.Api.Endpoint.Common.Attributes;
using Mirea.Api.Endpoint.Common.Interfaces; using Mirea.Api.Endpoint.Common.Interfaces;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Mirea.Api.Endpoint.Middleware; namespace Mirea.Api.Endpoint.Configuration.Core.Middleware;
public class MaintenanceModeMiddleware(RequestDelegate next, IMaintenanceModeService maintenanceModeService, IMaintenanceModeNotConfigureService maintenanceModeNotConfigureService) public class MaintenanceModeMiddleware(RequestDelegate next, IMaintenanceModeService maintenanceModeService, IMaintenanceModeNotConfigureService maintenanceModeNotConfigureService)
{ {

View File

@ -1,7 +1,7 @@
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings;
using Mirea.Api.Endpoint.Configuration.Model; using Mirea.Api.Endpoint.Configuration.Model;
using Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
namespace Mirea.Api.Endpoint.Configuration.Core.Startup; namespace Mirea.Api.Endpoint.Configuration.Core.Startup;

View File

@ -1,8 +1,8 @@
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Mirea.Api.Endpoint.Common.Services.Security; using Mirea.Api.Endpoint.Common.Services.Security;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings;
using Mirea.Api.Endpoint.Configuration.Model; using Mirea.Api.Endpoint.Configuration.Model;
using Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
using Mirea.Api.Security; using Mirea.Api.Security;
using Mirea.Api.Security.Common.Interfaces; using Mirea.Api.Security.Common.Interfaces;

View File

@ -1,4 +1,4 @@
namespace Mirea.Api.Endpoint.Common.Interfaces; namespace Mirea.Api.Endpoint.Configuration;
public interface ISaveSettings public interface ISaveSettings
{ {
void SaveSetting(); void SaveSetting();

View File

@ -1,5 +1,4 @@
using Mirea.Api.Endpoint.Common.Interfaces; using Mirea.Api.Endpoint.Common.Services;
using Mirea.Api.Endpoint.Common.Services;
using System.IO; using System.IO;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;

View File

@ -1,6 +1,5 @@
using Mirea.Api.Endpoint.Common.Interfaces; using Mirea.Api.Endpoint.Common.Services;
using Mirea.Api.Endpoint.Common.Services; using Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings;
using System.IO; using System.IO;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;

View File

@ -1,7 +1,7 @@
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes; using Mirea.Api.Endpoint.Configuration.Validation.Attributes;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces; using Mirea.Api.Endpoint.Configuration.Validation.Interfaces;
namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; namespace Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
[RequiredSettings] [RequiredSettings]
public class CacheSettings : IIsConfigured public class CacheSettings : IIsConfigured

View File

@ -1,10 +1,10 @@
using Mirea.Api.DataAccess.Persistence.Common; using Mirea.Api.DataAccess.Persistence.Common;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes; using Mirea.Api.Endpoint.Configuration.Validation.Attributes;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces; using Mirea.Api.Endpoint.Configuration.Validation.Interfaces;
using System; using System;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; namespace Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
[RequiredSettings] [RequiredSettings]
public class DbSettings : IIsConfigured public class DbSettings : IIsConfigured

View File

@ -1,6 +1,6 @@
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces; using Mirea.Api.Endpoint.Configuration.Validation.Interfaces;
namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; namespace Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
public class EmailSettings : IIsConfigured public class EmailSettings : IIsConfigured
{ {

View File

@ -1,7 +1,7 @@
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes; using Mirea.Api.Endpoint.Configuration.Validation.Attributes;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces; using Mirea.Api.Endpoint.Configuration.Validation.Interfaces;
namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; namespace Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
[RequiredSettings] [RequiredSettings]
public class LogSettings : IIsConfigured public class LogSettings : IIsConfigured

View File

@ -1,10 +1,10 @@
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes; using Mirea.Api.Endpoint.Configuration.Validation.Attributes;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces; using Mirea.Api.Endpoint.Configuration.Validation.Interfaces;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; namespace Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
[RequiredSettings] [RequiredSettings]
public class ScheduleSettings : IIsConfigured public class ScheduleSettings : IIsConfigured

View File

@ -1,6 +1,6 @@
using System; using System;
namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes; namespace Mirea.Api.Endpoint.Configuration.Validation.Attributes;
[AttributeUsage(AttributeTargets.Class, Inherited = false)] [AttributeUsage(AttributeTargets.Class, Inherited = false)]
public class RequiredSettingsAttribute : Attribute; public class RequiredSettingsAttribute : Attribute;

View File

@ -1,4 +1,4 @@
namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces; namespace Mirea.Api.Endpoint.Configuration.Validation.Interfaces;
public interface IIsConfigured public interface IIsConfigured
{ {

View File

@ -1,7 +1,7 @@
using Mirea.Api.Endpoint.Common.Interfaces; using Mirea.Api.Endpoint.Common.Interfaces;
using System; using System;
namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks; namespace Mirea.Api.Endpoint.Configuration.Validation;
public class SetupTokenService : ISetupToken public class SetupTokenService : ISetupToken
{ {

View File

@ -1,11 +1,11 @@
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces;
using Mirea.Api.Endpoint.Configuration.Model; using Mirea.Api.Endpoint.Configuration.Model;
using Mirea.Api.Endpoint.Configuration.Validation.Attributes;
using Mirea.Api.Endpoint.Configuration.Validation.Interfaces;
using System; using System;
using System.Reflection; using System.Reflection;
namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Validators; namespace Mirea.Api.Endpoint.Configuration.Validation.Validators;
public class SettingsRequiredValidator public class SettingsRequiredValidator
{ {

View File

@ -10,9 +10,9 @@ using Mirea.Api.Endpoint.Common.Attributes;
using Mirea.Api.Endpoint.Common.Exceptions; using Mirea.Api.Endpoint.Common.Exceptions;
using Mirea.Api.Endpoint.Common.Interfaces; using Mirea.Api.Endpoint.Common.Interfaces;
using Mirea.Api.Endpoint.Common.Services; using Mirea.Api.Endpoint.Common.Services;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Validators;
using Mirea.Api.Endpoint.Configuration.Model; using Mirea.Api.Endpoint.Configuration.Model;
using Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
using Mirea.Api.Endpoint.Configuration.Validation.Validators;
using Mirea.Api.Security.Services; using Mirea.Api.Security.Services;
using MySqlConnector; using MySqlConnector;
using Npgsql; using Npgsql;

View File

@ -10,11 +10,11 @@ using Mirea.Api.DataAccess.Persistence;
using Mirea.Api.DataAccess.Persistence.Common; using Mirea.Api.DataAccess.Persistence.Common;
using Mirea.Api.Endpoint.Common.Interfaces; using Mirea.Api.Endpoint.Common.Interfaces;
using Mirea.Api.Endpoint.Common.Services; using Mirea.Api.Endpoint.Common.Services;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks; using Mirea.Api.Endpoint.Configuration.Core.Middleware;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Validators;
using Mirea.Api.Endpoint.Configuration.Core.Startup; using Mirea.Api.Endpoint.Configuration.Core.Startup;
using Mirea.Api.Endpoint.Configuration.Model; using Mirea.Api.Endpoint.Configuration.Model;
using Mirea.Api.Endpoint.Middleware; using Mirea.Api.Endpoint.Configuration.Validation;
using Mirea.Api.Endpoint.Configuration.Validation.Validators;
using Mirea.Api.Security.Services; using Mirea.Api.Security.Services;
using System; using System;
using System.IO; using System.IO;