Use file scoped namepace
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
using System.Linq;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace GerstITS.Examples.Api.Configurations
|
||||
namespace GerstITS.Examples.Api.Configurations;
|
||||
|
||||
public static class IConfigurationExtensions
|
||||
{
|
||||
public static class IConfigurationExtensions
|
||||
{
|
||||
#region Methods
|
||||
|
||||
public static TEnum GetFlaggedEnum<TEnum>(this IConfiguration configuration, string key)
|
||||
@@ -25,5 +25,4 @@ namespace GerstITS.Examples.Api.Configurations
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
using GerstITS.System.Configurations;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace GerstITS.Examples.Api.Configurations
|
||||
namespace GerstITS.Examples.Api.Configurations;
|
||||
|
||||
internal sealed class EntityFrameworkMigrationConfiguration : IEntityFrameworkMigrationConfiguration
|
||||
{
|
||||
internal sealed class EntityFrameworkMigrationConfiguration : IEntityFrameworkMigrationConfiguration
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public EntityFrameworkMigrationConfiguration(string parentPrefix,
|
||||
@@ -23,5 +23,4 @@ namespace GerstITS.Examples.Api.Configurations
|
||||
public bool AutoMigrate { get; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
using Microsoft.Net.Http.Headers;
|
||||
using Microsoft.OpenApi.Models;
|
||||
|
||||
namespace GerstITS.Examples.Api.Configurations
|
||||
namespace GerstITS.Examples.Api.Configurations;
|
||||
|
||||
internal sealed class OpenApiSecuritySchemeConfiguration : IOpenApiSecuritySchemeConfiguration
|
||||
{
|
||||
internal sealed class OpenApiSecuritySchemeConfiguration : IOpenApiSecuritySchemeConfiguration
|
||||
{
|
||||
#region Properties
|
||||
|
||||
public bool AllowAnonymous { get; }
|
||||
@@ -30,5 +30,4 @@ namespace GerstITS.Examples.Api.Configurations
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using GerstITS.Authentication.OpenId;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace GerstITS.Examples.Api.Configurations
|
||||
namespace GerstITS.Examples.Api.Configurations;
|
||||
|
||||
internal class OpenIdValidationConfiguration : IOpenIdValidationConfiguration
|
||||
{
|
||||
internal class OpenIdValidationConfiguration : IOpenIdValidationConfiguration
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public OpenIdValidationConfiguration(string parentPrefix,
|
||||
@@ -30,5 +30,4 @@ namespace GerstITS.Examples.Api.Configurations
|
||||
public bool ValidateLifetime { get; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
using GerstITS.System.Configurations;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace GerstITS.Examples.Api.Configurations
|
||||
namespace GerstITS.Examples.Api.Configurations;
|
||||
|
||||
internal class OpenIdConfiguration : IOpenIdConfiguration
|
||||
{
|
||||
internal class OpenIdConfiguration : IOpenIdConfiguration
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public OpenIdConfiguration(string parentPrefix,
|
||||
@@ -31,5 +31,4 @@ namespace GerstITS.Examples.Api.Configurations
|
||||
public IOpenIdValidationConfiguration Validate { get; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
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
|
||||
{
|
||||
internal sealed class CorsPolicyConfiguration : ICorsPolicy, GerstITS.System.Configurations.IConfiguration
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public CorsPolicyConfiguration(string parentPrefix, Microsoft.Extensions.Configuration.IConfiguration configuration)
|
||||
@@ -28,5 +28,4 @@ namespace GerstITS.Examples.Api.Configurations
|
||||
public string[] AllowedMethods { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,10 @@ 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
|
||||
{
|
||||
internal sealed class WebApiHeadersConfiguration : IHeaderConfiguration, IConfiguration
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public WebApiHeadersConfiguration(string parentPrefix, Microsoft.Extensions.Configuration.IConfiguration configuration)
|
||||
@@ -26,5 +26,4 @@ namespace GerstITS.Examples.Api.Configurations
|
||||
public ForwardedHeadersOptions ForwardedHeaders { get; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
using GerstITS.Web.Api.Builder;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace GerstITS.Examples.Api.Configurations
|
||||
namespace GerstITS.Examples.Api.Configurations;
|
||||
|
||||
internal sealed class ServerConfiguration : IServerConfiguration
|
||||
{
|
||||
internal sealed class ServerConfiguration : IServerConfiguration
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public ServerConfiguration(string parentPrefix, Microsoft.Extensions.Configuration.IConfiguration configuration)
|
||||
@@ -31,5 +31,4 @@ namespace GerstITS.Examples.Api.Configurations
|
||||
public ICorsPolicy CorsPolicy { get; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,10 @@ 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
|
||||
{
|
||||
internal sealed class LicenseConfiguration : ILicense, System.Configurations.IConfiguration
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public LicenseConfiguration(string parentPrefix, Microsoft.Extensions.Configuration.IConfiguration configuration)
|
||||
@@ -25,5 +25,4 @@ namespace GerstITS.Examples.Api.Configurations
|
||||
public Uri Url { get; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,10 @@ 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
|
||||
{
|
||||
internal sealed class SwaggerConfiguration : ISwaggerConfiguration
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public SwaggerConfiguration(string parentPrefix,
|
||||
@@ -41,5 +41,4 @@ namespace GerstITS.Examples.Api.Configurations
|
||||
public IOpenApiSecuritySchemeConfiguration Security { get; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,10 @@ 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
|
||||
{
|
||||
internal sealed class WebApiConfiguration : IConfiguration
|
||||
{
|
||||
#region Properties
|
||||
|
||||
public IServerConfiguration Server { get; }
|
||||
@@ -30,5 +30,4 @@ namespace GerstITS.Examples.Api.Configurations
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
using GerstITS.Data;
|
||||
using GerstITS.Web.Api.ExceptionHandling;
|
||||
|
||||
namespace GerstITS.Examples.Api.ExceptionHandling
|
||||
namespace GerstITS.Examples.Api.ExceptionHandling;
|
||||
|
||||
public class EntityNotFoundExceptionTransformation : ExceptionTransformationBase<EntityNotFoundException>
|
||||
{
|
||||
public class EntityNotFoundExceptionTransformation : ExceptionTransformationBase<EntityNotFoundException>
|
||||
{
|
||||
protected override ExceptionTransformationInfo CreateExceptionTransformationInfo(EntityNotFoundException exception, string ticketId)
|
||||
{
|
||||
return new ExceptionTransformationInfo
|
||||
@@ -15,5 +15,4 @@ namespace GerstITS.Examples.Api.ExceptionHandling
|
||||
Details = exception.Message
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
using System.Net;
|
||||
using GerstITS.Web.Api.ExceptionHandling;
|
||||
|
||||
namespace GerstITS.Examples.Api.ExceptionHandling
|
||||
namespace GerstITS.Examples.Api.ExceptionHandling;
|
||||
|
||||
internal sealed class ValidationExceptionTransformation : ExceptionTransformationBase<ValidationException>
|
||||
{
|
||||
internal sealed class ValidationExceptionTransformation : ExceptionTransformationBase<ValidationException>
|
||||
{
|
||||
#region Methods
|
||||
|
||||
protected override ExceptionTransformationInfo CreateExceptionTransformationInfo(ValidationException exception, string ticketId)
|
||||
@@ -19,5 +19,4 @@ namespace GerstITS.Examples.Api.ExceptionHandling
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,10 @@ 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
|
||||
{
|
||||
internal class ExampleStartupTask : IStartupTask
|
||||
{
|
||||
#region Fields#
|
||||
|
||||
private readonly IExampleProvider _provider;
|
||||
@@ -35,5 +35,4 @@ namespace GerstITS.Examples.Api.StartupTasks
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
namespace GerstITS.Examples.Api.Versioning
|
||||
namespace GerstITS.Examples.Api.Versioning;
|
||||
|
||||
public static class Versions
|
||||
{
|
||||
public static class Versions
|
||||
{
|
||||
#region Versions
|
||||
|
||||
public const string _1_0 = "1.0";
|
||||
public const string _1_1 = "1.1";
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -5,16 +5,16 @@ using GerstITS.Web.Api;
|
||||
using GerstITS.Web.Api.FluentApi;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace GerstITS.Examples.Api.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Controller is deprecated use newer version.
|
||||
/// </summary>
|
||||
[ApiController,
|
||||
namespace GerstITS.Examples.Api.Controllers;
|
||||
|
||||
/// <summary>
|
||||
/// Controller is deprecated use newer version.
|
||||
/// </summary>
|
||||
[ApiController,
|
||||
ApiVersion(Versions._1_0, Deprecated = true),
|
||||
Route(ApplicationEnvironment.WebApi.ControllerRouteTemplate)]
|
||||
public class ExampleController : FluentApiControllerBase
|
||||
{
|
||||
public class ExampleController : FluentApiControllerBase
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private readonly IExampleProvider _provider;
|
||||
@@ -48,5 +48,4 @@ namespace GerstITS.Examples.Api.Controllers
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -5,16 +5,16 @@ using GerstITS.Web.Api;
|
||||
using GerstITS.Web.Api.FluentApi;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace GerstITS.Examples.Api.Controllers._1._1
|
||||
{
|
||||
/// <summary>
|
||||
/// Is responsible to get employee organization assignment examples.
|
||||
/// </summary>
|
||||
[ApiController,
|
||||
namespace GerstITS.Examples.Api.Controllers._1._1;
|
||||
|
||||
/// <summary>
|
||||
/// Is responsible to get employee organization assignment examples.
|
||||
/// </summary>
|
||||
[ApiController,
|
||||
ApiVersion(Versions._1_1),
|
||||
Route(ApplicationEnvironment.WebApi.ControllerRouteTemplate)]
|
||||
public class ExampleController : FluentApiControllerBase
|
||||
{
|
||||
public class ExampleController : FluentApiControllerBase
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private readonly IExampleProvider _provider;
|
||||
@@ -48,5 +48,4 @@ namespace GerstITS.Examples.Api.Controllers._1._1
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using GerstITS.Examples.Api.Configurations;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace GerstITS.Examples.Api
|
||||
namespace GerstITS.Examples.Api;
|
||||
|
||||
public sealed partial class Module
|
||||
{
|
||||
public sealed partial class Module
|
||||
{
|
||||
#region Methods
|
||||
|
||||
private static void RegisterConfigurations(IServiceCollection container)
|
||||
@@ -18,5 +18,4 @@ namespace GerstITS.Examples.Api
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
using GerstITS.Web.Api.ExceptionHandling.Extensions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace GerstITS.Examples.Api
|
||||
namespace GerstITS.Examples.Api;
|
||||
|
||||
public sealed partial class Module
|
||||
{
|
||||
public sealed partial class Module
|
||||
{
|
||||
#region Methods
|
||||
|
||||
private static void RegisterExceptionHandling(IServiceCollection container)
|
||||
@@ -14,5 +14,4 @@ namespace GerstITS.Examples.Api
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace GerstITS.Examples.Api
|
||||
namespace GerstITS.Examples.Api;
|
||||
|
||||
public sealed partial class Module
|
||||
{
|
||||
public sealed partial class Module
|
||||
{
|
||||
#region Methods
|
||||
|
||||
private static void RegisterMvc(IServiceCollection container)
|
||||
@@ -17,5 +17,4 @@ namespace GerstITS.Examples.Api
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
using GerstITS.IoC.DotNetCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace GerstITS.Examples.Api
|
||||
namespace GerstITS.Examples.Api;
|
||||
|
||||
public sealed partial class Module
|
||||
{
|
||||
public sealed partial class Module
|
||||
{
|
||||
#region Methods
|
||||
|
||||
private static void RegisterStartupTasks(IServiceCollection container)
|
||||
@@ -14,5 +14,4 @@ namespace GerstITS.Examples.Api
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using GerstITS.IoC;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace GerstITS.Examples.Api
|
||||
namespace GerstITS.Examples.Api;
|
||||
|
||||
public sealed partial class Module : IIoCModule<IServiceCollection>
|
||||
{
|
||||
public sealed partial class Module : IIoCModule<IServiceCollection>
|
||||
{
|
||||
#region IIoCModule
|
||||
|
||||
public void RegisterComponents(IServiceCollection container)
|
||||
@@ -16,5 +16,4 @@ namespace GerstITS.Examples.Api
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using GerstITS.Logging.Serilog;
|
||||
using GerstITS.Web.Api.Hosting;
|
||||
|
||||
namespace GerstITS.Examples.Api
|
||||
namespace GerstITS.Examples.Api;
|
||||
|
||||
public class Program : ProgramBase<Program>
|
||||
{
|
||||
public class Program : ProgramBase<Program>
|
||||
{
|
||||
#region Methods
|
||||
|
||||
public static void Main(string[] args)
|
||||
@@ -19,5 +19,4 @@ namespace GerstITS.Examples.Api
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,10 @@ using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace GerstITS.Examples.Api
|
||||
namespace GerstITS.Examples.Api;
|
||||
|
||||
public class Startup : BootstrapperStartupBase
|
||||
{
|
||||
public class Startup : BootstrapperStartupBase
|
||||
{
|
||||
#region Methods
|
||||
|
||||
protected override void ConfigureApplication(IApplicationBuilder applicationBuilder, IWebHostEnvironment webHostEnvironment)
|
||||
@@ -30,5 +30,4 @@ namespace GerstITS.Examples.Api
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
using GerstITS.Job.Scheduling;
|
||||
|
||||
namespace GerstITS.Examples.Jobs.SayHelloWorld.Configurations
|
||||
namespace GerstITS.Examples.Jobs.SayHelloWorld.Configurations;
|
||||
|
||||
public class SayHelloWorldJobConfiguration : JobSchedulingConfigurationBase
|
||||
{
|
||||
public class SayHelloWorldJobConfiguration : JobSchedulingConfigurationBase
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public SayHelloWorldJobConfiguration(Microsoft.Extensions.Configuration.IConfiguration configuration)
|
||||
@@ -12,5 +12,4 @@ namespace GerstITS.Examples.Jobs.SayHelloWorld.Configurations
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -6,11 +6,11 @@ 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
|
||||
{
|
||||
[DisallowConcurrentExecution]
|
||||
public class SayHelloWorldJob : JobBase
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private readonly SayHelloWorldJobConfiguration _configuration;
|
||||
@@ -41,5 +41,4 @@ namespace GerstITS.Examples.Jobs.SayHelloWorld.Jobs
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,10 @@ 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>
|
||||
{
|
||||
public sealed class Module : IIoCModule<IServiceCollection>
|
||||
{
|
||||
#region IIoCModule
|
||||
|
||||
public void RegisterComponents(IServiceCollection container)
|
||||
@@ -16,5 +16,4 @@ namespace GerstITS.Examples.Jobs.SayHelloWorld
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace GerstITS.Examples.Logic.Example
|
||||
namespace GerstITS.Examples.Logic.Example;
|
||||
|
||||
public class Example
|
||||
{
|
||||
public class Example
|
||||
{
|
||||
#region Properties
|
||||
|
||||
public string FirstName { get; set; }
|
||||
@@ -9,5 +9,4 @@
|
||||
public string Description { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
namespace GerstITS.Examples.Logic.Example
|
||||
namespace GerstITS.Examples.Logic.Example;
|
||||
|
||||
public interface IExampleProvider
|
||||
{
|
||||
public interface IExampleProvider
|
||||
{
|
||||
Example GetById(int id);
|
||||
Example GetById_v1_1(int id);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using AutoMapper;
|
||||
using GerstITS.Data;
|
||||
|
||||
namespace GerstITS.Examples.Logic.Example
|
||||
namespace GerstITS.Examples.Logic.Example;
|
||||
|
||||
internal sealed class ExampleProvider : IExampleProvider
|
||||
{
|
||||
internal sealed class ExampleProvider : IExampleProvider
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private readonly IMapper _mapper;
|
||||
@@ -47,5 +47,4 @@ namespace GerstITS.Examples.Logic.Example
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
using AutoMapper;
|
||||
|
||||
namespace GerstITS.Examples.Logic.Example
|
||||
namespace GerstITS.Examples.Logic.Example;
|
||||
|
||||
internal sealed class IntegerMapping : Profile
|
||||
{
|
||||
internal sealed class IntegerMapping : Profile
|
||||
{
|
||||
#region Construtcors
|
||||
|
||||
public IntegerMapping()
|
||||
@@ -15,5 +15,4 @@ namespace GerstITS.Examples.Logic.Example
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
using GerstITS.Mapping.AutoMapper;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace GerstITS.Examples.Logic
|
||||
namespace GerstITS.Examples.Logic;
|
||||
|
||||
public sealed partial class Module
|
||||
{
|
||||
public sealed partial class Module
|
||||
{
|
||||
#region Methods
|
||||
|
||||
private static void RegisterExample(IServiceCollection container)
|
||||
@@ -16,5 +16,4 @@ namespace GerstITS.Examples.Logic
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,10 @@ using GerstITS.Search;
|
||||
using GerstITS.Validation;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace GerstITS.Examples.Logic
|
||||
namespace GerstITS.Examples.Logic;
|
||||
|
||||
public sealed partial class Module
|
||||
{
|
||||
public sealed partial class Module
|
||||
{
|
||||
#region Methods
|
||||
|
||||
private static void RegisterShared(IServiceCollection container)
|
||||
@@ -18,5 +18,4 @@ namespace GerstITS.Examples.Logic
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using GerstITS.IoC;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace GerstITS.Examples.Logic
|
||||
namespace GerstITS.Examples.Logic;
|
||||
|
||||
public sealed partial class Module : IIoCModule<IServiceCollection>
|
||||
{
|
||||
public sealed partial class Module : IIoCModule<IServiceCollection>
|
||||
{
|
||||
#region IIoCModule
|
||||
|
||||
public void RegisterComponents(IServiceCollection container)
|
||||
@@ -14,5 +14,4 @@ namespace GerstITS.Examples.Logic
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,10 @@ using System.Linq.Expressions;
|
||||
using GerstITS.Common;
|
||||
using GerstITS.Data;
|
||||
|
||||
namespace GerstITS.Examples.Logic.Shared
|
||||
namespace GerstITS.Examples.Logic.Shared;
|
||||
|
||||
internal static class ISearchEngineExtensions
|
||||
{
|
||||
internal static class ISearchEngineExtensions
|
||||
{
|
||||
#region Methods
|
||||
|
||||
public static TEntity QueryBy<TEntity>(this IReadOnlyRepository repository, Expression<Func<TEntity, bool>> condition)
|
||||
@@ -27,5 +27,4 @@ namespace GerstITS.Examples.Logic.Shared
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
namespace GerstITS.Examples.Logic.Shared.Search.Sorting
|
||||
namespace GerstITS.Examples.Logic.Shared.Search.Sorting;
|
||||
|
||||
internal interface ISortable
|
||||
{
|
||||
internal interface ISortable
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,10 @@ 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
|
||||
{
|
||||
internal class SortingProvider : ISortingProvider
|
||||
{
|
||||
#region ISortingProvider
|
||||
|
||||
public bool CanSort<TItem>(IQueryable<TItem> query)
|
||||
@@ -46,5 +46,4 @@ namespace GerstITS.Examples.Logic.Shared.Search.Sorting
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using FluentValidation;
|
||||
using GerstITS.Validation;
|
||||
|
||||
namespace GerstITS.Examples.Logic.Shared.Validation
|
||||
namespace GerstITS.Examples.Logic.Shared.Validation;
|
||||
|
||||
internal sealed class IdValidationRule : ValidationRuleBase<int>
|
||||
{
|
||||
internal sealed class IdValidationRule : ValidationRuleBase<int>
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public IdValidationRule()
|
||||
@@ -15,5 +15,4 @@ namespace GerstITS.Examples.Logic.Shared.Validation
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,10 @@ 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>
|
||||
{
|
||||
public class Module : IIoCModule<IServiceCollection>
|
||||
{
|
||||
#region IIoCModule
|
||||
|
||||
public void RegisterComponents(IServiceCollection container)
|
||||
@@ -21,5 +21,4 @@ namespace GerstITS.Examples.WebClient.Console
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
using GerstITS.IoC.DotNetCore;
|
||||
|
||||
namespace GerstITS.Examples.WebClient.Console
|
||||
namespace GerstITS.Examples.WebClient.Console;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private static readonly DotNetCoreApplicationBootstrapper _bootstrapper;
|
||||
@@ -27,5 +27,4 @@ namespace GerstITS.Examples.WebClient.Console
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,10 @@ 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
|
||||
{
|
||||
internal sealed class TestRunner : IApplicationStart
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private readonly IWebClient _webClient;
|
||||
@@ -47,5 +47,4 @@ namespace GerstITS.Examples.WebClient.Console.Tests
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
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
|
||||
{
|
||||
internal class ExampleApiClientConfiguration : RestWebServiceConfigurationBase
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public ExampleApiClientConfiguration(IConfiguration configuration)
|
||||
@@ -13,5 +13,4 @@ namespace GerstITS.Examples.WebClients.Examples.Api.Configurations
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
using GerstITS.Web.WebClients;
|
||||
|
||||
namespace GerstITS.Examples.WebClients.Examples.Api
|
||||
namespace GerstITS.Examples.WebClients.Examples.Api;
|
||||
|
||||
public interface ICountry : IWebService
|
||||
{
|
||||
public interface ICountry : IWebService
|
||||
{
|
||||
[WebMethod(WebMethods.Get),
|
||||
ResourceUrl("Country/{id}")]
|
||||
Country Get(int id);
|
||||
@@ -23,5 +23,4 @@ namespace GerstITS.Examples.WebClients.Examples.Api
|
||||
[WebMethod(WebMethods.Delete),
|
||||
ResourceUrl("Country/{id}")]
|
||||
void Delete(int id);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
namespace GerstITS.Examples.WebClients.Examples.Api
|
||||
namespace GerstITS.Examples.WebClients.Examples.Api;
|
||||
|
||||
public class Country
|
||||
{
|
||||
public class Country
|
||||
{
|
||||
#region Properties
|
||||
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace GerstITS.Examples.WebClients.Examples.Api
|
||||
namespace GerstITS.Examples.WebClients.Examples.Api;
|
||||
|
||||
public class SearchCriteria
|
||||
{
|
||||
public class SearchCriteria
|
||||
{
|
||||
#region Properties
|
||||
|
||||
internal int Id { get; set; }
|
||||
@@ -14,5 +14,4 @@
|
||||
public SortingDirections SortDirection { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GerstITS.Examples.WebClients.Examples.Api
|
||||
namespace GerstITS.Examples.WebClients.Examples.Api;
|
||||
|
||||
public class SearchResult<TItem>
|
||||
{
|
||||
public class SearchResult<TItem>
|
||||
{
|
||||
#region Properties
|
||||
|
||||
public int TotalCount { get; set; }
|
||||
@@ -20,5 +20,4 @@ namespace GerstITS.Examples.WebClients.Examples.Api
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
namespace GerstITS.Examples.WebClients.Examples.Api
|
||||
namespace GerstITS.Examples.WebClients.Examples.Api;
|
||||
|
||||
public enum SortingDirections
|
||||
{
|
||||
public enum SortingDirections
|
||||
{
|
||||
Ascending = 0,
|
||||
Descending
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
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>
|
||||
{
|
||||
internal sealed class ExampleApiClientCreatingRule : RestApiClientCreationRuleBase<ExampleApiClientConfiguration>
|
||||
{
|
||||
#region Properties
|
||||
|
||||
protected override Type[] SupportedTypes => new[] { typeof(ICountry) };
|
||||
@@ -21,5 +21,4 @@ namespace GerstITS.Examples.WebClients.Examples.Api.CreationRules
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
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
|
||||
{
|
||||
public sealed partial class Module
|
||||
{
|
||||
#region Methods
|
||||
|
||||
private static void RegisterConfigurations(IServiceCollection container)
|
||||
@@ -13,5 +13,4 @@ namespace GerstITS.Examples.WebClients.Examples.Api
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
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
|
||||
{
|
||||
public sealed partial class Module
|
||||
{
|
||||
#region Methods
|
||||
|
||||
private static void RegisterCreationRules(IServiceCollection container)
|
||||
@@ -14,5 +14,4 @@ namespace GerstITS.Examples.WebClients.Examples.Api
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
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>
|
||||
{
|
||||
public sealed partial class Module : IIoCModule<IServiceCollection>
|
||||
{
|
||||
#region IIoCModule
|
||||
|
||||
public void RegisterComponents(IServiceCollection container)
|
||||
@@ -14,5 +14,4 @@ namespace GerstITS.Examples.WebClients.Examples.Api
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user