Use file scoped namepace

This commit is contained in:
2022-12-22 15:29:53 +01:00
parent 27bf5f0b24
commit 6d7e447ccc
51 changed files with 886 additions and 937 deletions

View File

@@ -2,8 +2,8 @@
using System.Linq;
using Microsoft.Extensions.Configuration;
namespace GerstITS.Examples.Api.Configurations
{
namespace GerstITS.Examples.Api.Configurations;
public static class IConfigurationExtensions
{
#region Methods
@@ -26,4 +26,3 @@ namespace GerstITS.Examples.Api.Configurations
#endregion
}
}

View File

@@ -2,8 +2,8 @@
using GerstITS.System.Configurations;
using Microsoft.Extensions.Configuration;
namespace GerstITS.Examples.Api.Configurations
{
namespace GerstITS.Examples.Api.Configurations;
internal sealed class EntityFrameworkMigrationConfiguration : IEntityFrameworkMigrationConfiguration
{
#region Constructors
@@ -24,4 +24,3 @@ namespace GerstITS.Examples.Api.Configurations
#endregion
}
}

View File

@@ -2,8 +2,8 @@
using Microsoft.Net.Http.Headers;
using Microsoft.OpenApi.Models;
namespace GerstITS.Examples.Api.Configurations
{
namespace GerstITS.Examples.Api.Configurations;
internal sealed class OpenApiSecuritySchemeConfiguration : IOpenApiSecuritySchemeConfiguration
{
#region Properties
@@ -31,4 +31,3 @@ namespace GerstITS.Examples.Api.Configurations
#endregion
}
}

View File

@@ -1,8 +1,8 @@
using GerstITS.Authentication.OpenId;
using Microsoft.Extensions.Configuration;
namespace GerstITS.Examples.Api.Configurations
{
namespace GerstITS.Examples.Api.Configurations;
internal class OpenIdValidationConfiguration : IOpenIdValidationConfiguration
{
#region Constructors
@@ -31,4 +31,3 @@ namespace GerstITS.Examples.Api.Configurations
#endregion
}
}

View File

@@ -2,8 +2,8 @@
using GerstITS.System.Configurations;
using Microsoft.Extensions.Configuration;
namespace GerstITS.Examples.Api.Configurations
{
namespace GerstITS.Examples.Api.Configurations;
internal class OpenIdConfiguration : IOpenIdConfiguration
{
#region Constructors
@@ -32,4 +32,3 @@ namespace GerstITS.Examples.Api.Configurations
#endregion
}
}

View File

@@ -2,8 +2,8 @@
using GerstITS.Web.Api.Builder;
using Microsoft.Extensions.Configuration;
namespace GerstITS.Examples.Api.Configurations
{
namespace GerstITS.Examples.Api.Configurations;
internal sealed class CorsPolicyConfiguration : ICorsPolicy, GerstITS.System.Configurations.IConfiguration
{
#region Constructors
@@ -29,4 +29,3 @@ namespace GerstITS.Examples.Api.Configurations
#endregion
}
}

View File

@@ -3,8 +3,8 @@ using GerstITS.Web.Api.Builder;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.HttpOverrides;
namespace GerstITS.Examples.Api.Configurations
{
namespace GerstITS.Examples.Api.Configurations;
internal sealed class WebApiHeadersConfiguration : IHeaderConfiguration, IConfiguration
{
#region Constructors
@@ -27,4 +27,3 @@ namespace GerstITS.Examples.Api.Configurations
#endregion
}
}

View File

@@ -2,8 +2,8 @@
using GerstITS.Web.Api.Builder;
using Microsoft.Extensions.Configuration;
namespace GerstITS.Examples.Api.Configurations
{
namespace GerstITS.Examples.Api.Configurations;
internal sealed class ServerConfiguration : IServerConfiguration
{
#region Constructors
@@ -32,4 +32,3 @@ namespace GerstITS.Examples.Api.Configurations
#endregion
}
}

View File

@@ -3,8 +3,8 @@ using GerstITS.System.Configurations;
using GerstITS.Web.Api.Swagger;
using Microsoft.Extensions.Configuration;
namespace GerstITS.Examples.Api.Configurations
{
namespace GerstITS.Examples.Api.Configurations;
internal sealed class LicenseConfiguration : ILicense, System.Configurations.IConfiguration
{
#region Constructors
@@ -26,4 +26,3 @@ namespace GerstITS.Examples.Api.Configurations
#endregion
}
}

View File

@@ -4,8 +4,8 @@ using GerstITS.System.Configurations;
using GerstITS.Web.Api.Swagger;
using Microsoft.Extensions.Configuration;
namespace GerstITS.Examples.Api.Configurations
{
namespace GerstITS.Examples.Api.Configurations;
internal sealed class SwaggerConfiguration : ISwaggerConfiguration
{
#region Constructors
@@ -42,4 +42,3 @@ namespace GerstITS.Examples.Api.Configurations
#endregion
}
}

View File

@@ -4,8 +4,8 @@ using GerstITS.System.Configurations;
using GerstITS.Web.Api.Builder;
using GerstITS.Web.Api.Swagger;
namespace GerstITS.Examples.Api.Configurations
{
namespace GerstITS.Examples.Api.Configurations;
internal sealed class WebApiConfiguration : IConfiguration
{
#region Properties
@@ -31,4 +31,3 @@ namespace GerstITS.Examples.Api.Configurations
#endregion
}
}

View File

@@ -2,8 +2,8 @@
using GerstITS.Data;
using GerstITS.Web.Api.ExceptionHandling;
namespace GerstITS.Examples.Api.ExceptionHandling
{
namespace GerstITS.Examples.Api.ExceptionHandling;
public class EntityNotFoundExceptionTransformation : ExceptionTransformationBase<EntityNotFoundException>
{
protected override ExceptionTransformationInfo CreateExceptionTransformationInfo(EntityNotFoundException exception, string ticketId)
@@ -16,4 +16,3 @@ namespace GerstITS.Examples.Api.ExceptionHandling
};
}
}
}

View File

@@ -2,8 +2,8 @@
using System.Net;
using GerstITS.Web.Api.ExceptionHandling;
namespace GerstITS.Examples.Api.ExceptionHandling
{
namespace GerstITS.Examples.Api.ExceptionHandling;
internal sealed class ValidationExceptionTransformation : ExceptionTransformationBase<ValidationException>
{
#region Methods
@@ -20,4 +20,3 @@ namespace GerstITS.Examples.Api.ExceptionHandling
#endregion
}
}

View File

@@ -3,8 +3,8 @@ using GerstITS.Examples.Logic.Example;
using GerstITS.IoC;
using GerstITS.System.Json;
namespace GerstITS.Examples.Api.StartupTasks
{
namespace GerstITS.Examples.Api.StartupTasks;
internal class ExampleStartupTask : IStartupTask
{
#region Fields#
@@ -36,4 +36,3 @@ namespace GerstITS.Examples.Api.StartupTasks
#endregion
}
}

View File

@@ -1,5 +1,5 @@
namespace GerstITS.Examples.Api.Versioning
{
namespace GerstITS.Examples.Api.Versioning;
public static class Versions
{
#region Versions
@@ -9,4 +9,3 @@
#endregion
}
}

View File

@@ -5,8 +5,8 @@ using GerstITS.Web.Api;
using GerstITS.Web.Api.FluentApi;
using Microsoft.AspNetCore.Mvc;
namespace GerstITS.Examples.Api.Controllers
{
namespace GerstITS.Examples.Api.Controllers;
/// <summary>
/// Controller is deprecated use newer version.
/// </summary>
@@ -49,4 +49,3 @@ namespace GerstITS.Examples.Api.Controllers
#endregion
}
}

View File

@@ -5,8 +5,8 @@ using GerstITS.Web.Api;
using GerstITS.Web.Api.FluentApi;
using Microsoft.AspNetCore.Mvc;
namespace GerstITS.Examples.Api.Controllers._1._1
{
namespace GerstITS.Examples.Api.Controllers._1._1;
/// <summary>
/// Is responsible to get employee organization assignment examples.
/// </summary>
@@ -49,4 +49,3 @@ namespace GerstITS.Examples.Api.Controllers._1._1
#endregion
}
}

View File

@@ -1,8 +1,8 @@
using GerstITS.Examples.Api.Configurations;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.Api
{
namespace GerstITS.Examples.Api;
public sealed partial class Module
{
#region Methods
@@ -19,4 +19,3 @@ namespace GerstITS.Examples.Api
#endregion
}
}

View File

@@ -2,8 +2,8 @@
using GerstITS.Web.Api.ExceptionHandling.Extensions;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.Api
{
namespace GerstITS.Examples.Api;
public sealed partial class Module
{
#region Methods
@@ -15,4 +15,3 @@ namespace GerstITS.Examples.Api
#endregion
}
}

View File

@@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.Api
{
namespace GerstITS.Examples.Api;
public sealed partial class Module
{
#region Methods
@@ -18,4 +18,3 @@ namespace GerstITS.Examples.Api
#endregion
}
}

View File

@@ -2,8 +2,8 @@
using GerstITS.IoC.DotNetCore;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.Api
{
namespace GerstITS.Examples.Api;
public sealed partial class Module
{
#region Methods
@@ -15,4 +15,3 @@ namespace GerstITS.Examples.Api
#endregion
}
}

View File

@@ -1,8 +1,8 @@
using GerstITS.IoC;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.Api
{
namespace GerstITS.Examples.Api;
public sealed partial class Module : IIoCModule<IServiceCollection>
{
#region IIoCModule
@@ -17,4 +17,3 @@ namespace GerstITS.Examples.Api
#endregion
}
}

View File

@@ -1,8 +1,8 @@
using GerstITS.Logging.Serilog;
using GerstITS.Web.Api.Hosting;
namespace GerstITS.Examples.Api
{
namespace GerstITS.Examples.Api;
public class Program : ProgramBase<Program>
{
#region Methods
@@ -20,4 +20,3 @@ namespace GerstITS.Examples.Api
#endregion
}
}

View File

@@ -4,8 +4,8 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
namespace GerstITS.Examples.Api
{
namespace GerstITS.Examples.Api;
public class Startup : BootstrapperStartupBase
{
#region Methods
@@ -31,4 +31,3 @@ namespace GerstITS.Examples.Api
#endregion
}
}

View File

@@ -1,7 +1,7 @@
using GerstITS.Job.Scheduling;
namespace GerstITS.Examples.Jobs.SayHelloWorld.Configurations
{
namespace GerstITS.Examples.Jobs.SayHelloWorld.Configurations;
public class SayHelloWorldJobConfiguration : JobSchedulingConfigurationBase
{
#region Constructors
@@ -13,4 +13,3 @@ namespace GerstITS.Examples.Jobs.SayHelloWorld.Configurations
#endregion
}
}

View File

@@ -6,8 +6,8 @@ using GerstITS.Job;
using GerstITS.System.Environment;
using Quartz;
namespace GerstITS.Examples.Jobs.SayHelloWorld.Jobs
{
namespace GerstITS.Examples.Jobs.SayHelloWorld.Jobs;
[DisallowConcurrentExecution]
public class SayHelloWorldJob : JobBase
{
@@ -42,4 +42,3 @@ namespace GerstITS.Examples.Jobs.SayHelloWorld.Jobs
#endregion
}
}

View File

@@ -4,8 +4,8 @@ using GerstITS.IoC;
using GerstITS.Job.Scheduling;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.Jobs.SayHelloWorld
{
namespace GerstITS.Examples.Jobs.SayHelloWorld;
public sealed class Module : IIoCModule<IServiceCollection>
{
#region IIoCModule
@@ -17,4 +17,3 @@ namespace GerstITS.Examples.Jobs.SayHelloWorld
#endregion
}
}

View File

@@ -1,5 +1,5 @@
namespace GerstITS.Examples.Logic.Example
{
namespace GerstITS.Examples.Logic.Example;
public class Example
{
#region Properties
@@ -10,4 +10,3 @@
#endregion
}
}

View File

@@ -1,8 +1,7 @@
namespace GerstITS.Examples.Logic.Example
{
namespace GerstITS.Examples.Logic.Example;
public interface IExampleProvider
{
Example GetById(int id);
Example GetById_v1_1(int id);
}
}

View File

@@ -1,8 +1,8 @@
using AutoMapper;
using GerstITS.Data;
namespace GerstITS.Examples.Logic.Example
{
namespace GerstITS.Examples.Logic.Example;
internal sealed class ExampleProvider : IExampleProvider
{
#region Fields
@@ -48,4 +48,3 @@ namespace GerstITS.Examples.Logic.Example
#endregion
}
}

View File

@@ -1,7 +1,7 @@
using AutoMapper;
namespace GerstITS.Examples.Logic.Example
{
namespace GerstITS.Examples.Logic.Example;
internal sealed class IntegerMapping : Profile
{
#region Construtcors
@@ -16,4 +16,3 @@ namespace GerstITS.Examples.Logic.Example
#endregion
}
}

View File

@@ -2,8 +2,8 @@
using GerstITS.Mapping.AutoMapper;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.Logic
{
namespace GerstITS.Examples.Logic;
public sealed partial class Module
{
#region Methods
@@ -17,4 +17,3 @@ namespace GerstITS.Examples.Logic
#endregion
}
}

View File

@@ -4,8 +4,8 @@ using GerstITS.Search;
using GerstITS.Validation;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.Logic
{
namespace GerstITS.Examples.Logic;
public sealed partial class Module
{
#region Methods
@@ -19,4 +19,3 @@ namespace GerstITS.Examples.Logic
#endregion
}
}

View File

@@ -1,8 +1,8 @@
using GerstITS.IoC;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.Logic
{
namespace GerstITS.Examples.Logic;
public sealed partial class Module : IIoCModule<IServiceCollection>
{
#region IIoCModule
@@ -15,4 +15,3 @@ namespace GerstITS.Examples.Logic
#endregion
}
}

View File

@@ -4,8 +4,8 @@ using System.Linq.Expressions;
using GerstITS.Common;
using GerstITS.Data;
namespace GerstITS.Examples.Logic.Shared
{
namespace GerstITS.Examples.Logic.Shared;
internal static class ISearchEngineExtensions
{
#region Methods
@@ -28,4 +28,3 @@ namespace GerstITS.Examples.Logic.Shared
#endregion
}
}

View File

@@ -1,6 +1,5 @@
namespace GerstITS.Examples.Logic.Shared.Search.Sorting
{
namespace GerstITS.Examples.Logic.Shared.Search.Sorting;
internal interface ISortable
{
}
}

View File

@@ -5,8 +5,8 @@ using System.Reflection;
using GerstITS.Common;
using GerstITS.Search;
namespace GerstITS.Examples.Logic.Shared.Search.Sorting
{
namespace GerstITS.Examples.Logic.Shared.Search.Sorting;
internal class SortingProvider : ISortingProvider
{
#region ISortingProvider
@@ -47,4 +47,3 @@ namespace GerstITS.Examples.Logic.Shared.Search.Sorting
#endregion
}
}

View File

@@ -1,8 +1,8 @@
using FluentValidation;
using GerstITS.Validation;
namespace GerstITS.Examples.Logic.Shared.Validation
{
namespace GerstITS.Examples.Logic.Shared.Validation;
internal sealed class IdValidationRule : ValidationRuleBase<int>
{
#region Constructors
@@ -16,4 +16,3 @@ namespace GerstITS.Examples.Logic.Shared.Validation
#endregion
}
}

View File

@@ -5,8 +5,8 @@ using GerstITS.IoC.DotNetCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.WebClient.Console
{
namespace GerstITS.Examples.WebClient.Console;
public class Module : IIoCModule<IServiceCollection>
{
#region IIoCModule
@@ -22,4 +22,3 @@ namespace GerstITS.Examples.WebClient.Console
#endregion
}
}

View File

@@ -1,7 +1,7 @@
using GerstITS.IoC.DotNetCore;
namespace GerstITS.Examples.WebClient.Console
{
namespace GerstITS.Examples.WebClient.Console;
internal class Program
{
#region Fields
@@ -28,4 +28,3 @@ namespace GerstITS.Examples.WebClient.Console
#endregion
}
}

View File

@@ -4,8 +4,8 @@ using GerstITS.Examples.WebClients.Examples.Api;
using GerstITS.IoC.DotNetCore;
using GerstITS.Web.WebClients;
namespace GerstITS.Examples.WebClient.Console.Tests
{
namespace GerstITS.Examples.WebClient.Console.Tests;
internal sealed class TestRunner : IApplicationStart
{
#region Fields
@@ -48,4 +48,3 @@ namespace GerstITS.Examples.WebClient.Console.Tests
#endregion
}
}

View File

@@ -1,8 +1,8 @@
using GerstITS.Web.Rest.WebClients;
using Microsoft.Extensions.Configuration;
namespace GerstITS.Examples.WebClients.Examples.Api.Configurations
{
namespace GerstITS.Examples.WebClients.Examples.Api.Configurations;
internal class ExampleApiClientConfiguration : RestWebServiceConfigurationBase
{
#region Constructors
@@ -14,4 +14,3 @@ namespace GerstITS.Examples.WebClients.Examples.Api.Configurations
#endregion
}
}

View File

@@ -1,7 +1,7 @@
using GerstITS.Web.WebClients;
namespace GerstITS.Examples.WebClients.Examples.Api
{
namespace GerstITS.Examples.WebClients.Examples.Api;
public interface ICountry : IWebService
{
[WebMethod(WebMethods.Get),
@@ -24,4 +24,3 @@ namespace GerstITS.Examples.WebClients.Examples.Api
ResourceUrl("Country/{id}")]
void Delete(int id);
}
}

View File

@@ -1,5 +1,5 @@
namespace GerstITS.Examples.WebClients.Examples.Api
{
namespace GerstITS.Examples.WebClients.Examples.Api;
public class Country
{
#region Properties
@@ -9,4 +9,3 @@
#endregion
}
}

View File

@@ -1,5 +1,5 @@
namespace GerstITS.Examples.WebClients.Examples.Api
{
namespace GerstITS.Examples.WebClients.Examples.Api;
public class SearchCriteria
{
#region Properties
@@ -15,4 +15,3 @@
#endregion
}
}

View File

@@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
namespace GerstITS.Examples.WebClients.Examples.Api
{
namespace GerstITS.Examples.WebClients.Examples.Api;
public class SearchResult<TItem>
{
#region Properties
@@ -21,4 +21,3 @@ namespace GerstITS.Examples.WebClients.Examples.Api
#endregion
}
}

View File

@@ -1,8 +1,7 @@
namespace GerstITS.Examples.WebClients.Examples.Api
{
namespace GerstITS.Examples.WebClients.Examples.Api;
public enum SortingDirections
{
Ascending = 0,
Descending
}
}

View File

@@ -2,8 +2,8 @@
using GerstITS.Examples.WebClients.Examples.Api.Configurations;
using GerstITS.Web.Rest.WebClients;
namespace GerstITS.Examples.WebClients.Examples.Api.CreationRules
{
namespace GerstITS.Examples.WebClients.Examples.Api.CreationRules;
internal sealed class ExampleApiClientCreatingRule : RestApiClientCreationRuleBase<ExampleApiClientConfiguration>
{
#region Properties
@@ -22,4 +22,3 @@ namespace GerstITS.Examples.WebClients.Examples.Api.CreationRules
#endregion
}
}

View File

@@ -1,8 +1,8 @@
using GerstITS.Examples.WebClients.Examples.Api.Configurations;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.WebClients.Examples.Api
{
namespace GerstITS.Examples.WebClients.Examples.Api;
public sealed partial class Module
{
#region Methods
@@ -14,4 +14,3 @@ namespace GerstITS.Examples.WebClients.Examples.Api
#endregion
}
}

View File

@@ -2,8 +2,8 @@
using GerstITS.Web.WebClients;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.WebClients.Examples.Api
{
namespace GerstITS.Examples.WebClients.Examples.Api;
public sealed partial class Module
{
#region Methods
@@ -15,4 +15,3 @@ namespace GerstITS.Examples.WebClients.Examples.Api
#endregion
}
}

View File

@@ -1,8 +1,8 @@
using GerstITS.IoC;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.WebClients.Examples.Api
{
namespace GerstITS.Examples.WebClients.Examples.Api;
public sealed partial class Module : IIoCModule<IServiceCollection>
{
#region IIoCModule
@@ -15,4 +15,3 @@ namespace GerstITS.Examples.WebClients.Examples.Api
#endregion
}
}