diff --git a/src/Application/Framework.Application.Abstractions/Events/EventModel.cs b/src/Application/Framework.Application.Abstractions/Events/EventModel.cs index 491574621..4202dee9b 100644 --- a/src/Application/Framework.Application.Abstractions/Events/EventModel.cs +++ b/src/Application/Framework.Application.Abstractions/Events/EventModel.cs @@ -3,3 +3,4 @@ namespace Framework.Application.Events; public record EventModel(Type DomainType, ImmutableArray DomainObjectIdents, EventOperation EventOperation, long? Revision); + diff --git a/src/Application/Framework.Application.Abstractions/Events/IEventSystem.cs b/src/Application/Framework.Application.Abstractions/Events/IEventSystem.cs index edf26d347..4e061c5ce 100644 --- a/src/Application/Framework.Application.Abstractions/Events/IEventSystem.cs +++ b/src/Application/Framework.Application.Abstractions/Events/IEventSystem.cs @@ -11,3 +11,4 @@ public interface IEventSystem Task ForceEventAsync(EventModel eventModel, CancellationToken cancellationToken = default); } + diff --git a/src/Application/Framework.Application.Abstractions/FinancialYear/IFinancialYearCalculator.cs b/src/Application/Framework.Application.Abstractions/FinancialYear/IFinancialYearCalculator.cs index 740dbc402..40779d44c 100644 --- a/src/Application/Framework.Application.Abstractions/FinancialYear/IFinancialYearCalculator.cs +++ b/src/Application/Framework.Application.Abstractions/FinancialYear/IFinancialYearCalculator.cs @@ -16,3 +16,4 @@ public interface IFinancialYearCalculator bool IsStartFinancialYearDate(DateTime dateTime); } + diff --git a/src/Application/Framework.Application.Abstractions/FinancialYear/IFinancialYearService.cs b/src/Application/Framework.Application.Abstractions/FinancialYear/IFinancialYearService.cs index 8fe6d852d..f861a3da0 100644 --- a/src/Application/Framework.Application.Abstractions/FinancialYear/IFinancialYearService.cs +++ b/src/Application/Framework.Application.Abstractions/FinancialYear/IFinancialYearService.cs @@ -6,3 +6,4 @@ public interface IFinancialYearService { Period GetCurrentFinancialYear(); } + diff --git a/src/Application/Framework.Application.Abstractions/IServiceEvaluator.cs b/src/Application/Framework.Application.Abstractions/IServiceEvaluator.cs index fb8f9a237..78599124e 100644 --- a/src/Application/Framework.Application.Abstractions/IServiceEvaluator.cs +++ b/src/Application/Framework.Application.Abstractions/IServiceEvaluator.cs @@ -1,6 +1,6 @@ -using Framework.Database; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using Framework.Database; namespace Framework.Application; @@ -8,3 +8,4 @@ public interface IServiceEvaluator { Task EvaluateAsync(DBSessionMode sessionMode, UserCredential? userCredential, Func> getResult); } + diff --git a/src/Application/Framework.Application.Abstractions/Jobs/IJobMiddlewareFactory.cs b/src/Application/Framework.Application.Abstractions/Jobs/IJobMiddlewareFactory.cs index 09b840d5b..0ff3b079d 100644 --- a/src/Application/Framework.Application.Abstractions/Jobs/IJobMiddlewareFactory.cs +++ b/src/Application/Framework.Application.Abstractions/Jobs/IJobMiddlewareFactory.cs @@ -6,3 +6,4 @@ public interface IJobMiddlewareFactory { IScopedEvaluatorMiddleware Create(bool withRootLogging); } + diff --git a/src/Application/Framework.Application.Abstractions/Jobs/JobServiceEvaluatorExtensions.cs b/src/Application/Framework.Application.Abstractions/Jobs/JobServiceEvaluatorExtensions.cs index 5902e00af..b2c554b36 100644 --- a/src/Application/Framework.Application.Abstractions/Jobs/JobServiceEvaluatorExtensions.cs +++ b/src/Application/Framework.Application.Abstractions/Jobs/JobServiceEvaluatorExtensions.cs @@ -8,3 +8,4 @@ public static async Task EvaluateAsync(this IJobServiceEvaluator await jobServiceEvaluator.EvaluateAsync(executeAsync.ToDefaultTask()); } + diff --git a/src/Application/Framework.Application.Abstractions/Lock/INamedLockService.cs b/src/Application/Framework.Application.Abstractions/Lock/INamedLockService.cs index c2931f5e7..17464321d 100644 --- a/src/Application/Framework.Application.Abstractions/Lock/INamedLockService.cs +++ b/src/Application/Framework.Application.Abstractions/Lock/INamedLockService.cs @@ -6,3 +6,4 @@ public interface INamedLockService { Task LockAsync(NamedLock namedLock, LockRole lockRole, CancellationToken cancellationToken = default); } + diff --git a/src/Application/Framework.Application.Abstractions/Middleware/ScopedEvaluatorMiddlewareExtensions.cs b/src/Application/Framework.Application.Abstractions/Middleware/ScopedEvaluatorMiddlewareExtensions.cs index 7f3c9c089..085f78d5f 100644 --- a/src/Application/Framework.Application.Abstractions/Middleware/ScopedEvaluatorMiddlewareExtensions.cs +++ b/src/Application/Framework.Application.Abstractions/Middleware/ScopedEvaluatorMiddlewareExtensions.cs @@ -42,3 +42,4 @@ private class WithMiddleware(IScopedEvaluatorMiddleware middleware, IScopedEvalu public async Task EvaluateAsync(Func> getResult) => await otherMiddleware.EvaluateAsync(async () => await middleware.EvaluateAsync(async () => await getResult())); } } + diff --git a/src/Application/Framework.Application.Abstractions/Repository/IGenericRepository.cs b/src/Application/Framework.Application.Abstractions/Repository/IGenericRepository.cs index c46e8df19..7512cb44c 100644 --- a/src/Application/Framework.Application.Abstractions/Repository/IGenericRepository.cs +++ b/src/Application/Framework.Application.Abstractions/Repository/IGenericRepository.cs @@ -31,3 +31,4 @@ public interface IGenericRepository Task LockAsync(TDomainObject domainObject, LockRole lockRole, CancellationToken cancellationToken = default); } + diff --git a/src/Application/Framework.Application.Abstractions/Repository/IRepository.cs b/src/Application/Framework.Application.Abstractions/Repository/IRepository.cs index 6d6fcfa17..b20e97f57 100644 --- a/src/Application/Framework.Application.Abstractions/Repository/IRepository.cs +++ b/src/Application/Framework.Application.Abstractions/Repository/IRepository.cs @@ -25,3 +25,4 @@ public interface IRepository Task LockAsync(TDomainObject domainObject, LockRole lockRole, CancellationToken cancellationToken = default); } + diff --git a/src/Application/Framework.Application.Abstractions/Repository/ITemplateGenericRepositoryFactory.cs b/src/Application/Framework.Application.Abstractions/Repository/ITemplateGenericRepositoryFactory.cs index 12fe3a166..ebabe50b5 100644 --- a/src/Application/Framework.Application.Abstractions/Repository/ITemplateGenericRepositoryFactory.cs +++ b/src/Application/Framework.Application.Abstractions/Repository/ITemplateGenericRepositoryFactory.cs @@ -14,3 +14,4 @@ public interface ITemplateGenericRepositoryFactory securityProvider); } + diff --git a/src/Application/Framework.Application.Abstractions/ServiceEvaluatorExtensions.cs b/src/Application/Framework.Application.Abstractions/ServiceEvaluatorExtensions.cs index b6e699a9f..0a3abe8e0 100644 --- a/src/Application/Framework.Application.Abstractions/ServiceEvaluatorExtensions.cs +++ b/src/Application/Framework.Application.Abstractions/ServiceEvaluatorExtensions.cs @@ -1,9 +1,8 @@ using Anch.Core; +using Anch.SecuritySystem; using Framework.Database; -using Anch.SecuritySystem; - namespace Framework.Application; public static class ServiceEvaluatorExtensions @@ -36,3 +35,4 @@ public TResult Evaluate(DBSessionMode sessionMode, UserCredential? cust } } } + diff --git a/src/Application/Framework.Application.Runtime/DBSessionEvaluator.cs b/src/Application/Framework.Application.Runtime/DBSessionEvaluator.cs index 46850885c..be2d2d9a3 100644 --- a/src/Application/Framework.Application.Runtime/DBSessionEvaluator.cs +++ b/src/Application/Framework.Application.Runtime/DBSessionEvaluator.cs @@ -16,3 +16,4 @@ public async Task EvaluateAsync(DBSessionMode sessionMode, Fun return await sessionMiddleware.EvaluateAsync(async () => await getResult(scope.ServiceProvider)); } } + diff --git a/src/Application/Framework.Application.Runtime/DalGenericRepository.cs b/src/Application/Framework.Application.Runtime/DalGenericRepository.cs index 9e1422ed0..d2b66e9a6 100644 --- a/src/Application/Framework.Application.Runtime/DalGenericRepository.cs +++ b/src/Application/Framework.Application.Runtime/DalGenericRepository.cs @@ -34,3 +34,4 @@ public async Task RemoveAsync(TDomainObject data, CancellationTok await dal.RemoveAsync(data, cancellationToken); } } + diff --git a/src/Application/Framework.Application.Runtime/DalQueryableSource.cs b/src/Application/Framework.Application.Runtime/DalQueryableSource.cs index 66feae28a..2c137a847 100644 --- a/src/Application/Framework.Application.Runtime/DalQueryableSource.cs +++ b/src/Application/Framework.Application.Runtime/DalQueryableSource.cs @@ -12,3 +12,4 @@ public IQueryable GetQueryable() where TDomainObject : class => serviceProvider.GetRequiredService>().GetQueryable(); } + diff --git a/src/Application/Framework.Application.Runtime/Events/EventOperationSenderExtensions.cs b/src/Application/Framework.Application.Runtime/Events/EventOperationSenderExtensions.cs index 791998711..8213f1b8f 100644 --- a/src/Application/Framework.Application.Runtime/Events/EventOperationSenderExtensions.cs +++ b/src/Application/Framework.Application.Runtime/Events/EventOperationSenderExtensions.cs @@ -15,3 +15,4 @@ public static async Task Send( .CreateGenericMethod(domainObjectType) .Invoke(sender, [domainObject, domainObjectEvent]); } + diff --git a/src/Application/Framework.Application.Runtime/FinancialYear/FinancialYearCalculator.cs b/src/Application/Framework.Application.Runtime/FinancialYear/FinancialYearCalculator.cs index 55fe866ef..91b3d7612 100644 --- a/src/Application/Framework.Application.Runtime/FinancialYear/FinancialYearCalculator.cs +++ b/src/Application/Framework.Application.Runtime/FinancialYear/FinancialYearCalculator.cs @@ -1,9 +1,8 @@ using Framework.Core; - namespace Framework.Application.FinancialYear; -public class FinancialYearCalculator (FinancialYearServiceSettings settings) : IFinancialYearCalculator +public class FinancialYearCalculator(FinancialYearServiceSettings settings) : IFinancialYearCalculator { private const int MinMonthValue = 1; @@ -37,3 +36,4 @@ public int GetFinancialYear(int year, int month) public bool IsStartFinancialYearDate(DateTime dateTime) => dateTime.Day == 1 && dateTime.Month == settings.StartMonth; } + diff --git a/src/Application/Framework.Application.Runtime/FinancialYear/FinancialYearService.cs b/src/Application/Framework.Application.Runtime/FinancialYear/FinancialYearService.cs index eaeefecc7..0282c1379 100644 --- a/src/Application/Framework.Application.Runtime/FinancialYear/FinancialYearService.cs +++ b/src/Application/Framework.Application.Runtime/FinancialYear/FinancialYearService.cs @@ -1,9 +1,9 @@ using Framework.Core; - namespace Framework.Application.FinancialYear; public class FinancialYearService(TimeProvider timeProvider, IFinancialYearCalculator financialYearCalculator) : IFinancialYearService { public Period GetCurrentFinancialYear() => financialYearCalculator.GetFinancialYearPeriod(timeProvider.GetLocalNow().DateTime); } + diff --git a/src/Application/Framework.Application.Runtime/Jobs/JobLoggingMiddleware.cs b/src/Application/Framework.Application.Runtime/Jobs/JobLoggingMiddleware.cs index e2f396c60..7e0a5bd25 100644 --- a/src/Application/Framework.Application.Runtime/Jobs/JobLoggingMiddleware.cs +++ b/src/Application/Framework.Application.Runtime/Jobs/JobLoggingMiddleware.cs @@ -25,3 +25,4 @@ public async Task EvaluateAsync(Func> getResult) } } } + diff --git a/src/Application/Framework.Application.Runtime/Jobs/JobMiddlewareFactory.cs b/src/Application/Framework.Application.Runtime/Jobs/JobMiddlewareFactory.cs index f653b4cb0..86e72699f 100644 --- a/src/Application/Framework.Application.Runtime/Jobs/JobMiddlewareFactory.cs +++ b/src/Application/Framework.Application.Runtime/Jobs/JobMiddlewareFactory.cs @@ -27,3 +27,4 @@ protected virtual IEnumerable GetMiddlewares EvaluateAsync(Func> .EvaluateAsync(async () => await executeAsync(service)); } } + diff --git a/src/Application/Framework.Application.Runtime/Lock/GenericNamedLockTypeInfo.cs b/src/Application/Framework.Application.Runtime/Lock/GenericNamedLockTypeInfo.cs index d902347f2..1e65ca60c 100644 --- a/src/Application/Framework.Application.Runtime/Lock/GenericNamedLockTypeInfo.cs +++ b/src/Application/Framework.Application.Runtime/Lock/GenericNamedLockTypeInfo.cs @@ -3,3 +3,4 @@ namespace Framework.Application.Lock; public record GenericNamedLockTypeInfo(Expression> NamePath); + diff --git a/src/Application/Framework.Application.Runtime/Lock/INamedLockInitializer.cs b/src/Application/Framework.Application.Runtime/Lock/INamedLockInitializer.cs index 6574af202..19e0f4eca 100644 --- a/src/Application/Framework.Application.Runtime/Lock/INamedLockInitializer.cs +++ b/src/Application/Framework.Application.Runtime/Lock/INamedLockInitializer.cs @@ -3,3 +3,4 @@ namespace Framework.Application.Lock; public interface INamedLockInitializer : IInitializer; + diff --git a/src/Application/Framework.Application.Runtime/Lock/NamedLockInitializer.cs b/src/Application/Framework.Application.Runtime/Lock/NamedLockInitializer.cs index ff6cbeaee..3c729352d 100644 --- a/src/Application/Framework.Application.Runtime/Lock/NamedLockInitializer.cs +++ b/src/Application/Framework.Application.Runtime/Lock/NamedLockInitializer.cs @@ -1,12 +1,10 @@ using Anch.Core; +using Anch.GenericQueryable; +using Anch.SecuritySystem.Attributes; using Framework.Application.Repository; using Framework.Core; -using Anch.GenericQueryable; - -using Anch.SecuritySystem.Attributes; - namespace Framework.Application.Lock; public class NamedLockInitializer( @@ -36,3 +34,4 @@ public async Task Initialize(CancellationToken cancellationToken) } } } + diff --git a/src/Application/Framework.Application.Runtime/Lock/NamedLockService.cs b/src/Application/Framework.Application.Runtime/Lock/NamedLockService.cs index 813d92890..569713bac 100644 --- a/src/Application/Framework.Application.Runtime/Lock/NamedLockService.cs +++ b/src/Application/Framework.Application.Runtime/Lock/NamedLockService.cs @@ -1,12 +1,10 @@ using Anch.Core; +using Anch.GenericQueryable; +using Anch.SecuritySystem.Attributes; using Framework.Application.Repository; using Framework.Database; -using Anch.GenericQueryable; - -using Anch.SecuritySystem.Attributes; - namespace Framework.Application.Lock; public class NamedLockService( @@ -22,3 +20,4 @@ public async Task LockAsync(NamedLock namedLock, LockRole lockRole, Cancellation await namedLockRepository.LockAsync(genericNamedLock, lockRole, cancellationToken); } } + diff --git a/src/Application/Framework.Application.Runtime/Lock/NamedLockTypeContainerSource.cs b/src/Application/Framework.Application.Runtime/Lock/NamedLockTypeContainerSource.cs index ece699271..edc415366 100644 --- a/src/Application/Framework.Application.Runtime/Lock/NamedLockTypeContainerSource.cs +++ b/src/Application/Framework.Application.Runtime/Lock/NamedLockTypeContainerSource.cs @@ -6,3 +6,4 @@ public class NamedLockTypeContainerSource(Type typeInfo) : INamedLockSource { public IReadOnlyList NamedLocks { get; } = typeInfo.GetStaticPropertyValueList().ToList(); } + diff --git a/src/Application/Framework.Application.Runtime/Lock/RootNamedLockSource.cs b/src/Application/Framework.Application.Runtime/Lock/RootNamedLockSource.cs index 86444a05f..a3e35ba99 100644 --- a/src/Application/Framework.Application.Runtime/Lock/RootNamedLockSource.cs +++ b/src/Application/Framework.Application.Runtime/Lock/RootNamedLockSource.cs @@ -2,9 +2,10 @@ namespace Framework.Application.Lock; -public class RootNamedLockSource([FromKeyedServices(RootNamedLockSource.ElementsKey)]IEnumerable elements) : INamedLockSource +public class RootNamedLockSource([FromKeyedServices(RootNamedLockSource.ElementsKey)] IEnumerable elements) : INamedLockSource { public const string ElementsKey = "Elements"; public IReadOnlyList NamedLocks { get; } = elements.SelectMany(el => el.NamedLocks).ToList(); } + diff --git a/src/Application/Framework.Application.Runtime/Middleware/ImpersonateEvaluatorMiddleware.cs b/src/Application/Framework.Application.Runtime/Middleware/ImpersonateEvaluatorMiddleware.cs index 2aacc5aa0..71454736a 100644 --- a/src/Application/Framework.Application.Runtime/Middleware/ImpersonateEvaluatorMiddleware.cs +++ b/src/Application/Framework.Application.Runtime/Middleware/ImpersonateEvaluatorMiddleware.cs @@ -1,8 +1,8 @@ -using Microsoft.Extensions.DependencyInjection; - -using Anch.SecuritySystem; +using Anch.SecuritySystem; using Anch.SecuritySystem.Services; +using Microsoft.Extensions.DependencyInjection; + namespace Framework.Application.Middleware; public class ImpersonateEvaluatorMiddleware(IServiceProvider scopedServiceProvider, UserCredential customUserCredential) : IScopedEvaluatorMiddleware @@ -14,3 +14,4 @@ public async Task EvaluateAsync(Func> getResult) return await impersonateService.WithImpersonateAsync(customUserCredential, getResult); } } + diff --git a/src/Application/Framework.Application.Runtime/Middleware/SessionEvaluatorMiddleware.cs b/src/Application/Framework.Application.Runtime/Middleware/SessionEvaluatorMiddleware.cs index 316b97b89..00b77301b 100644 --- a/src/Application/Framework.Application.Runtime/Middleware/SessionEvaluatorMiddleware.cs +++ b/src/Application/Framework.Application.Runtime/Middleware/SessionEvaluatorMiddleware.cs @@ -27,3 +27,4 @@ public async Task EvaluateAsync(Func> getResult) } } } + diff --git a/src/Application/Framework.Application.Runtime/Middleware/TryCloseSessionEvaluatorMiddleware.cs b/src/Application/Framework.Application.Runtime/Middleware/TryCloseSessionEvaluatorMiddleware.cs index 44eee2cc8..dc58917cc 100644 --- a/src/Application/Framework.Application.Runtime/Middleware/TryCloseSessionEvaluatorMiddleware.cs +++ b/src/Application/Framework.Application.Runtime/Middleware/TryCloseSessionEvaluatorMiddleware.cs @@ -6,3 +6,4 @@ public class TryCloseSessionEvaluatorMiddleware(IDBSessionManager dbSessionManag { public async Task EvaluateAsync(Func> getResult) => await dbSessionManager.EvaluateAsync(getResult); } + diff --git a/src/Application/Framework.Application.Runtime/Repository/Default/EditRepository.cs b/src/Application/Framework.Application.Runtime/Repository/Default/EditRepository.cs index 60a088d71..944808ddd 100644 --- a/src/Application/Framework.Application.Runtime/Repository/Default/EditRepository.cs +++ b/src/Application/Framework.Application.Runtime/Repository/Default/EditRepository.cs @@ -1,9 +1,9 @@ -using Framework.Database; - -using Anch.SecuritySystem; +using Anch.SecuritySystem; using Anch.SecuritySystem.AccessDenied; using Anch.SecuritySystem.DomainServices; +using Framework.Database; + namespace Framework.Application.Repository.Default; public class EditRepository( @@ -15,3 +15,4 @@ public class EditRepository( accessDeniedExceptionService, domainSecurityService.GetSecurityProvider(SecurityRule.Edit)) where TDomainObject : class; + diff --git a/src/Application/Framework.Application.Runtime/Repository/Default/Repository.cs b/src/Application/Framework.Application.Runtime/Repository/Default/Repository.cs index 0194e539f..165e24f4b 100644 --- a/src/Application/Framework.Application.Runtime/Repository/Default/Repository.cs +++ b/src/Application/Framework.Application.Runtime/Repository/Default/Repository.cs @@ -1,9 +1,9 @@ -using Framework.Application.Repository.Generic; -using Framework.Database; - -using Anch.SecuritySystem.AccessDenied; +using Anch.SecuritySystem.AccessDenied; using Anch.SecuritySystem.Providers; +using Framework.Application.Repository.Generic; +using Framework.Database; + namespace Framework.Application.Repository.Default; public class Repository( @@ -13,3 +13,4 @@ public class Repository( : GenericRepository(dal, accessDeniedExceptionService, securityProvider), IRepository where TDomainObject : class; + diff --git a/src/Application/Framework.Application.Runtime/Repository/Default/RepositoryFactory.cs b/src/Application/Framework.Application.Runtime/Repository/Default/RepositoryFactory.cs index 0b146a497..e2bbebaee 100644 --- a/src/Application/Framework.Application.Runtime/Repository/Default/RepositoryFactory.cs +++ b/src/Application/Framework.Application.Runtime/Repository/Default/RepositoryFactory.cs @@ -1,5 +1,4 @@ using Anch.Core; - using Anch.SecuritySystem.DomainServices; namespace Framework.Application.Repository.Default; @@ -11,3 +10,4 @@ public class RepositoryFactory(IServiceProxyFactory serviceProxyF TDomainObject>(serviceProxyFactory, domainSecurityService), IRepositoryFactory where TDomainObject : class; + diff --git a/src/Application/Framework.Application.Runtime/Repository/Default/ViewRepository.cs b/src/Application/Framework.Application.Runtime/Repository/Default/ViewRepository.cs index daaab9e77..95704c712 100644 --- a/src/Application/Framework.Application.Runtime/Repository/Default/ViewRepository.cs +++ b/src/Application/Framework.Application.Runtime/Repository/Default/ViewRepository.cs @@ -1,9 +1,9 @@ -using Framework.Database; - -using Anch.SecuritySystem; +using Anch.SecuritySystem; using Anch.SecuritySystem.AccessDenied; using Anch.SecuritySystem.DomainServices; +using Framework.Database; + namespace Framework.Application.Repository.Default; public class ViewRepository( @@ -15,3 +15,4 @@ public class ViewRepository( accessDeniedExceptionService, domainSecurityService.GetSecurityProvider(SecurityRule.View)) where TDomainObject : class; + diff --git a/src/Application/Framework.Application.Runtime/Repository/Generic/GenericRepository.cs b/src/Application/Framework.Application.Runtime/Repository/Generic/GenericRepository.cs index 2bcae3416..26275dff6 100644 --- a/src/Application/Framework.Application.Runtime/Repository/Generic/GenericRepository.cs +++ b/src/Application/Framework.Application.Runtime/Repository/Generic/GenericRepository.cs @@ -1,10 +1,9 @@ using Anch.Core; - -using Framework.Database; - using Anch.SecuritySystem.AccessDenied; using Anch.SecuritySystem.Providers; +using Framework.Database; + namespace Framework.Application.Repository.Generic; public class GenericRepository( @@ -53,3 +52,4 @@ public async Task RefreshAsync(TDomainObject domainObject, CancellationToken can public async Task LockAsync(TDomainObject domainObject, LockRole lockRole, CancellationToken cancellationToken) => await dal.LockAsync(domainObject, lockRole, cancellationToken); } + diff --git a/src/Application/Framework.Application.Runtime/Repository/Generic/GenericRepositoryFactory.cs b/src/Application/Framework.Application.Runtime/Repository/Generic/GenericRepositoryFactory.cs index 18d80194e..8f894663b 100644 --- a/src/Application/Framework.Application.Runtime/Repository/Generic/GenericRepositoryFactory.cs +++ b/src/Application/Framework.Application.Runtime/Repository/Generic/GenericRepositoryFactory.cs @@ -1,5 +1,4 @@ using Anch.Core; - using Anch.SecuritySystem.DomainServices; namespace Framework.Application.Repository.Generic; @@ -11,3 +10,4 @@ public class GenericRepositoryFactory(IServiceProxyFactor TDomainObject>(serviceProxyFactory, domainSecurityService), IGenericRepositoryFactory where TDomainObject : class; + diff --git a/src/Application/Framework.Application.Runtime/Repository/TemplateRepositoryFactory.cs b/src/Application/Framework.Application.Runtime/Repository/TemplateRepositoryFactory.cs index 2cd8566c5..fc525e4f7 100644 --- a/src/Application/Framework.Application.Runtime/Repository/TemplateRepositoryFactory.cs +++ b/src/Application/Framework.Application.Runtime/Repository/TemplateRepositoryFactory.cs @@ -1,5 +1,4 @@ using Anch.Core; - using Anch.SecuritySystem; using Anch.SecuritySystem.DomainServices; using Anch.SecuritySystem.Providers; @@ -21,3 +20,4 @@ public TRepository Create(SecurityRule securityRule) => public TRepository Create(ISecurityProvider securityProvider) => serviceProxyFactory.Create(securityProvider); } + diff --git a/src/Application/Framework.Application.Runtime/ServiceEvaluator.cs b/src/Application/Framework.Application.Runtime/ServiceEvaluator.cs index 9cbd49042..73077c95b 100644 --- a/src/Application/Framework.Application.Runtime/ServiceEvaluator.cs +++ b/src/Application/Framework.Application.Runtime/ServiceEvaluator.cs @@ -1,10 +1,10 @@ -using Framework.Application.Middleware; +using Anch.SecuritySystem; + +using Framework.Application.Middleware; using Framework.Database; using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem; - namespace Framework.Application; public class ServiceEvaluator(IServiceProvider rootServiceProvider) : IServiceEvaluator @@ -32,3 +32,4 @@ private static IEnumerable GetMiddlewares(IServicePr } } } + diff --git a/src/Application/Framework.Application.Tests/PeriodTests.cs b/src/Application/Framework.Application.Tests/PeriodTests.cs index be6feb93e..c45ab6d57 100644 --- a/src/Application/Framework.Application.Tests/PeriodTests.cs +++ b/src/Application/Framework.Application.Tests/PeriodTests.cs @@ -67,3 +67,4 @@ public void GetFinancialYear_YearOutOfRange_ThrowArgumentOutOfRangeException(int Assert.IsType(ex); } } + diff --git a/src/Application/Framework.Application/DependencyInjection/DALListenerSetup.cs b/src/Application/Framework.Application/DependencyInjection/DALListenerSetup.cs index 0db95514e..7bd3484a4 100644 --- a/src/Application/Framework.Application/DependencyInjection/DALListenerSetup.cs +++ b/src/Application/Framework.Application/DependencyInjection/DALListenerSetup.cs @@ -66,3 +66,4 @@ private void AddService(IServiceCollection services) where TService : class => services.AddScopedFromLazyInterfaceImplement(false); } + diff --git a/src/Application/Framework.Application/DependencyInjection/GenericNamedLockSetup.cs b/src/Application/Framework.Application/DependencyInjection/GenericNamedLockSetup.cs index 2ef09929c..7bc7a2f07 100644 --- a/src/Application/Framework.Application/DependencyInjection/GenericNamedLockSetup.cs +++ b/src/Application/Framework.Application/DependencyInjection/GenericNamedLockSetup.cs @@ -53,3 +53,4 @@ public void Initialize(IServiceCollection services) this.elementsInitAction.ForEach(a => a(services)); } } + diff --git a/src/Application/Framework.Application/DependencyInjection/IDALListenerSetup.cs b/src/Application/Framework.Application/DependencyInjection/IDALListenerSetup.cs index a7b969f69..7e9ea2f0c 100644 --- a/src/Application/Framework.Application/DependencyInjection/IDALListenerSetup.cs +++ b/src/Application/Framework.Application/DependencyInjection/IDALListenerSetup.cs @@ -7,3 +7,4 @@ public interface IDALListenerSetup IDALListenerSetup Add() where TListener : class, IDALListener; } + diff --git a/src/Application/Framework.Application/DependencyInjection/IGenericNamedLockSetup.cs b/src/Application/Framework.Application/DependencyInjection/IGenericNamedLockSetup.cs index 946794295..aeedb010b 100644 --- a/src/Application/Framework.Application/DependencyInjection/IGenericNamedLockSetup.cs +++ b/src/Application/Framework.Application/DependencyInjection/IGenericNamedLockSetup.cs @@ -15,3 +15,4 @@ IGenericNamedLockSetup SetNameLockType(Expression this.AddManual(new NamedLock(domainType)); } + diff --git a/src/Application/Framework.Application/DependencyInjection/ServiceCollectionExtensions.cs b/src/Application/Framework.Application/DependencyInjection/ServiceCollectionExtensions.cs index 67e19b7c5..bdd08efac 100644 --- a/src/Application/Framework.Application/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Application/Framework.Application/DependencyInjection/ServiceCollectionExtensions.cs @@ -1,4 +1,5 @@ using Anch.DependencyInjection; +using Anch.SecuritySystem; using Framework.Application.Events; using Framework.Application.FinancialYear; @@ -11,8 +12,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; -using Anch.SecuritySystem; - namespace Framework.Application.DependencyInjection; public static class ServiceCollectionExtensions @@ -81,3 +80,4 @@ private IServiceCollection AddJobs() } } } + diff --git a/src/AutomationCore/Framework.AutomationCore.Legacy/IntegrationTestBase.cs b/src/AutomationCore/Framework.AutomationCore.Legacy/IntegrationTestBase.cs index 825b8b09f..12f85cbeb 100644 --- a/src/AutomationCore/Framework.AutomationCore.Legacy/IntegrationTestBase.cs +++ b/src/AutomationCore/Framework.AutomationCore.Legacy/IntegrationTestBase.cs @@ -1,4 +1,5 @@ using Anch.Core; +using Anch.SecuritySystem; using Framework.Application; using Framework.Application.Repository; @@ -13,8 +14,6 @@ using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem; - namespace Framework.AutomationCore; public abstract class IntegrationTestBase(IServiceProvider rootServiceProvider) : RootServiceProviderContainer(rootServiceProvider) @@ -97,3 +96,4 @@ protected virtual List GetNotifications() => this.EvaluateRead(context => this.GetConfigurationBLLContext(context).Logics.DomainObjectNotification.GetFullList() .ToList(obj => DataContractSerializerHelper.Deserialize(obj.SerializeData))); } + diff --git a/src/AutomationCore/Framework.AutomationCore.Legacy/RootServiceProviderContainer/ContextEvaluatorExtensions.cs b/src/AutomationCore/Framework.AutomationCore.Legacy/RootServiceProviderContainer/ContextEvaluatorExtensions.cs index 614d478ea..d1d907c72 100644 --- a/src/AutomationCore/Framework.AutomationCore.Legacy/RootServiceProviderContainer/ContextEvaluatorExtensions.cs +++ b/src/AutomationCore/Framework.AutomationCore.Legacy/RootServiceProviderContainer/ContextEvaluatorExtensions.cs @@ -3,7 +3,7 @@ namespace Framework.AutomationCore.RootServiceProviderContainer; -public static class ContextEvaluatorExtensions +public static class ContextEvaluatorExtensions { public static TResult EvaluateWrite(this IServiceEvaluator contextEvaluator, Func func) => contextEvaluator.Evaluate(DBSessionMode.Write, func); @@ -13,3 +13,4 @@ public static class ContextEvaluatorExtensions public static TResult EvaluateRead(this IServiceEvaluator contextEvaluator, Func func) => contextEvaluator.Evaluate(DBSessionMode.Read, func); } + diff --git a/src/AutomationCore/Framework.AutomationCore.Legacy/RootServiceProviderContainer/ContextEvaluatorWithMappingExtensions.cs b/src/AutomationCore/Framework.AutomationCore.Legacy/RootServiceProviderContainer/ContextEvaluatorWithMappingExtensions.cs index b83cdb5b4..2bdcc6791 100644 --- a/src/AutomationCore/Framework.AutomationCore.Legacy/RootServiceProviderContainer/ContextEvaluatorWithMappingExtensions.cs +++ b/src/AutomationCore/Framework.AutomationCore.Legacy/RootServiceProviderContainer/ContextEvaluatorWithMappingExtensions.cs @@ -1,7 +1,7 @@ -using Framework.Database; -using Framework.Infrastructure.ContextEvaluator; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using Framework.Database; +using Framework.Infrastructure.ContextEvaluator; namespace Framework.AutomationCore.RootServiceProviderContainer; @@ -31,3 +31,4 @@ public static void EvaluateWrite(this IContextEval public static void EvaluateWrite(this IContextEvaluator contextEvaluator, Action action) => contextEvaluator.EvaluateWrite(null, action); } + diff --git a/src/AutomationCore/Framework.AutomationCore.Legacy/RootServiceProviderContainer/IRootServiceProviderContainer.cs b/src/AutomationCore/Framework.AutomationCore.Legacy/RootServiceProviderContainer/IRootServiceProviderContainer.cs index 6f08b1979..439b1c661 100644 --- a/src/AutomationCore/Framework.AutomationCore.Legacy/RootServiceProviderContainer/IRootServiceProviderContainer.cs +++ b/src/AutomationCore/Framework.AutomationCore.Legacy/RootServiceProviderContainer/IRootServiceProviderContainer.cs @@ -1,12 +1,12 @@ -using Framework.Application; +using Anch.SecuritySystem; + +using Framework.Application; using Framework.Database; using Framework.Infrastructure.ContextEvaluator; using Framework.Infrastructure.Services; using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem; - namespace Framework.AutomationCore.RootServiceProviderContainer; public interface IRootServiceProviderContainer : IRootServiceProviderContainer, IServiceEvaluator @@ -26,3 +26,4 @@ async Task IContextEvaluator.EvaluateAsyn Func, Task> getResult) => await this.RootServiceProvider.GetRequiredService>().EvaluateAsync(sessionMode, customUserCredential, getResult); } + diff --git a/src/AutomationCore/Framework.AutomationCore/AutomationFrameworkSettings.cs b/src/AutomationCore/Framework.AutomationCore/AutomationFrameworkSettings.cs index 5a9fc3e56..06da05c93 100644 --- a/src/AutomationCore/Framework.AutomationCore/AutomationFrameworkSettings.cs +++ b/src/AutomationCore/Framework.AutomationCore/AutomationFrameworkSettings.cs @@ -18,3 +18,4 @@ public class AutomationFrameworkSettings public string[] LocalAdmins { get; set; } = []; } + diff --git a/src/AutomationCore/Framework.AutomationCore/BssTestEnvironment.cs b/src/AutomationCore/Framework.AutomationCore/BssTestEnvironment.cs index 11dc21dae..3bf5a230d 100644 --- a/src/AutomationCore/Framework.AutomationCore/BssTestEnvironment.cs +++ b/src/AutomationCore/Framework.AutomationCore/BssTestEnvironment.cs @@ -55,3 +55,4 @@ protected virtual IServiceProvider InternalBuildServiceProvider(IServiceCollecti .Validate() .BuildServiceProvider(new ServiceProviderOptions { ValidateScopes = true, ValidateOnBuild = true }); } + diff --git a/src/AutomationCore/Framework.AutomationCore/Extensions/ExecuteSqlExtensions.cs b/src/AutomationCore/Framework.AutomationCore/Extensions/ExecuteSqlExtensions.cs index e570e513e..677aa738a 100644 --- a/src/AutomationCore/Framework.AutomationCore/Extensions/ExecuteSqlExtensions.cs +++ b/src/AutomationCore/Framework.AutomationCore/Extensions/ExecuteSqlExtensions.cs @@ -114,3 +114,4 @@ private static async Task ExecuteSqlScriptsAsync(string[] sqlPaths, SqlConnectio } } + diff --git a/src/AutomationCore/Framework.AutomationCore/Extensions/ServiceCollectionExtensions.cs b/src/AutomationCore/Framework.AutomationCore/Extensions/ServiceCollectionExtensions.cs index 2bffa710f..4bf1b199a 100644 --- a/src/AutomationCore/Framework.AutomationCore/Extensions/ServiceCollectionExtensions.cs +++ b/src/AutomationCore/Framework.AutomationCore/Extensions/ServiceCollectionExtensions.cs @@ -68,3 +68,4 @@ public IServiceCollection AddIntegrationTests(Action GetDefaultControllerEvaluator server.Databases.Contains(name) ? server.Databases[name] : null; } + diff --git a/src/AutomationCore/Framework.AutomationCore/Extensions/TestConnectionStringExtensions.cs b/src/AutomationCore/Framework.AutomationCore/Extensions/TestConnectionStringExtensions.cs index 015678c38..902ba57ff 100644 --- a/src/AutomationCore/Framework.AutomationCore/Extensions/TestConnectionStringExtensions.cs +++ b/src/AutomationCore/Framework.AutomationCore/Extensions/TestConnectionStringExtensions.cs @@ -1,4 +1,5 @@ using Anch.Testing.Database.ConnectionStringManagement; + using Microsoft.Data.SqlClient; namespace Framework.AutomationCore.Extensions; @@ -30,3 +31,4 @@ public static class TestConnectionStringExtensions } } } + diff --git a/src/AutomationCore/Framework.AutomationCore/RootServiceProviderContainer/IRootServiceProviderContainer.cs b/src/AutomationCore/Framework.AutomationCore/RootServiceProviderContainer/IRootServiceProviderContainer.cs index 2bff94e1e..830e90707 100644 --- a/src/AutomationCore/Framework.AutomationCore/RootServiceProviderContainer/IRootServiceProviderContainer.cs +++ b/src/AutomationCore/Framework.AutomationCore/RootServiceProviderContainer/IRootServiceProviderContainer.cs @@ -2,6 +2,7 @@ using Framework.AutomationCore.Extensions; using Framework.AutomationCore.Services; + using Microsoft.AspNetCore.Mvc; namespace Framework.AutomationCore.RootServiceProviderContainer; @@ -14,3 +15,4 @@ ControllerEvaluator GetControllerEvaluator(UserCredent where TController : ControllerBase => this.RootServiceProvider.GetDefaultControllerEvaluator(userCredential); } + diff --git a/src/AutomationCore/Framework.AutomationCore/RootServiceProviderContainer/RootServiceProviderContainer.cs b/src/AutomationCore/Framework.AutomationCore/RootServiceProviderContainer/RootServiceProviderContainer.cs index 1d861efde..0e40bf663 100644 --- a/src/AutomationCore/Framework.AutomationCore/RootServiceProviderContainer/RootServiceProviderContainer.cs +++ b/src/AutomationCore/Framework.AutomationCore/RootServiceProviderContainer/RootServiceProviderContainer.cs @@ -2,6 +2,7 @@ using Framework.AutomationCore.Extensions; using Framework.AutomationCore.Services; + using Microsoft.AspNetCore.Mvc; namespace Framework.AutomationCore.RootServiceProviderContainer; @@ -14,3 +15,4 @@ public virtual ControllerEvaluator GetControllerEvaluator this.RootServiceProvider.GetDefaultControllerEvaluator(userCredential); } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/BssCleanupTestEnvironmentHook.cs b/src/AutomationCore/Framework.AutomationCore/Services/BssCleanupTestEnvironmentHook.cs index 5862193d0..ea01a5bd9 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/BssCleanupTestEnvironmentHook.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/BssCleanupTestEnvironmentHook.cs @@ -13,3 +13,4 @@ public ValueTask Process(CancellationToken _) return ValueTask.CompletedTask; } } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/BssDatabaseManager.cs b/src/AutomationCore/Framework.AutomationCore/Services/BssDatabaseManager.cs index 11785487d..981eab12d 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/BssDatabaseManager.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/BssDatabaseManager.cs @@ -57,3 +57,4 @@ public async ValueTask Move(TestConnectionStringRole source, TestConnectionStrin } } } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/BssDatabaseSnapshotInitializer.cs b/src/AutomationCore/Framework.AutomationCore/Services/BssDatabaseSnapshotInitializer.cs index 0d8cd3c96..9a106c41d 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/BssDatabaseSnapshotInitializer.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/BssDatabaseSnapshotInitializer.cs @@ -15,3 +15,4 @@ public class BssDatabaseSnapshotInitializer( IDatabaseManager databaseManager, TestDatabaseSettings settings) : DatabaseSnapshotInitializer(emptySchemaInitializer, testDataInitializer, databaseManager, settings); + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/BssDatabaseTestingProvider.cs b/src/AutomationCore/Framework.AutomationCore/Services/BssDatabaseTestingProvider.cs index 0c91baad9..1de6c7112 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/BssDatabaseTestingProvider.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/BssDatabaseTestingProvider.cs @@ -18,3 +18,4 @@ public void AddServices(IServiceCollection services) => .AddKeyedSingleton(BssEmptySchemaInitializer.Key) .AddSingleton(new ExecuteScriptInfo(@"__Support\Scripts")); } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/BssEmptySchemaInitializer.cs b/src/AutomationCore/Framework.AutomationCore/Services/BssEmptySchemaInitializer.cs index ec177b7ba..8ef84a223 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/BssEmptySchemaInitializer.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/BssEmptySchemaInitializer.cs @@ -24,3 +24,4 @@ public async Task Initialize(CancellationToken cancellationToken) } } } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/BssTestConnectionStringFactory.cs b/src/AutomationCore/Framework.AutomationCore/Services/BssTestConnectionStringFactory.cs index d0fbb7837..c9b761d42 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/BssTestConnectionStringFactory.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/BssTestConnectionStringFactory.cs @@ -1,5 +1,6 @@ using Anch.Testing.Database; using Anch.Testing.Database.ConnectionStringManagement; + using Microsoft.Data.SqlClient; namespace Framework.AutomationCore.Services; @@ -18,3 +19,4 @@ public TestConnectionString Create(string postfix) return new TestConnectionString(builder.ConnectionString); } } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/BssTestingEvaluator.cs b/src/AutomationCore/Framework.AutomationCore/Services/BssTestingEvaluator.cs index d12b3f77d..7be163970 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/BssTestingEvaluator.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/BssTestingEvaluator.cs @@ -1,9 +1,9 @@ -using Framework.Application; -using Framework.Database; - -using Anch.SecuritySystem; +using Anch.SecuritySystem; using Anch.SecuritySystem.Testing; +using Framework.Application; +using Framework.Database; + namespace Framework.AutomationCore.Services; public class BssTestingEvaluator(IServiceEvaluator serviceEvaluator) : ITestingEvaluator @@ -11,3 +11,4 @@ public class BssTestingEvaluator(IServiceEvaluator serviceEv { public Task EvaluateAsync(TestingScopeMode mode, UserCredential? userCredential, Func> evaluate) => serviceEvaluator.EvaluateAsync((DBSessionMode)mode, userCredential, evaluate); } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/ControllerEvaluator.cs b/src/AutomationCore/Framework.AutomationCore/Services/ControllerEvaluator.cs index 9ca496434..6a238bbaf 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/ControllerEvaluator.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/ControllerEvaluator.cs @@ -2,6 +2,9 @@ using Anch.Core; using Anch.Core.Visitor; +using Anch.SecuritySystem; +using Anch.SecuritySystem.Services; +using Anch.SecuritySystem.Testing; using Framework.Core; using Framework.Database; @@ -12,10 +15,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem; -using Anch.SecuritySystem.Services; -using Anch.SecuritySystem.Testing; - namespace Framework.AutomationCore.Services; public class ControllerEvaluator(IServiceProvider rootServiceProvider, UserCredential? customUserCredential = null) @@ -111,3 +110,4 @@ private class WebApiInvoker(HttpContext context, RequestDelegate next) public async Task Invoke() => await next(context); } } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/DatabaseCatalogResolver.cs b/src/AutomationCore/Framework.AutomationCore/Services/DatabaseCatalogResolver.cs index 926b3a345..ee0ef6aba 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/DatabaseCatalogResolver.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/DatabaseCatalogResolver.cs @@ -30,3 +30,4 @@ public IEnumerable GetCatalogs(TestConnectionStringRole connectionString } } } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/DatabaseFileInfoResolver.cs b/src/AutomationCore/Framework.AutomationCore/Services/DatabaseFileInfoResolver.cs index ebb75ec43..8a18ca49b 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/DatabaseFileInfoResolver.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/DatabaseFileInfoResolver.cs @@ -13,3 +13,4 @@ public DatabaseFileInfo Resolve(string initialCatalog) return new DatabaseFileInfo(dbPath, logPath); } } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/IDatabaseCatalogResolver.cs b/src/AutomationCore/Framework.AutomationCore/Services/IDatabaseCatalogResolver.cs index e7c03eba2..f35e60782 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/IDatabaseCatalogResolver.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/IDatabaseCatalogResolver.cs @@ -6,3 +6,4 @@ public interface IDatabaseCatalogResolver { IEnumerable GetCatalogs(TestConnectionStringRole connectionStringRole); } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/ISqlServerFactory.cs b/src/AutomationCore/Framework.AutomationCore/Services/ISqlServerFactory.cs index 813022036..2e577e5ca 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/ISqlServerFactory.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/ISqlServerFactory.cs @@ -6,3 +6,4 @@ public interface ISqlServerFactory { Server Create(); } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/LocalDbManager.cs b/src/AutomationCore/Framework.AutomationCore/Services/LocalDbManager.cs index 14bf96b31..11b800daf 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/LocalDbManager.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/LocalDbManager.cs @@ -42,3 +42,4 @@ public static void DeleteLocalDb(string instanceName, StopInstanceOptions stopOp localDb.DeleteInstance(instanceName); } } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/NativeDatabaseManager.cs b/src/AutomationCore/Framework.AutomationCore/Services/NativeDatabaseManager.cs index adb946de7..c34b5f36f 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/NativeDatabaseManager.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/NativeDatabaseManager.cs @@ -134,3 +134,4 @@ private ValueTask CopyMove(string sourceInitialCatalog, string targetInitialCata ct), ct); } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/SqlServerFactory.cs b/src/AutomationCore/Framework.AutomationCore/Services/SqlServerFactory.cs index 665cf7b6d..9089de5e2 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/SqlServerFactory.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/SqlServerFactory.cs @@ -62,3 +62,4 @@ public void Dispose() } } } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/TestWebApiCurrentMethodResolver.cs b/src/AutomationCore/Framework.AutomationCore/Services/TestWebApiCurrentMethodResolver.cs index dacda56cf..9ed51d88d 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/TestWebApiCurrentMethodResolver.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/TestWebApiCurrentMethodResolver.cs @@ -12,3 +12,4 @@ public class TestWebApiCurrentMethodResolver : IWebApiCurrentMethodResolver public void SetCurrentMethod(MethodInfo methodInfo) => this.currentMethod = methodInfo; } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/TestWebApiExceptionExpander.cs b/src/AutomationCore/Framework.AutomationCore/Services/TestWebApiExceptionExpander.cs index d567162f1..3de1d0f2a 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/TestWebApiExceptionExpander.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/TestWebApiExceptionExpander.cs @@ -11,3 +11,4 @@ public class TestWebApiExceptionExpander(IExceptionExpander exceptionExpander) : /// public Exception? TryExpand(Exception baseException) => this.exceptionExpander.TryExpand(baseException); } + diff --git a/src/AutomationCore/Framework.AutomationCore/Services/TextRandomizer.cs b/src/AutomationCore/Framework.AutomationCore/Services/TextRandomizer.cs index 3a6ef7dd0..579450307 100644 --- a/src/AutomationCore/Framework.AutomationCore/Services/TextRandomizer.cs +++ b/src/AutomationCore/Framework.AutomationCore/Services/TextRandomizer.cs @@ -21,3 +21,4 @@ public static string RandomString(int size) return builder.ToString(); } } + diff --git a/src/AutomationCore/Framework.AutomationCore/WebApi/IntegrationWebApiBase.cs b/src/AutomationCore/Framework.AutomationCore/WebApi/IntegrationWebApiBase.cs index 75eaf9361..2cebeb7ff 100644 --- a/src/AutomationCore/Framework.AutomationCore/WebApi/IntegrationWebApiBase.cs +++ b/src/AutomationCore/Framework.AutomationCore/WebApi/IntegrationWebApiBase.cs @@ -1,4 +1,5 @@ using Anch.SecuritySystem; + using Framework.AutomationCore.Services; namespace Framework.AutomationCore.WebApi; @@ -10,3 +11,4 @@ public abstract class IntegrationWebApiBase(IServiceProvider rootServiceProvider public override ControllerEvaluator GetControllerEvaluator(UserCredential? userCredential = null) => base.GetControllerEvaluator(userCredential ?? this.IntegrationUserName); } + diff --git a/src/BLL/Framework.BLL.Abstractions/DTOFetchRule.cs b/src/BLL/Framework.BLL.Abstractions/DTOFetchRule.cs index 06676d338..3d675b1c1 100644 --- a/src/BLL/Framework.BLL.Abstractions/DTOFetchRule.cs +++ b/src/BLL/Framework.BLL.Abstractions/DTOFetchRule.cs @@ -1,6 +1,6 @@ -using Framework.BLL.Domain.DTO; +using Anch.GenericQueryable.Fetching; -using Anch.GenericQueryable.Fetching; +using Framework.BLL.Domain.DTO; namespace Framework.BLL; @@ -11,3 +11,4 @@ public DTOFetchRule(MainDTOType value) { } } + diff --git a/src/BLL/Framework.BLL.Abstractions/DefaultDomainBLLBaseExtensions.cs b/src/BLL/Framework.BLL.Abstractions/DefaultDomainBLLBaseExtensions.cs index 340d9a423..38bb01602 100644 --- a/src/BLL/Framework.BLL.Abstractions/DefaultDomainBLLBaseExtensions.cs +++ b/src/BLL/Framework.BLL.Abstractions/DefaultDomainBLLBaseExtensions.cs @@ -1,15 +1,14 @@ using System.Linq.Expressions; using Anch.Core; +using Anch.GenericQueryable; +using Anch.GenericQueryable.Fetching; using Framework.Application.Domain; using Framework.BLL.Domain.Persistent.IdentityObject; using Framework.BLL.Exceptions; using Framework.Core; -using Anch.GenericQueryable; -using Anch.GenericQueryable.Fetching; - namespace Framework.BLL; public static class DefaultDomainBLLBaseExtensions @@ -126,3 +125,4 @@ public static void SaveOrInsert exceptions) => exceptions.Select(ex => ex as BusinessLogicException ?? new BusinessLogicException(ex.Message, ex)).Aggregate(); } + diff --git a/src/BLL/Framework.BLL.Abstractions/Exceptions/ObjectByCodeNotFoundException.cs b/src/BLL/Framework.BLL.Abstractions/Exceptions/ObjectByCodeNotFoundException.cs index a2c3a2a4a..f76fbcd68 100644 --- a/src/BLL/Framework.BLL.Abstractions/Exceptions/ObjectByCodeNotFoundException.cs +++ b/src/BLL/Framework.BLL.Abstractions/Exceptions/ObjectByCodeNotFoundException.cs @@ -3,3 +3,4 @@ namespace Framework.BLL.Exceptions; public class ObjectByCodeNotFoundException(Type type, TCode code) : BusinessLogicException($"{type.Name} with code = \"{code}\" not found"); + diff --git a/src/BLL/Framework.BLL.Abstractions/Exceptions/ObjectByIdNotFoundException.cs b/src/BLL/Framework.BLL.Abstractions/Exceptions/ObjectByIdNotFoundException.cs index eca127d85..eed2017cf 100644 --- a/src/BLL/Framework.BLL.Abstractions/Exceptions/ObjectByIdNotFoundException.cs +++ b/src/BLL/Framework.BLL.Abstractions/Exceptions/ObjectByIdNotFoundException.cs @@ -5,3 +5,4 @@ namespace Framework.BLL.Exceptions; public class ObjectByIdNotFoundException(Type type, TIdent id) : BusinessLogicException($"{type.Name} with id = \"{id}\" not found"); public class ObjectByIdNotFoundException(Type type, Guid id) : ObjectByIdNotFoundException(type, id); + diff --git a/src/BLL/Framework.BLL.Abstractions/Exceptions/ObjectByNameNotFoundException.cs b/src/BLL/Framework.BLL.Abstractions/Exceptions/ObjectByNameNotFoundException.cs index e47ef5ea9..2c4317b00 100644 --- a/src/BLL/Framework.BLL.Abstractions/Exceptions/ObjectByNameNotFoundException.cs +++ b/src/BLL/Framework.BLL.Abstractions/Exceptions/ObjectByNameNotFoundException.cs @@ -3,3 +3,4 @@ namespace Framework.BLL.Exceptions; public class ObjectByNameNotFoundException(Type type, string name) : BusinessLogicException($"{type.Name} with name = \"{name}\" not found"); + diff --git a/src/BLL/Framework.BLL.Abstractions/IAccessDeniedExceptionServiceContainer.cs b/src/BLL/Framework.BLL.Abstractions/IAccessDeniedExceptionServiceContainer.cs index 774b0859b..9f7a42ce0 100644 --- a/src/BLL/Framework.BLL.Abstractions/IAccessDeniedExceptionServiceContainer.cs +++ b/src/BLL/Framework.BLL.Abstractions/IAccessDeniedExceptionServiceContainer.cs @@ -9,3 +9,4 @@ IAccessDeniedExceptionService AccessDeniedExceptionService get; } } + diff --git a/src/BLL/Framework.BLL.Abstractions/IBLLBaseContext.cs b/src/BLL/Framework.BLL.Abstractions/IBLLBaseContext.cs index 48ccc7698..7ab12db87 100644 --- a/src/BLL/Framework.BLL.Abstractions/IBLLBaseContext.cs +++ b/src/BLL/Framework.BLL.Abstractions/IBLLBaseContext.cs @@ -3,3 +3,4 @@ namespace Framework.BLL; public interface IBLLBaseContext : IBLLOperationEventContext, IServiceProviderContainer; + diff --git a/src/BLL/Framework.BLL.Abstractions/IBLLOperationEventContext.cs b/src/BLL/Framework.BLL.Abstractions/IBLLOperationEventContext.cs index 7c3051f4b..bc843403d 100644 --- a/src/BLL/Framework.BLL.Abstractions/IBLLOperationEventContext.cs +++ b/src/BLL/Framework.BLL.Abstractions/IBLLOperationEventContext.cs @@ -6,3 +6,4 @@ public interface IBLLOperationEventContext { IEventOperationSender OperationSender { get; } } + diff --git a/src/BLL/Framework.BLL.Abstractions/IBLLQueryBase.cs b/src/BLL/Framework.BLL.Abstractions/IBLLQueryBase.cs index ebadd830d..0311aa538 100644 --- a/src/BLL/Framework.BLL.Abstractions/IBLLQueryBase.cs +++ b/src/BLL/Framework.BLL.Abstractions/IBLLQueryBase.cs @@ -1,13 +1,12 @@ using System.Linq.Expressions; +using Anch.GenericQueryable.Fetching; +using Anch.OData.Domain; + using Framework.Application; using Framework.BLL.Domain.Models; using Framework.Database; -using Anch.GenericQueryable.Fetching; - -using Anch.OData.Domain; - namespace Framework.BLL; public interface IBLLQueryBase : IBLLSimpleQueryBase @@ -86,3 +85,4 @@ SelectOperationResult GetObjectsByOData( bool throwOnNotFound, Func, PropertyFetchRule> buildFetchRule); } + diff --git a/src/BLL/Framework.BLL.Abstractions/IDefaultBLLContext.cs b/src/BLL/Framework.BLL.Abstractions/IDefaultBLLContext.cs index 25b77661c..3467cb42f 100644 --- a/src/BLL/Framework.BLL.Abstractions/IDefaultBLLContext.cs +++ b/src/BLL/Framework.BLL.Abstractions/IDefaultBLLContext.cs @@ -9,3 +9,4 @@ public interface IDefaultBLLContext : IB IHierarchicalObjectExpanderFactoryContainer where TPersistentDomainObjectBase : class, IIdentityObject; + diff --git a/src/BLL/Framework.BLL.Abstractions/IDefaultBLLFactory.cs b/src/BLL/Framework.BLL.Abstractions/IDefaultBLLFactory.cs index cd4e067c2..d34fab258 100644 --- a/src/BLL/Framework.BLL.Abstractions/IDefaultBLLFactory.cs +++ b/src/BLL/Framework.BLL.Abstractions/IDefaultBLLFactory.cs @@ -8,3 +8,4 @@ public interface IDefaultBLLFactory IDefaultDomainBLLBase Create() where TDomainObject : class, TPersistentDomainObjectBase; } + diff --git a/src/BLL/Framework.BLL.Abstractions/IDefaultDomainBLLQueryBase.cs b/src/BLL/Framework.BLL.Abstractions/IDefaultDomainBLLQueryBase.cs index feea51b33..c3dd5572b 100644 --- a/src/BLL/Framework.BLL.Abstractions/IDefaultDomainBLLQueryBase.cs +++ b/src/BLL/Framework.BLL.Abstractions/IDefaultDomainBLLQueryBase.cs @@ -1,11 +1,10 @@ -using Framework.Application.Domain; +using Anch.GenericQueryable.Fetching; +using Anch.OData.Domain; + +using Framework.Application.Domain; using Framework.BLL.Domain.Persistent; using Framework.Database; -using Anch.GenericQueryable.Fetching; - -using Anch.OData.Domain; - namespace Framework.BLL; public interface IDefaultDomainBLLQueryBase : @@ -82,3 +81,4 @@ public interface IDefaultDomainBLLBase where TPersistentDomainObjectBase : class, IIdentityObject where TDomainObject : class, TPersistentDomainObjectBase; + diff --git a/src/BLL/Framework.BLL.Abstractions/IDefaultSecurityBLLFactory.cs b/src/BLL/Framework.BLL.Abstractions/IDefaultSecurityBLLFactory.cs index 4338956e5..9685b8d31 100644 --- a/src/BLL/Framework.BLL.Abstractions/IDefaultSecurityBLLFactory.cs +++ b/src/BLL/Framework.BLL.Abstractions/IDefaultSecurityBLLFactory.cs @@ -1,8 +1,8 @@ -using Framework.Application.Domain; - -using Anch.SecuritySystem; +using Anch.SecuritySystem; using Anch.SecuritySystem.Providers; +using Framework.Application.Domain; + namespace Framework.BLL; public interface IDefaultSecurityBLLFactory : IDefaultBLLFactory @@ -14,3 +14,4 @@ IDefaultSecurityDomainBLLBase Create(ISecurityProvider securityProvider) where TDomainObject : class, TPersistentDomainObjectBase; } + diff --git a/src/BLL/Framework.BLL.Abstractions/IDefaultSecurityDomainBLLBase.cs b/src/BLL/Framework.BLL.Abstractions/IDefaultSecurityDomainBLLBase.cs index ec0a4ca99..98dc13218 100644 --- a/src/BLL/Framework.BLL.Abstractions/IDefaultSecurityDomainBLLBase.cs +++ b/src/BLL/Framework.BLL.Abstractions/IDefaultSecurityDomainBLLBase.cs @@ -1,6 +1,6 @@ -using Framework.Application.Domain; +using Anch.SecuritySystem.Providers; -using Anch.SecuritySystem.Providers; +using Framework.Application.Domain; namespace Framework.BLL; @@ -21,3 +21,4 @@ public interface IDefaultSecurityDomainBLLBase where TDomainObject : class, TPersistentDomainObjectBase where TBLLContext : IDefaultBLLContext; + diff --git a/src/BLL/Framework.BLL.Abstractions/IHierarchicalObjectExpanderFactoryContainer.cs b/src/BLL/Framework.BLL.Abstractions/IHierarchicalObjectExpanderFactoryContainer.cs index 09bba179f..721480ad2 100644 --- a/src/BLL/Framework.BLL.Abstractions/IHierarchicalObjectExpanderFactoryContainer.cs +++ b/src/BLL/Framework.BLL.Abstractions/IHierarchicalObjectExpanderFactoryContainer.cs @@ -6,3 +6,4 @@ public interface IHierarchicalObjectExpanderFactoryContainer { IHierarchicalObjectExpanderFactory HierarchicalObjectExpanderFactory { get; } } + diff --git a/src/BLL/Framework.BLL.Abstractions/IOperationBLLBase.cs b/src/BLL/Framework.BLL.Abstractions/IOperationBLLBase.cs index 20293362a..3e267ccfc 100644 --- a/src/BLL/Framework.BLL.Abstractions/IOperationBLLBase.cs +++ b/src/BLL/Framework.BLL.Abstractions/IOperationBLLBase.cs @@ -27,3 +27,4 @@ public static void Remove(this IOperationBLLBase b domainObjects.Foreach(bll.Remove); } } + diff --git a/src/BLL/Framework.BLL.Abstractions/IRevisionBLL.cs b/src/BLL/Framework.BLL.Abstractions/IRevisionBLL.cs index 2ed857f1f..9d67a64a1 100644 --- a/src/BLL/Framework.BLL.Abstractions/IRevisionBLL.cs +++ b/src/BLL/Framework.BLL.Abstractions/IRevisionBLL.cs @@ -21,3 +21,4 @@ public interface IRevisionBLL DomainObjectPropertyRevisions GetPropertyChanges(TIdent id, string propertyName, Period? period = null); } + diff --git a/src/BLL/Framework.BLL.Abstractions/ISecurityBLLContext.cs b/src/BLL/Framework.BLL.Abstractions/ISecurityBLLContext.cs index 78ea87aa5..6c5d0c73b 100644 --- a/src/BLL/Framework.BLL.Abstractions/ISecurityBLLContext.cs +++ b/src/BLL/Framework.BLL.Abstractions/ISecurityBLLContext.cs @@ -16,3 +16,4 @@ public interface ISecurityBLLContext where TPersistentDomainObjectBase : class, IIdentityObject; + diff --git a/src/BLL/Framework.BLL.Abstractions/ISecurityBLLFactory.cs b/src/BLL/Framework.BLL.Abstractions/ISecurityBLLFactory.cs index 168fa5f24..6f165d30f 100644 --- a/src/BLL/Framework.BLL.Abstractions/ISecurityBLLFactory.cs +++ b/src/BLL/Framework.BLL.Abstractions/ISecurityBLLFactory.cs @@ -2,6 +2,7 @@ using Anch.SecuritySystem.Providers; namespace Framework.BLL; + public interface ISecurityBLLFactory { TBLL Create(); @@ -13,3 +14,4 @@ public interface ISecurityBLLFactory : ISecurityBLLFact { TBLL Create(ISecurityProvider securityProvider); } + diff --git a/src/BLL/Framework.BLL.Abstractions/ITargetSystemTypeResolverContainer.cs b/src/BLL/Framework.BLL.Abstractions/ITargetSystemTypeResolverContainer.cs index 8dac66fdd..1cc11c5f8 100644 --- a/src/BLL/Framework.BLL.Abstractions/ITargetSystemTypeResolverContainer.cs +++ b/src/BLL/Framework.BLL.Abstractions/ITargetSystemTypeResolverContainer.cs @@ -7,3 +7,4 @@ public interface ITargetSystemTypeResolverContainer { ITypeResolver TypeResolver { get; } } + diff --git a/src/BLL/Framework.BLL.Abstractions/OData/SelectOperationResultExtensions.cs b/src/BLL/Framework.BLL.Abstractions/OData/SelectOperationResultExtensions.cs index c929739dd..34d8aa71e 100644 --- a/src/BLL/Framework.BLL.Abstractions/OData/SelectOperationResultExtensions.cs +++ b/src/BLL/Framework.BLL.Abstractions/OData/SelectOperationResultExtensions.cs @@ -1,7 +1,7 @@ -using Framework.Application.Domain; -using Framework.BLL.Domain.Persistent; +using Anch.OData.Domain; -using Anch.OData.Domain; +using Framework.Application.Domain; +using Framework.BLL.Domain.Persistent; namespace Framework.BLL.OData; @@ -19,3 +19,4 @@ public static SelectOperationResult> ChangeIte return source.Items.Select(node => node.ChangeItem(selector)).ToSelectOperationResult(source.TotalCount); } } + diff --git a/src/BLL/Framework.BLL.Abstractions/Services/IPropertyPathService.cs b/src/BLL/Framework.BLL.Abstractions/Services/IPropertyPathService.cs index 33370453c..26947e4c4 100644 --- a/src/BLL/Framework.BLL.Abstractions/Services/IPropertyPathService.cs +++ b/src/BLL/Framework.BLL.Abstractions/Services/IPropertyPathService.cs @@ -20,3 +20,4 @@ ImmutableArray GetPropertyPaths(PropertyInfo property) PropertyPath WithExpand(PropertyPath propertyPath); } + diff --git a/src/BLL/Framework.BLL.Abstractions/Services/IRootSecurityService.cs b/src/BLL/Framework.BLL.Abstractions/Services/IRootSecurityService.cs index 836e6a045..768ac16b3 100644 --- a/src/BLL/Framework.BLL.Abstractions/Services/IRootSecurityService.cs +++ b/src/BLL/Framework.BLL.Abstractions/Services/IRootSecurityService.cs @@ -12,3 +12,4 @@ bool HasAccess(TDomainObject domainObject, SecurityRule securityR void CheckAccess(TDomainObject domainObject, SecurityRule securityRule); } + diff --git a/src/BLL/Framework.BLL.Abstractions/Services/ITargetSystemInfoService.cs b/src/BLL/Framework.BLL.Abstractions/Services/ITargetSystemInfoService.cs index 4194cf73e..5e5fb8d84 100644 --- a/src/BLL/Framework.BLL.Abstractions/Services/ITargetSystemInfoService.cs +++ b/src/BLL/Framework.BLL.Abstractions/Services/ITargetSystemInfoService.cs @@ -6,3 +6,4 @@ public interface ITargetSystemInfoService { PersistentTargetSystemInfo GetPersistentTargetSystemInfo(Type domainType); } + diff --git a/src/BLL/Framework.BLL.Abstractions/Services/PropertyPathService.cs b/src/BLL/Framework.BLL.Abstractions/Services/PropertyPathService.cs index c89b11d29..9e56a4a73 100644 --- a/src/BLL/Framework.BLL.Abstractions/Services/PropertyPathService.cs +++ b/src/BLL/Framework.BLL.Abstractions/Services/PropertyPathService.cs @@ -1,6 +1,5 @@ using System.Collections.Concurrent; using System.Collections.Immutable; - using System.Reflection; using Anch.Core; @@ -18,7 +17,7 @@ public class PropertyPathService(IMetadataProxyProvider metadataProxyProvider) : private readonly ConcurrentDictionary>> manyPathCache = []; - private readonly ConcurrentDictionary expandPathCache = []; + private readonly ConcurrentDictionary expandPathCache = []; public PropertyPath? TryGetPropertyPath(PropertyInfo property, bool recurse) where TAttribute : Attribute, IPathAttribute => @@ -82,3 +81,4 @@ .. metadataProxyProvider.Wrap(property).GetCustomAttributes() public PropertyPath WithExpand(PropertyPath propertyPath) => propertyPath.SelectMany(this.GetExpandPathOrSelf).ToPropertyPath(); } + diff --git a/src/BLL/Framework.BLL.DTOMapping/DTOMapper/IDomainEventDTOMapper.cs b/src/BLL/Framework.BLL.DTOMapping/DTOMapper/IDomainEventDTOMapper.cs index a62ebb52c..a5b873467 100644 --- a/src/BLL/Framework.BLL.DTOMapping/DTOMapper/IDomainEventDTOMapper.cs +++ b/src/BLL/Framework.BLL.DTOMapping/DTOMapper/IDomainEventDTOMapper.cs @@ -7,3 +7,4 @@ public interface IDomainEventDTOMapper object Convert(TDomainObject domainObject, EventOperation domainObjectEvent) where TDomainObject : TPersistentDomainObjectBase; } + diff --git a/src/BLL/Framework.BLL.DTOMapping/DTOMapper/RuntimeDomainEventDTOConverter.cs b/src/BLL/Framework.BLL.DTOMapping/DTOMapper/RuntimeDomainEventDTOConverter.cs index 2dcbf59c9..b7b0936cc 100644 --- a/src/BLL/Framework.BLL.DTOMapping/DTOMapper/RuntimeDomainEventDTOConverter.cs +++ b/src/BLL/Framework.BLL.DTOMapping/DTOMapper/RuntimeDomainEventDTOConverter.cs @@ -43,3 +43,4 @@ private Expression> CreateLa return accessor; } } + diff --git a/src/BLL/Framework.BLL.DTOMapping/DTOMapper/RuntimeDomainEventDTOMapper.cs b/src/BLL/Framework.BLL.DTOMapping/DTOMapper/RuntimeDomainEventDTOMapper.cs index f7be8f730..4696aaa2a 100644 --- a/src/BLL/Framework.BLL.DTOMapping/DTOMapper/RuntimeDomainEventDTOMapper.cs +++ b/src/BLL/Framework.BLL.DTOMapping/DTOMapper/RuntimeDomainEventDTOMapper.cs @@ -11,3 +11,4 @@ public virtual object Convert(TDomainObject domainObject, EventOp where TDomainObject : TPersistentDomainObjectBase => converter.Convert(mappingService, domainObject, domainObjectEvent); } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Domain/DefaultDomainObjectRevisionDTO.cs b/src/BLL/Framework.BLL.DTOMapping/Domain/DefaultDomainObjectRevisionDTO.cs index 0f613620c..973b31b65 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Domain/DefaultDomainObjectRevisionDTO.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Domain/DefaultDomainObjectRevisionDTO.cs @@ -18,3 +18,4 @@ public DefaultDomainObjectRevisionDTO(DomainObjectRevision source) } } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Domain/DomainObjectPropertiesRevisionDTO.cs b/src/BLL/Framework.BLL.DTOMapping/Domain/DomainObjectPropertiesRevisionDTO.cs index 6558d0486..04804d06e 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Domain/DomainObjectPropertiesRevisionDTO.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Domain/DomainObjectPropertiesRevisionDTO.cs @@ -15,3 +15,4 @@ public class DomainObjectPropertiesRevisionDTO [DataMember] public List RevisionInfos { get; set; } = []; } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Domain/DomainObjectRevisionDTO.cs b/src/BLL/Framework.BLL.DTOMapping/Domain/DomainObjectRevisionDTO.cs index e1de66e22..9f91331b1 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Domain/DomainObjectRevisionDTO.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Domain/DomainObjectRevisionDTO.cs @@ -23,3 +23,4 @@ public DomainObjectRevisionDTO(DomainObjectRevision source) this.RevisionInfos = source.RevisionInfos.Select(z => new DomainObjectRevisionInfoDTO(z)).ToList(); } } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Domain/DomainObjectRevisionInfoDTO.cs b/src/BLL/Framework.BLL.DTOMapping/Domain/DomainObjectRevisionInfoDTO.cs index 1bc7aeb57..8a92f43a2 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Domain/DomainObjectRevisionInfoDTO.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Domain/DomainObjectRevisionInfoDTO.cs @@ -16,3 +16,4 @@ public DomainObjectRevisionInfoDTO(DomainObjectRevisionInfo source) : ba } } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Domain/ObjectModificationInfoDTO.cs b/src/BLL/Framework.BLL.DTOMapping/Domain/ObjectModificationInfoDTO.cs index 449e0b13e..93e5459fe 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Domain/ObjectModificationInfoDTO.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Domain/ObjectModificationInfoDTO.cs @@ -34,3 +34,4 @@ public ObjectModificationInfoDTO(ObjectModificationInfo source) public override string ToString() => $"Identity: {this.Identity}, ModificationType: {this.ModificationType}, Revision: {this.Revision}, TypeInfoDescription: {this.TypeInfoDescription}"; } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Domain/PropertyRevisionDTOBase.cs b/src/BLL/Framework.BLL.DTOMapping/Domain/PropertyRevisionDTOBase.cs index f82960108..5c292f5d5 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Domain/PropertyRevisionDTOBase.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Domain/PropertyRevisionDTOBase.cs @@ -64,3 +64,4 @@ public PropertyRevisionDTO(PropertyRevision source) : base(source) => this.Value = source.Value; } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Domain/TypeInfoDescriptionDTO.cs b/src/BLL/Framework.BLL.DTOMapping/Domain/TypeInfoDescriptionDTO.cs index c4a225e8e..5e05ded55 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Domain/TypeInfoDescriptionDTO.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Domain/TypeInfoDescriptionDTO.cs @@ -17,3 +17,4 @@ public class TypeInfoDescriptionDTO public override string ToString() => $"Name: {this.Name}, Namespace: {this.Namespace}"; } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Extensions/UpdateExtensions.cs b/src/BLL/Framework.BLL.DTOMapping/Extensions/UpdateExtensions.cs index a3b23bfd3..8a8dc9eb1 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Extensions/UpdateExtensions.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Extensions/UpdateExtensions.cs @@ -23,10 +23,10 @@ public static void Update( var targetMap = target.ToDictionary(getTargetKey, actualComparer); var updateLists = source.Partial(itemData => itemData is SaveItemData, (saveItems, removeItems) => new - { - SaveItems = saveItems.Cast>().ToList(item => item.Value), - RemoveItems = removeItems.Cast>().ToList(item => item.Identity) - }); + { + SaveItems = saveItems.Cast>().ToList(item => item.Value), + RemoveItems = removeItems.Cast>().ToList(item => item.Identity) + }); foreach (var savingSourceItem in updateLists.SaveItems) @@ -112,3 +112,4 @@ public static Maybe GetActualUpdateElement(this Maybe maybe } } } + diff --git a/src/BLL/Framework.BLL.DTOMapping/MappingObject/IMappingObject.cs b/src/BLL/Framework.BLL.DTOMapping/MappingObject/IMappingObject.cs index 2285a1ca6..877400bc8 100644 --- a/src/BLL/Framework.BLL.DTOMapping/MappingObject/IMappingObject.cs +++ b/src/BLL/Framework.BLL.DTOMapping/MappingObject/IMappingObject.cs @@ -13,3 +13,4 @@ public interface IConvertMappingObject { TDomainObject ToDomainObject(TMappingService mappingService); } + diff --git a/src/BLL/Framework.BLL.DTOMapping/MergeItemData/RemoveItemData.cs b/src/BLL/Framework.BLL.DTOMapping/MergeItemData/RemoveItemData.cs index df2707b88..b978b5ee4 100644 --- a/src/BLL/Framework.BLL.DTOMapping/MergeItemData/RemoveItemData.cs +++ b/src/BLL/Framework.BLL.DTOMapping/MergeItemData/RemoveItemData.cs @@ -22,3 +22,4 @@ public class RemoveItemData : UpdateItemData : UpdateItemData [DataMember] public TValue Value { get; private set; } } + diff --git a/src/BLL/Framework.BLL.DTOMapping/MergeItemData/UpdateItemData.cs b/src/BLL/Framework.BLL.DTOMapping/MergeItemData/UpdateItemData.cs index 6d8d45d58..57526fceb 100644 --- a/src/BLL/Framework.BLL.DTOMapping/MergeItemData/UpdateItemData.cs +++ b/src/BLL/Framework.BLL.DTOMapping/MergeItemData/UpdateItemData.cs @@ -16,3 +16,4 @@ public static class UpdateItemData public static UpdateItemData CreateRemove(TIdentity identity) => new RemoveItemData(identity); } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Services/ClientDTOMappingServiceBase.cs b/src/BLL/Framework.BLL.DTOMapping/Services/ClientDTOMappingServiceBase.cs index cd66e1db8..f5bdede78 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Services/ClientDTOMappingServiceBase.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Services/ClientDTOMappingServiceBase.cs @@ -82,3 +82,4 @@ protected virtual T GetEqualsValue(T currentValue, T baseValue, string proper return currentValue; } } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Services/DTOMappingService.cs b/src/BLL/Framework.BLL.DTOMapping/Services/DTOMappingService.cs index c92adfea1..dc3d40202 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Services/DTOMappingService.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Services/DTOMappingService.cs @@ -1,12 +1,12 @@ -using Framework.Application.Domain; +using Anch.SecuritySystem; +using Anch.SecuritySystem.DomainServices; + +using Framework.Application.Domain; using Framework.BLL.Domain.IdentityObject; using Framework.Database; using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem; -using Anch.SecuritySystem.DomainServices; - namespace Framework.BLL.DTOMapping.Services; public abstract class DTOMappingService(TBLLContext context) @@ -54,3 +54,4 @@ protected virtual IUpdateCollectionMappingService => new DefaultUpdateCollectionMappingService(createAndMapDetail, removeDetail); } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Services/DTOMappingVersionService.cs b/src/BLL/Framework.BLL.DTOMapping/Services/DTOMappingVersionService.cs index cbb1776f1..132cb62c5 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Services/DTOMappingVersionService.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Services/DTOMappingVersionService.cs @@ -22,3 +22,4 @@ public TVersion GetVersion(TVersion mappingObjectVersion, TDomain return mappingObjectVersion; } } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Services/DefaultCollectionMappingService.cs b/src/BLL/Framework.BLL.DTOMapping/Services/DefaultCollectionMappingService.cs index 91f174d74..cdd8f2717 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Services/DefaultCollectionMappingService.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Services/DefaultCollectionMappingService.cs @@ -29,3 +29,4 @@ public void Map(IEnumerable source, IEnumerable target) removingItems => removingItems.Foreach(this.RemoveDetail)); } } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Services/DefaultUpdateCollectionMappingService.cs b/src/BLL/Framework.BLL.DTOMapping/Services/DefaultUpdateCollectionMappingService.cs index 89fbe5dd7..d1fa70b48 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Services/DefaultUpdateCollectionMappingService.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Services/DefaultUpdateCollectionMappingService.cs @@ -32,3 +32,4 @@ public void Map(IEnumerable> sourceItem sourceItems.Update(targetItems, this.GetSourceId, this.GetSourceIdentityId, this.GetTargetId, this.AddDetail, this.RemoveDetail); } } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Services/IDTOMappingService.cs b/src/BLL/Framework.BLL.DTOMapping/Services/IDTOMappingService.cs index 4fa9f5cd5..ea77c1f89 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Services/IDTOMappingService.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Services/IDTOMappingService.cs @@ -7,3 +7,4 @@ public interface IDTOMappingService TDomainObject? GetById(TIdent ident, IdCheckMode checkMode = IdCheckMode.SkipEmpty, LockRole lockRole = LockRole.None) where TDomainObject : class, TPersistentDomainObjectBase; } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Services/IDTOMappingVersionService.cs b/src/BLL/Framework.BLL.DTOMapping/Services/IDTOMappingVersionService.cs index c6eef3a53..717e2043a 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Services/IDTOMappingVersionService.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Services/IDTOMappingVersionService.cs @@ -7,3 +7,4 @@ public interface IDTOMappingVersionService(TVersion mappingObjectVersion, TDomainObject domainObject) where TDomainObject : TAuditPersistentDomainObjectBase, IVersionObject; } + diff --git a/src/BLL/Framework.BLL.DTOMapping/Services/IUpdateCollectionMappingService.cs b/src/BLL/Framework.BLL.DTOMapping/Services/IUpdateCollectionMappingService.cs index 7a97a1864..c587f0219 100644 --- a/src/BLL/Framework.BLL.DTOMapping/Services/IUpdateCollectionMappingService.cs +++ b/src/BLL/Framework.BLL.DTOMapping/Services/IUpdateCollectionMappingService.cs @@ -3,3 +3,4 @@ namespace Framework.BLL.DTOMapping.Services; public interface IUpdateCollectionMappingService : ICollectionMappingService, TTarget>; + diff --git a/src/BLL/Framework.BLL.Domain/Attributes/DependencySecurityAttribute.cs b/src/BLL/Framework.BLL.Domain/Attributes/DependencySecurityAttribute.cs index 248ec53f0..3f9ff15cf 100644 --- a/src/BLL/Framework.BLL.Domain/Attributes/DependencySecurityAttribute.cs +++ b/src/BLL/Framework.BLL.Domain/Attributes/DependencySecurityAttribute.cs @@ -35,3 +35,4 @@ public DependencySecurityAttribute(Type sourceType, string path = "") /// public bool IsUntyped => this.Path == string.Empty; } + diff --git a/src/BLL/Framework.BLL.Domain/Attributes/DomainObjectAccessAttribute.cs b/src/BLL/Framework.BLL.Domain/Attributes/DomainObjectAccessAttribute.cs index 9c12dfd32..c6d4482c7 100644 --- a/src/BLL/Framework.BLL.Domain/Attributes/DomainObjectAccessAttribute.cs +++ b/src/BLL/Framework.BLL.Domain/Attributes/DomainObjectAccessAttribute.cs @@ -1,6 +1,6 @@ -using Framework.BLL.Domain.Extensions; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using Framework.BLL.Domain.Extensions; namespace Framework.BLL.Domain.Attributes; @@ -21,3 +21,4 @@ public DomainObjectAccessAttribute(Type domainType, bool isEdit) public SecurityRule SecurityRule { get; } } + diff --git a/src/BLL/Framework.BLL.Domain/Attributes/EditDomainObjectAttribute.cs b/src/BLL/Framework.BLL.Domain/Attributes/EditDomainObjectAttribute.cs index 4aeeee2b6..ebdd3f2f9 100644 --- a/src/BLL/Framework.BLL.Domain/Attributes/EditDomainObjectAttribute.cs +++ b/src/BLL/Framework.BLL.Domain/Attributes/EditDomainObjectAttribute.cs @@ -23,3 +23,4 @@ public EditDomainObjectAttribute(SecurityRule securityRule) { } } + diff --git a/src/BLL/Framework.BLL.Domain/Attributes/Round/CoeffAttribute.cs b/src/BLL/Framework.BLL.Domain/Attributes/Round/CoeffAttribute.cs index 8ab68d3db..97e8f7e8b 100644 --- a/src/BLL/Framework.BLL.Domain/Attributes/Round/CoeffAttribute.cs +++ b/src/BLL/Framework.BLL.Domain/Attributes/Round/CoeffAttribute.cs @@ -4,3 +4,4 @@ namespace Framework.BLL.Domain.Attributes.Round; [AttributeUsage(AttributeTargets.Property)] public class CoeffAttribute() : RoundDecimalAttribute(NumberExtensions.CoeffRoundDecimals); + diff --git a/src/BLL/Framework.BLL.Domain/Attributes/Round/MoneyAttribute.cs b/src/BLL/Framework.BLL.Domain/Attributes/Round/MoneyAttribute.cs index 4846e4422..60b15e50e 100644 --- a/src/BLL/Framework.BLL.Domain/Attributes/Round/MoneyAttribute.cs +++ b/src/BLL/Framework.BLL.Domain/Attributes/Round/MoneyAttribute.cs @@ -4,3 +4,4 @@ namespace Framework.BLL.Domain.Attributes.Round; [AttributeUsage(AttributeTargets.Property)] public class MoneyAttribute() : RoundDecimalAttribute(NumberExtensions.MoneyRoundDecimals); + diff --git a/src/BLL/Framework.BLL.Domain/Attributes/Round/PercentAttribute.cs b/src/BLL/Framework.BLL.Domain/Attributes/Round/PercentAttribute.cs index 53ddae14f..8585f7644 100644 --- a/src/BLL/Framework.BLL.Domain/Attributes/Round/PercentAttribute.cs +++ b/src/BLL/Framework.BLL.Domain/Attributes/Round/PercentAttribute.cs @@ -4,3 +4,4 @@ namespace Framework.BLL.Domain.Attributes.Round; [AttributeUsage(AttributeTargets.Property)] public class PercentAttribute() : RoundDecimalAttribute(NumberExtensions.PercentRoundDecimals); + diff --git a/src/BLL/Framework.BLL.Domain/Attributes/ViewDomainObjectAttribute.cs b/src/BLL/Framework.BLL.Domain/Attributes/ViewDomainObjectAttribute.cs index 46a163029..77fa77dc8 100644 --- a/src/BLL/Framework.BLL.Domain/Attributes/ViewDomainObjectAttribute.cs +++ b/src/BLL/Framework.BLL.Domain/Attributes/ViewDomainObjectAttribute.cs @@ -23,3 +23,4 @@ public ViewDomainObjectAttribute(SecurityRule securityRule) { } } + diff --git a/src/BLL/Framework.BLL.Domain/DTO/DTOFileTypeAttribute.cs b/src/BLL/Framework.BLL.Domain/DTO/DTOFileTypeAttribute.cs index aaae6c168..31f666994 100644 --- a/src/BLL/Framework.BLL.Domain/DTO/DTOFileTypeAttribute.cs +++ b/src/BLL/Framework.BLL.Domain/DTO/DTOFileTypeAttribute.cs @@ -27,3 +27,4 @@ public class DTOFileTypeAttribute(Type domainType, string name, DTORole role) : /// public string ExternalData { get; init; } } + diff --git a/src/BLL/Framework.BLL.Domain/DTO/Extensions/DTOTypeExtensions.cs b/src/BLL/Framework.BLL.Domain/DTO/Extensions/DTOTypeExtensions.cs index 192139607..694bac7fc 100644 --- a/src/BLL/Framework.BLL.Domain/DTO/Extensions/DTOTypeExtensions.cs +++ b/src/BLL/Framework.BLL.Domain/DTO/Extensions/DTOTypeExtensions.cs @@ -10,3 +10,4 @@ public static class DTOTypeExtensions public static DTOType Max(this DTOType v1, DTOType v2) => v1 < v2 ? v2 : v1; } + diff --git a/src/BLL/Framework.BLL.Domain/DTO/Extensions/TypeExtensions.cs b/src/BLL/Framework.BLL.Domain/DTO/Extensions/TypeExtensions.cs index 93acbfe75..f4498fd64 100644 --- a/src/BLL/Framework.BLL.Domain/DTO/Extensions/TypeExtensions.cs +++ b/src/BLL/Framework.BLL.Domain/DTO/Extensions/TypeExtensions.cs @@ -50,3 +50,4 @@ where type.Name.EndsWith(dtoType.ToString()) return request.SingleMaybe(); } } + diff --git a/src/BLL/Framework.BLL.Domain/DTO/Extensions/ViewDTOTypeExtensions.cs b/src/BLL/Framework.BLL.Domain/DTO/Extensions/ViewDTOTypeExtensions.cs index f408abd4b..f76c732a2 100644 --- a/src/BLL/Framework.BLL.Domain/DTO/Extensions/ViewDTOTypeExtensions.cs +++ b/src/BLL/Framework.BLL.Domain/DTO/Extensions/ViewDTOTypeExtensions.cs @@ -10,3 +10,4 @@ public static class ViewDTOTypeExtensions public static ViewDTOType Max(this ViewDTOType v1, ViewDTOType v2) => v1 < v2 ? v2 : v1; } + diff --git a/src/BLL/Framework.BLL.Domain/DefaultPersistentDomainObjectBaseExtensions.cs b/src/BLL/Framework.BLL.Domain/DefaultPersistentDomainObjectBaseExtensions.cs index 4b054447e..e0ac51528 100644 --- a/src/BLL/Framework.BLL.Domain/DefaultPersistentDomainObjectBaseExtensions.cs +++ b/src/BLL/Framework.BLL.Domain/DefaultPersistentDomainObjectBaseExtensions.cs @@ -43,3 +43,4 @@ public static void SetValueSafe(this TSource source, Expression where TSource : class, IIdentityObject => source.SetValueSafe(fieldExpr, newValue, customSetAction); } + diff --git a/src/BLL/Framework.BLL.Domain/Extensions/CustomAttributeProviderExtensions.cs b/src/BLL/Framework.BLL.Domain/Extensions/CustomAttributeProviderExtensions.cs index e4c45bfa4..689a39dff 100644 --- a/src/BLL/Framework.BLL.Domain/Extensions/CustomAttributeProviderExtensions.cs +++ b/src/BLL/Framework.BLL.Domain/Extensions/CustomAttributeProviderExtensions.cs @@ -1,12 +1,11 @@ using System.Reflection; using Anch.Core; +using Anch.SecuritySystem; using Framework.BLL.Domain.Attributes; using Framework.Core; -using Anch.SecuritySystem; - namespace Framework.BLL.Domain.Extensions; public static class CustomAttributeProviderExtensions @@ -74,3 +73,4 @@ public static bool IsSecurity(this ICustomAttributeProvider source) || source.HasAttribute(); } } + diff --git a/src/BLL/Framework.BLL.Domain/Extensions/EnumerableExtensions.cs b/src/BLL/Framework.BLL.Domain/Extensions/EnumerableExtensions.cs index 1685921a1..27b5b50bc 100644 --- a/src/BLL/Framework.BLL.Domain/Extensions/EnumerableExtensions.cs +++ b/src/BLL/Framework.BLL.Domain/Extensions/EnumerableExtensions.cs @@ -40,5 +40,6 @@ private static Func TryGetNotFoundByNameExceptionFactory(str return raiseIfNotFound ? () => GetNotFoundException(name, nameof(name)) : null; } - private static Exception GetNotFoundException(string identity, string identityName) => throw new Exception($"{typeof (TSource).Name} with {identityName} \"{identity}\" not found"); + private static Exception GetNotFoundException(string identity, string identityName) => throw new Exception($"{typeof(TSource).Name} with {identityName} \"{identity}\" not found"); } + diff --git a/src/BLL/Framework.BLL.Domain/Extensions/IdentityObjectContainerExtensions.cs b/src/BLL/Framework.BLL.Domain/Extensions/IdentityObjectContainerExtensions.cs index 42dd02b72..caad3773d 100644 --- a/src/BLL/Framework.BLL.Domain/Extensions/IdentityObjectContainerExtensions.cs +++ b/src/BLL/Framework.BLL.Domain/Extensions/IdentityObjectContainerExtensions.cs @@ -8,3 +8,4 @@ public static class IdentityObjectContainerExtensions { public static TIdentityObject TryGetIdentity(this IIdentityObjectContainer source) => source.Maybe(v => v.Identity); } + diff --git a/src/BLL/Framework.BLL.Domain/Extensions/NumberExtensions.cs b/src/BLL/Framework.BLL.Domain/Extensions/NumberExtensions.cs index 101084607..747afbe27 100644 --- a/src/BLL/Framework.BLL.Domain/Extensions/NumberExtensions.cs +++ b/src/BLL/Framework.BLL.Domain/Extensions/NumberExtensions.cs @@ -42,5 +42,5 @@ public static class NumberExtensions } - public static decimal AwayFromZeroRound (this decimal value, int rank) => decimal.Round(value, rank, MidpointRounding.AwayFromZero); + public static decimal AwayFromZeroRound(this decimal value, int rank) => decimal.Round(value, rank, MidpointRounding.AwayFromZero); } diff --git a/src/BLL/Framework.BLL.Domain/Extensions/PropertyInfoExtensions.cs b/src/BLL/Framework.BLL.Domain/Extensions/PropertyInfoExtensions.cs index 402e3cdb8..c487d927c 100644 --- a/src/BLL/Framework.BLL.Domain/Extensions/PropertyInfoExtensions.cs +++ b/src/BLL/Framework.BLL.Domain/Extensions/PropertyInfoExtensions.cs @@ -14,3 +14,4 @@ public static bool IsVisualIdentity(this PropertyInfo propertyInfo) return propertyInfo.HasAttribute(); } } + diff --git a/src/BLL/Framework.BLL.Domain/Extensions/TypeExtensions.cs b/src/BLL/Framework.BLL.Domain/Extensions/TypeExtensions.cs index 121bb167f..bb7111d3f 100644 --- a/src/BLL/Framework.BLL.Domain/Extensions/TypeExtensions.cs +++ b/src/BLL/Framework.BLL.Domain/Extensions/TypeExtensions.cs @@ -1,10 +1,9 @@ using Anch.Core; +using Anch.SecuritySystem; using Framework.BLL.Domain.Attributes; using Framework.Core; -using Anch.SecuritySystem; - namespace Framework.BLL.Domain.Extensions; public static class TypeExtensions @@ -48,3 +47,4 @@ public static IEnumerable GetGenericSecurityNodeInterfaces(this Type sourc return sourceType.GetSecurityNodeInterfaces().Where(interfaceType => interfaceType.IsGenericType); } } + diff --git a/src/BLL/Framework.BLL.Domain/Fetching/FetchPathAttribute.cs b/src/BLL/Framework.BLL.Domain/Fetching/FetchPathAttribute.cs index 45f0add0a..7cd16ef93 100644 --- a/src/BLL/Framework.BLL.Domain/Fetching/FetchPathAttribute.cs +++ b/src/BLL/Framework.BLL.Domain/Fetching/FetchPathAttribute.cs @@ -7,3 +7,4 @@ namespace Framework.BLL.Domain.Fetching; /// [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)] public class FetchPathAttribute(string path) : PathAttribute(path); + diff --git a/src/BLL/Framework.BLL.Domain/Models/IDomainObjectChangeModel.cs b/src/BLL/Framework.BLL.Domain/Models/IDomainObjectChangeModel.cs index 88a6cb072..f9527c22d 100644 --- a/src/BLL/Framework.BLL.Domain/Models/IDomainObjectChangeModel.cs +++ b/src/BLL/Framework.BLL.Domain/Models/IDomainObjectChangeModel.cs @@ -13,3 +13,4 @@ public interface IDomainObjectChangeModel [Required] TDomainObject ChangingObject { get; } } + diff --git a/src/BLL/Framework.BLL.Domain/Models/IDomainObjectExtendedModel.cs b/src/BLL/Framework.BLL.Domain/Models/IDomainObjectExtendedModel.cs index b3fc97824..d48901a68 100644 --- a/src/BLL/Framework.BLL.Domain/Models/IDomainObjectExtendedModel.cs +++ b/src/BLL/Framework.BLL.Domain/Models/IDomainObjectExtendedModel.cs @@ -11,3 +11,4 @@ public interface IDomainObjectExtendedModel [Required] TDomainObject ExtendedObject { get; } } + diff --git a/src/BLL/Framework.BLL.Domain/Models/IDomainObjectFilterModel.cs b/src/BLL/Framework.BLL.Domain/Models/IDomainObjectFilterModel.cs index 02f28f35b..c782cb021 100644 --- a/src/BLL/Framework.BLL.Domain/Models/IDomainObjectFilterModel.cs +++ b/src/BLL/Framework.BLL.Domain/Models/IDomainObjectFilterModel.cs @@ -6,3 +6,4 @@ public interface IDomainObjectFilterModel { Expression> ToFilterExpression(); } + diff --git a/src/BLL/Framework.BLL.Domain/Models/IDomainObjectIntegrationSaveModel.cs b/src/BLL/Framework.BLL.Domain/Models/IDomainObjectIntegrationSaveModel.cs index 20344e93a..84036f457 100644 --- a/src/BLL/Framework.BLL.Domain/Models/IDomainObjectIntegrationSaveModel.cs +++ b/src/BLL/Framework.BLL.Domain/Models/IDomainObjectIntegrationSaveModel.cs @@ -9,3 +9,4 @@ public interface IDomainObjectIntegrationSaveModel [Required] TDomainObject SavingObject { get; } } + diff --git a/src/BLL/Framework.BLL.Domain/Models/IDomainObjectMassChangeModel.cs b/src/BLL/Framework.BLL.Domain/Models/IDomainObjectMassChangeModel.cs index 17485111b..9db0ffdc8 100644 --- a/src/BLL/Framework.BLL.Domain/Models/IDomainObjectMassChangeModel.cs +++ b/src/BLL/Framework.BLL.Domain/Models/IDomainObjectMassChangeModel.cs @@ -13,3 +13,4 @@ public interface IDomainObjectMassChangeModel [Required] IEnumerable ChangingObjects { get; } } + diff --git a/src/BLL/Framework.BLL.Domain/Models/ModelRole.cs b/src/BLL/Framework.BLL.Domain/Models/ModelRole.cs index 8359bd4cb..26633beaa 100644 --- a/src/BLL/Framework.BLL.Domain/Models/ModelRole.cs +++ b/src/BLL/Framework.BLL.Domain/Models/ModelRole.cs @@ -9,7 +9,7 @@ public record ModelRole(string Name, DirectMode.DirectMode DirectMode) - public static readonly ModelRole Create = new(nameof (Create), Domain.DirectMode.DirectMode.In); + public static readonly ModelRole Create = new(nameof(Create), Domain.DirectMode.DirectMode.In); public static readonly ModelRole Extended = new(nameof(Extended), Domain.DirectMode.DirectMode.Out | Domain.DirectMode.DirectMode.In); diff --git a/src/BLL/Framework.BLL.Domain/Persistent/Attributes/IPathAttribute.cs b/src/BLL/Framework.BLL.Domain/Persistent/Attributes/IPathAttribute.cs index c1ff7a8b9..3ca16d074 100644 --- a/src/BLL/Framework.BLL.Domain/Persistent/Attributes/IPathAttribute.cs +++ b/src/BLL/Framework.BLL.Domain/Persistent/Attributes/IPathAttribute.cs @@ -8,3 +8,4 @@ public interface IPathAttribute public PropertyPath GetPropertyPath(Type domainType) => new(domainType, this.Path); } + diff --git a/src/BLL/Framework.BLL.Domain/PersistentDomainObjectBaseExtensions.cs b/src/BLL/Framework.BLL.Domain/PersistentDomainObjectBaseExtensions.cs index 1e1b2eb44..1695a34d0 100644 --- a/src/BLL/Framework.BLL.Domain/PersistentDomainObjectBaseExtensions.cs +++ b/src/BLL/Framework.BLL.Domain/PersistentDomainObjectBaseExtensions.cs @@ -88,7 +88,7 @@ public static void SetValueSafe(this TSource source, return source.GetCollectionValue(propertyExpr) .Match(() => null, - v => v, + v => v, _ => { throw new Exception($"{typeof(TSource).Name} one-to-one error. To many items in collection {typeof(TProperty).Name}"); }); } @@ -132,3 +132,4 @@ from collection in (property.GetValue(source, null) as ICollection).T return collectionRequest.GetValue(() => new ArgumentException("Invalid property expression", nameof(propertyExpr))); } } + diff --git a/src/BLL/Framework.BLL.Domain/Serialization/Extensions/PropertyInfoExtensions.cs b/src/BLL/Framework.BLL.Domain/Serialization/Extensions/PropertyInfoExtensions.cs index c3f9271e5..eef849ebc 100644 --- a/src/BLL/Framework.BLL.Domain/Serialization/Extensions/PropertyInfoExtensions.cs +++ b/src/BLL/Framework.BLL.Domain/Serialization/Extensions/PropertyInfoExtensions.cs @@ -72,3 +72,4 @@ public static bool IsWritable(this PropertyInfo propertyInfo, DTORole dtoRole, b propertyInfo.PropertyType.IsCollection(elementType => allowHierarchical || elementType != propertyInfo.DeclaringType || propertyInfo.IsDetail())); } } + diff --git a/src/BLL/Framework.BLL.Domain/Serialization/Extensions/TypeExtensions.cs b/src/BLL/Framework.BLL.Domain/Serialization/Extensions/TypeExtensions.cs index 0582dca67..f7a9da4a7 100644 --- a/src/BLL/Framework.BLL.Domain/Serialization/Extensions/TypeExtensions.cs +++ b/src/BLL/Framework.BLL.Domain/Serialization/Extensions/TypeExtensions.cs @@ -26,3 +26,4 @@ public static bool HasVisualIdentityProperties(this Type type) return type.GetSerializationProperties().Any(prop => prop.IsVisualIdentity()); } } + diff --git a/src/BLL/Framework.BLL.Domain/ServiceRole/BLLViewRoleAttribute.cs b/src/BLL/Framework.BLL.Domain/ServiceRole/BLLViewRoleAttribute.cs index 3c4595e90..ac67c362e 100644 --- a/src/BLL/Framework.BLL.Domain/ServiceRole/BLLViewRoleAttribute.cs +++ b/src/BLL/Framework.BLL.Domain/ServiceRole/BLLViewRoleAttribute.cs @@ -51,3 +51,4 @@ public MainDTOType Max protected override ViewDTOType BaseMaxFetch => (ViewDTOType)this.MaxFetch; } + diff --git a/src/BLL/Framework.BLL.Domain/ServiceRole/BLLViewRoleBaseAttribute.cs b/src/BLL/Framework.BLL.Domain/ServiceRole/BLLViewRoleBaseAttribute.cs index 5b545d34e..7676109d1 100644 --- a/src/BLL/Framework.BLL.Domain/ServiceRole/BLLViewRoleBaseAttribute.cs +++ b/src/BLL/Framework.BLL.Domain/ServiceRole/BLLViewRoleBaseAttribute.cs @@ -14,3 +14,4 @@ public abstract class BLLViewRoleBaseAttribute : BLLServiceRoleAttribute, IMaxFe ViewDTOType IMaxFetchContainer.MaxFetch => this.BaseMaxFetch; } + diff --git a/src/BLL/Framework.BLL.Domain/ServiceRole/IMaxFetchContainer.cs b/src/BLL/Framework.BLL.Domain/ServiceRole/IMaxFetchContainer.cs index 3424820d8..6b356b02d 100644 --- a/src/BLL/Framework.BLL.Domain/ServiceRole/IMaxFetchContainer.cs +++ b/src/BLL/Framework.BLL.Domain/ServiceRole/IMaxFetchContainer.cs @@ -12,3 +12,4 @@ public interface IMaxFetchContainer /// ViewDTOType MaxFetch { get; } } + diff --git a/src/BLL/Framework.BLL.Domain/TargetSystem/TargetSystemDomainInfo.cs b/src/BLL/Framework.BLL.Domain/TargetSystem/TargetSystemDomainInfo.cs index f1a6df7c6..7df22064f 100644 --- a/src/BLL/Framework.BLL.Domain/TargetSystem/TargetSystemDomainInfo.cs +++ b/src/BLL/Framework.BLL.Domain/TargetSystem/TargetSystemDomainInfo.cs @@ -26,3 +26,4 @@ public TargetSystemDomainInfo(ImmutableArray domainTypes) new DomainTypeInfo(typeof(double), new("{68F69CA7-263B-4559-BD96-4A13A28823CC}")), ]); } + diff --git a/src/BLL/Framework.BLL.Events/DependencyDetailEventDALListener.cs b/src/BLL/Framework.BLL.Events/DependencyDetailEventDALListener.cs index d2d0306df..f6dd0d238 100644 --- a/src/BLL/Framework.BLL.Events/DependencyDetailEventDALListener.cs +++ b/src/BLL/Framework.BLL.Events/DependencyDetailEventDALListener.cs @@ -66,9 +66,11 @@ public async Task Process(DALChangesEventArgs eventArgs, CancellationToken cance var eventType = item.Item2; var message = new DomainOperationSerializeData - { - DomainObject = domainObject, Operation = eventType, CustomDomainObjectType = domainObjectType - }; + { + DomainObject = domainObject, + Operation = eventType, + CustomDomainObjectType = domainObjectType + }; await messageSender.SendAsync(message, cancellationToken); } @@ -102,10 +104,10 @@ protected virtual IEnumerable> ProcessFin z.Item2.GetTargetValue(q.Object))) .Select( q => new - { - TargetObject = z.Item2.GetTargetValue(q.Object), - TargetObjectType = z.Item2.TargetTypeEvent.Type, - })) + { + TargetObject = z.Item2.GetTargetValue(q.Object), + TargetObjectType = z.Item2.TargetTypeEvent.Type, + })) .Distinct(z => z.TargetObject) .ToList(); @@ -159,3 +161,4 @@ async Task IEventOperationReceiver.Receive(TDomainObject domainOb } } } + diff --git a/src/BLL/Framework.BLL.Events/SubscriptionManager/DomainOperationSerializeData.cs b/src/BLL/Framework.BLL.Events/SubscriptionManager/DomainOperationSerializeData.cs index d8477695b..273b07b78 100644 --- a/src/BLL/Framework.BLL.Events/SubscriptionManager/DomainOperationSerializeData.cs +++ b/src/BLL/Framework.BLL.Events/SubscriptionManager/DomainOperationSerializeData.cs @@ -14,3 +14,4 @@ namespace Framework.BLL.Events.SubscriptionManager; Type IDomainOperationSerializeData.DomainObjectType => this.CustomDomainObjectType ?? typeof(TDomainObject); } + diff --git a/src/BLL/Framework.BLL.Events/SubscriptionManager/EventsSubscriptionManager.cs b/src/BLL/Framework.BLL.Events/SubscriptionManager/EventsSubscriptionManager.cs index ae20791f0..840564895 100644 --- a/src/BLL/Framework.BLL.Events/SubscriptionManager/EventsSubscriptionManager.cs +++ b/src/BLL/Framework.BLL.Events/SubscriptionManager/EventsSubscriptionManager.cs @@ -50,15 +50,15 @@ protected void Subscribe( where TDomainObject : class, TPersistentDomainObjectBase { var listener = new Listener - { - Filter = filter, - CreateMessage = (domainObject, operation) => new DomainOperationSerializeData - { - DomainObject = domainObject, - Operation = operation, - CustomSendObject = customSendObjectConvertFunc?.Invoke(domainObject, operation) - } - }; + { + Filter = filter, + CreateMessage = (domainObject, operation) => new DomainOperationSerializeData + { + DomainObject = domainObject, + Operation = operation, + CustomSendObject = customSendObjectConvertFunc?.Invoke(domainObject, operation) + } + }; this.sc.AddSingleton(listener); } @@ -101,3 +101,4 @@ private class Listener public required Func> CreateMessage { get; init; } } } + diff --git a/src/BLL/Framework.BLL.Events/SubscriptionManager/IDomainOperationSerializeData.cs b/src/BLL/Framework.BLL.Events/SubscriptionManager/IDomainOperationSerializeData.cs index 043e46333..890c32f43 100644 --- a/src/BLL/Framework.BLL.Events/SubscriptionManager/IDomainOperationSerializeData.cs +++ b/src/BLL/Framework.BLL.Events/SubscriptionManager/IDomainOperationSerializeData.cs @@ -12,3 +12,4 @@ public interface IDomainOperationSerializeData Type DomainObjectType { get; } } + diff --git a/src/BLL/Framework.BLL.Events/SubscriptionManager/IEventDTOMessageSender.cs b/src/BLL/Framework.BLL.Events/SubscriptionManager/IEventDTOMessageSender.cs index 5f571c3c1..5359221dd 100644 --- a/src/BLL/Framework.BLL.Events/SubscriptionManager/IEventDTOMessageSender.cs +++ b/src/BLL/Framework.BLL.Events/SubscriptionManager/IEventDTOMessageSender.cs @@ -5,3 +5,4 @@ namespace Framework.BLL.Events.SubscriptionManager; public interface IEventDTOMessageSender : IMessageSender< IDomainOperationSerializeData> where TPersistentDomainObjectBase : class; + diff --git a/src/BLL/Framework.BLL.Events/TypeEvent.cs b/src/BLL/Framework.BLL.Events/TypeEvent.cs index 8bb8571c1..fe6b4519c 100644 --- a/src/BLL/Framework.BLL.Events/TypeEvent.cs +++ b/src/BLL/Framework.BLL.Events/TypeEvent.cs @@ -43,3 +43,4 @@ public static TypeEvent Create( return new TypeEvent(typeof(T), [.. eventOperations], isSaveUntypedFunc, isRemoveUntypeFunc); } } + diff --git a/src/BLL/Framework.BLL.Runtime/BLLBase.cs b/src/BLL/Framework.BLL.Runtime/BLLBase.cs index 0dcb72b1d..a96068d57 100644 --- a/src/BLL/Framework.BLL.Runtime/BLLBase.cs +++ b/src/BLL/Framework.BLL.Runtime/BLLBase.cs @@ -1,7 +1,10 @@ using System.Linq.Expressions; using Anch.Core; +using Anch.GenericQueryable; +using Anch.GenericQueryable.Fetching; using Anch.IdentitySource; +using Anch.OData.Domain; using Framework.Application; using Framework.Application.Domain; @@ -10,13 +13,8 @@ using Framework.Database; using Framework.Database.Domain; -using Anch.GenericQueryable; -using Anch.GenericQueryable.Fetching; - using Microsoft.Extensions.DependencyInjection; -using Anch.OData.Domain; - namespace Framework.BLL; public abstract class BLLBase : @@ -25,7 +23,7 @@ public abstract class BLLBase where TDomainObject : class, TPersistentDomainObjectBase - where TIdent: notnull + where TIdent : notnull { private readonly IDAL dal; @@ -304,3 +302,4 @@ public virtual IDomainObjectPropertyRevisionBase GetUn #endregion } + diff --git a/src/BLL/Framework.BLL.Runtime/BLLEventOperationSender.cs b/src/BLL/Framework.BLL.Runtime/BLLEventOperationSender.cs index 8158d5897..ef7aa17d7 100644 --- a/src/BLL/Framework.BLL.Runtime/BLLEventOperationSender.cs +++ b/src/BLL/Framework.BLL.Runtime/BLLEventOperationSender.cs @@ -14,3 +14,4 @@ public async Task Send(TDomainObject domainObject, EventOperation } } } + diff --git a/src/BLL/Framework.BLL.Runtime/DTOFetchRuleExpander.cs b/src/BLL/Framework.BLL.Runtime/DTOFetchRuleExpander.cs index c66646a23..c4a91d137 100644 --- a/src/BLL/Framework.BLL.Runtime/DTOFetchRuleExpander.cs +++ b/src/BLL/Framework.BLL.Runtime/DTOFetchRuleExpander.cs @@ -1,6 +1,6 @@ -using Framework.BLL.Domain.DTO; +using Anch.GenericQueryable.Fetching; -using Anch.GenericQueryable.Fetching; +using Framework.BLL.Domain.DTO; namespace Framework.BLL; @@ -19,3 +19,4 @@ public abstract class DTOFetchRuleExpander : IFetchRuleEx protected abstract PropertyFetchRule? TryExpand(ViewDTOType dtoType); } + diff --git a/src/BLL/Framework.BLL.Runtime/Default/DefaultBLLBaseContext.cs b/src/BLL/Framework.BLL.Runtime/Default/DefaultBLLBaseContext.cs index 71e3c3209..84855d270 100644 --- a/src/BLL/Framework.BLL.Runtime/Default/DefaultBLLBaseContext.cs +++ b/src/BLL/Framework.BLL.Runtime/Default/DefaultBLLBaseContext.cs @@ -1,7 +1,7 @@ -using Framework.Application.Domain; -using Framework.Application.Events; +using Anch.HierarchicalExpand; -using Anch.HierarchicalExpand; +using Framework.Application.Domain; +using Framework.Application.Events; namespace Framework.BLL.Default; @@ -44,3 +44,4 @@ protected DefaultBLLBaseContext( protected override IBLLFactoryContainer> BaseLogics => this.Logics; } + diff --git a/src/BLL/Framework.BLL.Runtime/Default/DefaultDomainBLLBase.cs b/src/BLL/Framework.BLL.Runtime/Default/DefaultDomainBLLBase.cs index 82dc7efae..38f6d9958 100644 --- a/src/BLL/Framework.BLL.Runtime/Default/DefaultDomainBLLBase.cs +++ b/src/BLL/Framework.BLL.Runtime/Default/DefaultDomainBLLBase.cs @@ -2,6 +2,10 @@ using System.Linq.Expressions; using Anch.Core; +using Anch.GenericQueryable; +using Anch.GenericQueryable.Fetching; +using Anch.HierarchicalExpand; +using Anch.OData.Domain; using Framework.Application.Domain; using Framework.BLL.Domain.Persistent; @@ -9,15 +13,8 @@ using Framework.Core; using Framework.Database; -using Anch.GenericQueryable; -using Anch.GenericQueryable.Fetching; - -using Anch.HierarchicalExpand; - using Microsoft.Extensions.DependencyInjection; -using Anch.OData.Domain; - namespace Framework.BLL.Default; public abstract class DefaultDomainBLLBase(TBLLContext context) : @@ -300,3 +297,4 @@ join domainObject in uniqueResult on ident equals domainObject.Id where TNestedDomainObject : class, TDomainObject => this.Context.Logics.Default.Create().GetById(domainObject.Id); } + diff --git a/src/BLL/Framework.BLL.Runtime/DefaultSecurityBLLFactory.cs b/src/BLL/Framework.BLL.Runtime/DefaultSecurityBLLFactory.cs index 0a29ebc45..da6c94ff1 100644 --- a/src/BLL/Framework.BLL.Runtime/DefaultSecurityBLLFactory.cs +++ b/src/BLL/Framework.BLL.Runtime/DefaultSecurityBLLFactory.cs @@ -1,9 +1,9 @@ -using Framework.Application.Domain; -using Framework.BLL.Services; - -using Anch.SecuritySystem; +using Anch.SecuritySystem; using Anch.SecuritySystem.Providers; +using Framework.Application.Domain; +using Framework.BLL.Services; + namespace Framework.BLL; public abstract class DefaultSecurityBLLFactory(TBLLContext context) : BLLContextContainer(context), @@ -24,3 +24,4 @@ public abstract IDefaultSecurityDomainBLLBase securityProvider) where TDomainObject : class, TPersistentDomainObjectBase; } + diff --git a/src/BLL/Framework.BLL.Runtime/DefaultSecurityDomainBLLBase.cs b/src/BLL/Framework.BLL.Runtime/DefaultSecurityDomainBLLBase.cs index 792680861..4d77b933d 100644 --- a/src/BLL/Framework.BLL.Runtime/DefaultSecurityDomainBLLBase.cs +++ b/src/BLL/Framework.BLL.Runtime/DefaultSecurityDomainBLLBase.cs @@ -1,8 +1,8 @@ using Anch.Core; +using Anch.SecuritySystem.Providers; using Framework.Application.Domain; using Framework.BLL.Default; -using Anch.SecuritySystem.Providers; namespace Framework.BLL; diff --git a/src/BLL/Framework.BLL.Runtime/Extensions/PropertyInfoExtensions.cs b/src/BLL/Framework.BLL.Runtime/Extensions/PropertyInfoExtensions.cs index f935c8bc9..4c1ac7b81 100644 --- a/src/BLL/Framework.BLL.Runtime/Extensions/PropertyInfoExtensions.cs +++ b/src/BLL/Framework.BLL.Runtime/Extensions/PropertyInfoExtensions.cs @@ -11,3 +11,4 @@ public static class PropertyInfoExtensions public Type GetNestedType() => property.PropertyType.GetCollectionElementType() ?? property.PropertyType; } } + diff --git a/src/BLL/Framework.BLL.Runtime/ImplementedSecurityBLLFactory.cs b/src/BLL/Framework.BLL.Runtime/ImplementedSecurityBLLFactory.cs index a8abee6a4..6b350579d 100644 --- a/src/BLL/Framework.BLL.Runtime/ImplementedSecurityBLLFactory.cs +++ b/src/BLL/Framework.BLL.Runtime/ImplementedSecurityBLLFactory.cs @@ -1,10 +1,10 @@ -using Framework.Application.Domain; +using Anch.SecuritySystem.Providers; + +using Framework.Application.Domain; using Framework.BLL.Services; using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem.Providers; - namespace Framework.BLL; public abstract class ImplementedSecurityBLLFactory(TBLLContext context) : @@ -32,3 +32,4 @@ protected abstract IDefaultSecurityDomainBLLBase securityProvider) where TDomainObject : class, TPersistentDomainObjectBase; } + diff --git a/src/BLL/Framework.BLL.Runtime/Mode/Attr/BLLSecurityModeAttribute.cs b/src/BLL/Framework.BLL.Runtime/Mode/Attr/BLLSecurityModeAttribute.cs index 6ec570205..0cbbb46d7 100644 --- a/src/BLL/Framework.BLL.Runtime/Mode/Attr/BLLSecurityModeAttribute.cs +++ b/src/BLL/Framework.BLL.Runtime/Mode/Attr/BLLSecurityModeAttribute.cs @@ -6,3 +6,4 @@ public class BLLSecurityModeAttribute(SecurityRule securityRule) : Attribute { public SecurityRule SecurityMode { get; private set; } = securityRule; } + diff --git a/src/BLL/Framework.BLL.Runtime/NestedCache.cs b/src/BLL/Framework.BLL.Runtime/NestedCache.cs index a9bcde2fa..ca9d9a4cc 100644 --- a/src/BLL/Framework.BLL.Runtime/NestedCache.cs +++ b/src/BLL/Framework.BLL.Runtime/NestedCache.cs @@ -1,4 +1,5 @@ using Anch.Core.DictionaryCache; + using Framework.Application.Domain; namespace Framework.BLL; @@ -8,3 +9,4 @@ public class NestedCache where TDomainObject : class, TPersistentDomainObjectBase where TPersistentDomainObjectBase : class, IIdentityObject; + diff --git a/src/BLL/Framework.BLL.Runtime/OperationBLLBase.cs b/src/BLL/Framework.BLL.Runtime/OperationBLLBase.cs index 96c7d4541..5b6badbda 100644 --- a/src/BLL/Framework.BLL.Runtime/OperationBLLBase.cs +++ b/src/BLL/Framework.BLL.Runtime/OperationBLLBase.cs @@ -22,3 +22,4 @@ public virtual void Remove(TDomainObject domainObject) this.Context.OperationSender.Send(domainObject, EventOperation.Remove, CancellationToken.None).GetAwaiter().GetResult(); } } + diff --git a/src/BLL/Framework.BLL.Runtime/SecurityBLLBaseContext`4.cs b/src/BLL/Framework.BLL.Runtime/SecurityBLLBaseContext`4.cs index 9473e354a..49bb63f19 100644 --- a/src/BLL/Framework.BLL.Runtime/SecurityBLLBaseContext`4.cs +++ b/src/BLL/Framework.BLL.Runtime/SecurityBLLBaseContext`4.cs @@ -1,11 +1,10 @@ -using Framework.Application.Domain; +using Anch.HierarchicalExpand; +using Anch.SecuritySystem.AccessDenied; + +using Framework.Application.Domain; using Framework.Application.Events; using Framework.BLL.Default; -using Anch.HierarchicalExpand; - -using Anch.SecuritySystem.AccessDenied; - namespace Framework.BLL; public abstract class SecurityBLLBaseContext( @@ -24,3 +23,4 @@ public abstract class SecurityBLLBaseContext(TBLLContext context) : @@ -23,3 +22,4 @@ public abstract class SecurityBLLFactory securityProvider) => this.Context.ServiceProvider.GetRequiredService().Create(securityProvider); } + diff --git a/src/BLL/Framework.BLL.Runtime/Services/RootSecurityService.cs b/src/BLL/Framework.BLL.Runtime/Services/RootSecurityService.cs index 931fa0b81..4d7df25d1 100644 --- a/src/BLL/Framework.BLL.Runtime/Services/RootSecurityService.cs +++ b/src/BLL/Framework.BLL.Runtime/Services/RootSecurityService.cs @@ -1,10 +1,10 @@ -using Microsoft.Extensions.DependencyInjection; - -using Anch.SecuritySystem; +using Anch.SecuritySystem; using Anch.SecuritySystem.AccessDenied; using Anch.SecuritySystem.DomainServices; using Anch.SecuritySystem.Providers; +using Microsoft.Extensions.DependencyInjection; + namespace Framework.BLL.Services; public class RootSecurityService( @@ -20,3 +20,4 @@ public void CheckAccess(TDomainObject domainObject, SecurityRule protected IDomainSecurityService GetDomainSecurityService() => serviceProvider.GetRequiredService>(); } + diff --git a/src/BLL/Framework.BLL.Runtime/Services/TargetInvocationExceptionExpander.cs b/src/BLL/Framework.BLL.Runtime/Services/TargetInvocationExceptionExpander.cs index 4dd23de87..1cc48b7c6 100644 --- a/src/BLL/Framework.BLL.Runtime/Services/TargetInvocationExceptionExpander.cs +++ b/src/BLL/Framework.BLL.Runtime/Services/TargetInvocationExceptionExpander.cs @@ -9,3 +9,4 @@ public class TargetInvocationExceptionExpander : IExceptionExpander public Exception? TryExpand(Exception exception) => exception is TargetInvocationException targetInvocationException ? targetInvocationException.GetBaseException() : null; } + diff --git a/src/BLL/Framework.BLL.Runtime/Services/TargetSystemInfoService.cs b/src/BLL/Framework.BLL.Runtime/Services/TargetSystemInfoService.cs index 9638a36e0..6341f8a4f 100644 --- a/src/BLL/Framework.BLL.Runtime/Services/TargetSystemInfoService.cs +++ b/src/BLL/Framework.BLL.Runtime/Services/TargetSystemInfoService.cs @@ -14,3 +14,4 @@ public PersistentTargetSystemInfo GetPersistentTargetSystemInfo(Type domainType) this.cache.GetValueOrDefault(domainType) ?? throw new ArgumentOutOfRangeException(nameof(domainType), $"{nameof(PersistentTargetSystemInfo)} for domainType {domainType.Name} not found"); } + diff --git a/src/BLL/Framework.BLL.Runtime/TargetSystemTypeResolverContainer.cs b/src/BLL/Framework.BLL.Runtime/TargetSystemTypeResolverContainer.cs index d8b841140..d94741b31 100644 --- a/src/BLL/Framework.BLL.Runtime/TargetSystemTypeResolverContainer.cs +++ b/src/BLL/Framework.BLL.Runtime/TargetSystemTypeResolverContainer.cs @@ -8,3 +8,4 @@ public class TargetSystemTypeResolverContainer(IEnumerable tar { public ITypeResolver TypeResolver => field ??= targetSystemInfoList.Select(v => v.Domain.TypeResolver).ToComposite(); } + diff --git a/src/BLL/Framework.BLL.Runtime/Visitors/ExpandPathVisitor.cs b/src/BLL/Framework.BLL.Runtime/Visitors/ExpandPathVisitor.cs index ad453a1bf..976787710 100644 --- a/src/BLL/Framework.BLL.Runtime/Visitors/ExpandPathVisitor.cs +++ b/src/BLL/Framework.BLL.Runtime/Visitors/ExpandPathVisitor.cs @@ -79,3 +79,4 @@ private Expression VisitWithLiftToNullable(IReadOnlyCollection args, ExpressionType.LessThanOrEqual ]; } + diff --git a/src/BLL/Framework.BLL.Runtime/Visitors/ExpandPathVisitorContainer.cs b/src/BLL/Framework.BLL.Runtime/Visitors/ExpandPathVisitorContainer.cs index cc6d8ce0b..7d22cfe3e 100644 --- a/src/BLL/Framework.BLL.Runtime/Visitors/ExpandPathVisitorContainer.cs +++ b/src/BLL/Framework.BLL.Runtime/Visitors/ExpandPathVisitorContainer.cs @@ -9,3 +9,4 @@ public class ExpandPathVisitorContainer(IPropertyPathService propertyPathService { public ExpressionVisitor Visitor { get; } = new ExpandPathVisitor(propertyPathService); } + diff --git a/src/BLL/Framework.BLL.Validation/AvailableValues.cs b/src/BLL/Framework.BLL.Validation/AvailableValues.cs index 4935e95a1..f74d4867e 100644 --- a/src/BLL/Framework.BLL.Validation/AvailableValues.cs +++ b/src/BLL/Framework.BLL.Validation/AvailableValues.cs @@ -25,3 +25,4 @@ public record AvailableValues(Range DecimalRange, Range DateT new Range(SqlDateTime.MinValue.Value, SqlDateTime.MaxValue.Value), byte.MaxValue)); } + diff --git a/src/BLL/Framework.BLL.Validation/AvailableValuesHelper.cs b/src/BLL/Framework.BLL.Validation/AvailableValuesHelper.cs index c2adca531..fcbdeaf96 100644 --- a/src/BLL/Framework.BLL.Validation/AvailableValuesHelper.cs +++ b/src/BLL/Framework.BLL.Validation/AvailableValuesHelper.cs @@ -13,3 +13,4 @@ public static class AvailableValuesHelper new Range(SqlDateTime.MinValue.Value, SqlDateTime.MaxValue.Value), byte.MaxValue); } + diff --git a/src/BLL/Framework.BLL.Validation/BLLContextHandlerValidator.cs b/src/BLL/Framework.BLL.Validation/BLLContextHandlerValidator.cs index c265ebd35..14bb63a01 100644 --- a/src/BLL/Framework.BLL.Validation/BLLContextHandlerValidator.cs +++ b/src/BLL/Framework.BLL.Validation/BLLContextHandlerValidator.cs @@ -25,3 +25,4 @@ protected ValidationResult GetValidationResult(TSource source, TOperati protected void RegisterHandler(Func func) => this.handlers.Add(typeof(TDomainObject), func); } + diff --git a/src/BLL/Framework.BLL.Validation/BLLContextValidator.cs b/src/BLL/Framework.BLL.Validation/BLLContextValidator.cs index 9a5bcd17c..89f0150fb 100644 --- a/src/BLL/Framework.BLL.Validation/BLLContextValidator.cs +++ b/src/BLL/Framework.BLL.Validation/BLLContextValidator.cs @@ -21,3 +21,4 @@ public class BLLContextValidator(TBLLContext con #endregion } + diff --git a/src/BLL/Framework.BLL.Validation/UniDBGroupValidatorAttribute.cs b/src/BLL/Framework.BLL.Validation/UniDBGroupValidatorAttribute.cs index f910a9cf0..73e6efea2 100644 --- a/src/BLL/Framework.BLL.Validation/UniDBGroupValidatorAttribute.cs +++ b/src/BLL/Framework.BLL.Validation/UniDBGroupValidatorAttribute.cs @@ -29,3 +29,4 @@ public class UniDBGroupValidatorAttribute : ClassValidatorAttribute /// public override IClassValidator CreateValidator() => new UniqueGroupDatabaseValidator(this.GroupKey); } + diff --git a/src/BLL/Framework.BLL.Validation/UniqueGroupDatabaseValidator.cs b/src/BLL/Framework.BLL.Validation/UniqueGroupDatabaseValidator.cs index a83847f98..8cb78c310 100644 --- a/src/BLL/Framework.BLL.Validation/UniqueGroupDatabaseValidator.cs +++ b/src/BLL/Framework.BLL.Validation/UniqueGroupDatabaseValidator.cs @@ -114,3 +114,4 @@ private Expression GetEqualityMethod(PropertyInfo property, Expression e1, Expre return Expression.Equal(e1, e2, property.PropertyType.IsNullable(), eqMethod); } } + diff --git a/src/BLL/Framework.BLL.Validation/UniqueGroupDatabaseValidator`4.cs b/src/BLL/Framework.BLL.Validation/UniqueGroupDatabaseValidator`4.cs index 8d01c6c33..c23d9269e 100644 --- a/src/BLL/Framework.BLL.Validation/UniqueGroupDatabaseValidator`4.cs +++ b/src/BLL/Framework.BLL.Validation/UniqueGroupDatabaseValidator`4.cs @@ -41,3 +41,4 @@ public ValidationResult GetValidationResult(IClassValidationContext $"{typeof(TDomainObject).Name} with same {propertyName} ({getPropertyValues(validationContext.Source).Join(", ")}) already exists"); } } + diff --git a/src/BLL/Framework.BLL/DependencyInjection/BLLSystemSettings.cs b/src/BLL/Framework.BLL/DependencyInjection/BLLSystemSettings.cs index ca4dcf0b6..bc71dbe0d 100644 --- a/src/BLL/Framework.BLL/DependencyInjection/BLLSystemSettings.cs +++ b/src/BLL/Framework.BLL/DependencyInjection/BLLSystemSettings.cs @@ -22,3 +22,4 @@ public class BLLSystemSettings public T GetSafe(Expression> expr, T? defaultValue = default) => expr.Compile().Invoke(this) ?? defaultValue ?? throw new Exception($"{expr.GetMemberName()} not initialized"); } + diff --git a/src/BLL/Framework.BLL/DependencyInjection/ServiceCollectionExtensions.cs b/src/BLL/Framework.BLL/DependencyInjection/ServiceCollectionExtensions.cs index 38b149a63..1273ec4f7 100644 --- a/src/BLL/Framework.BLL/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/BLL/Framework.BLL/DependencyInjection/ServiceCollectionExtensions.cs @@ -1,14 +1,13 @@ using System.Reflection; using Anch.Core; +using Anch.GenericQueryable.Fetching; using Framework.Core; using Framework.DependencyInjection; using Framework.Validation; using Framework.Validation.Map; -using Anch.GenericQueryable.Fetching; - using Microsoft.Extensions.DependencyInjection; namespace Framework.BLL.DependencyInjection; @@ -105,15 +104,15 @@ private static BLLSystemSettings ExtractSettings)); return new BLLSystemSettings - { - ValidatorDeclType = validatorDeclType, - ValidatorImplType = validatorImplType, - ValidatorCompileCacheType = validatorCompileCacheType, - ValidationMapType = validationMapType, - FactoryContainerDeclType = factoryContainerDeclType, - FactoryContainerImplType = GetImplType(factoryContainerDeclType), - FetchRuleExpanderType = TryGetImplType(typeof(DTOFetchRuleExpander<>).MakeGenericType(persistentDomainObjectBaseType)) ?? typeof(IFetchRuleExpander), - }; + { + ValidatorDeclType = validatorDeclType, + ValidatorImplType = validatorImplType, + ValidatorCompileCacheType = validatorCompileCacheType, + ValidationMapType = validationMapType, + FactoryContainerDeclType = factoryContainerDeclType, + FactoryContainerImplType = GetImplType(factoryContainerDeclType), + FetchRuleExpanderType = TryGetImplType(typeof(DTOFetchRuleExpander<>).MakeGenericType(persistentDomainObjectBaseType)) ?? typeof(IFetchRuleExpander), + }; Type? TryGetImplType(Type baseType) => asmTypes.SingleOrDefault(t => t is { IsClass: true, IsAbstract: false } && baseType.IsAssignableFrom(t)); @@ -125,3 +124,4 @@ private static BLLSystemSettings ExtractSettings GetSingleCtorParameterTypes(this Type type) => type.GetConstructors().Single().GetParameters().Select(p => p.ParameterType); } + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeDomVisitor.cs b/src/CodeGeneration/Framework.CodeDom/CodeDomVisitor.cs index 19d73b9eb..5436111c3 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeDomVisitor.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeDomVisitor.cs @@ -68,14 +68,14 @@ public virtual CodeTypeDeclaration VisitTypeDeclaration(CodeTypeDeclaration code if (codeTypeDeclaration == null) throw new ArgumentNullException(nameof(codeTypeDeclaration)); var newTypeDeclaration = new CodeTypeDeclaration - { - IsClass = codeTypeDeclaration.IsClass, - IsEnum = codeTypeDeclaration.IsEnum, - IsInterface = codeTypeDeclaration.IsInterface, - IsPartial = codeTypeDeclaration.IsPartial, - IsStruct = codeTypeDeclaration.IsStruct, - TypeAttributes = codeTypeDeclaration.TypeAttributes, - }; + { + IsClass = codeTypeDeclaration.IsClass, + IsEnum = codeTypeDeclaration.IsEnum, + IsInterface = codeTypeDeclaration.IsInterface, + IsPartial = codeTypeDeclaration.IsPartial, + IsStruct = codeTypeDeclaration.IsStruct, + TypeAttributes = codeTypeDeclaration.TypeAttributes, + }; this.InitializeTypeMember(newTypeDeclaration, codeTypeDeclaration); @@ -177,12 +177,12 @@ public virtual CodeMemberProperty VisitMemberProperty(CodeMemberProperty codeMem if (codeMemberProperty == null) throw new ArgumentNullException(nameof(codeMemberProperty)); var newMemberProperty = new CodeMemberProperty - { - HasGet = codeMemberProperty.HasGet, - HasSet = codeMemberProperty.HasSet, - PrivateImplementationType = codeMemberProperty.PrivateImplementationType.Maybe(v => this.VisitTypeReference(v)), - Type = this.VisitTypeReference(codeMemberProperty.Type) - }; + { + HasGet = codeMemberProperty.HasGet, + HasSet = codeMemberProperty.HasSet, + PrivateImplementationType = codeMemberProperty.PrivateImplementationType.Maybe(v => this.VisitTypeReference(v)), + Type = this.VisitTypeReference(codeMemberProperty.Type) + }; this.InitializeTypeMember(newMemberProperty, codeMemberProperty); @@ -218,10 +218,10 @@ public virtual CodeMemberField VisitMemberField(CodeMemberField codeMemberField) if (codeMemberField == null) throw new ArgumentNullException(nameof(codeMemberField)); return new CodeMemberField - { - Type = this.VisitTypeReference(codeMemberField.Type), - InitExpression = codeMemberField.InitExpression.Maybe(this.VisitExpression) - }.Self(v => this.InitializeTypeMember(v, codeMemberField)); + { + Type = this.VisitTypeReference(codeMemberField.Type), + InitExpression = codeMemberField.InitExpression.Maybe(this.VisitExpression) + }.Self(v => this.InitializeTypeMember(v, codeMemberField)); } public virtual CodeTypeParameter VisitTypeParameter(CodeTypeParameter codeTypeParameter) @@ -238,24 +238,24 @@ public virtual CodeTypeParameter VisitTypeParameter(CodeTypeParameter codeTypePa public virtual CodeAttributeDeclaration VisitAttributeDeclaration(CodeAttributeDeclaration codeAttributeDeclaration) { - var newAttributeDeclaration = new CodeAttributeDeclaration (codeAttributeDeclaration.AttributeType) - { - Name = codeAttributeDeclaration.Name - }; + var newAttributeDeclaration = new CodeAttributeDeclaration(codeAttributeDeclaration.AttributeType) + { + Name = codeAttributeDeclaration.Name + }; newAttributeDeclaration.Arguments.AddRange(codeAttributeDeclaration.Arguments.Cast().ToArrayExceptNull(this.VisitAttributeArgument)); return newAttributeDeclaration; } - public virtual CodeAttributeArgument VisitAttributeArgument (CodeAttributeArgument codeAttributeArgument) + public virtual CodeAttributeArgument VisitAttributeArgument(CodeAttributeArgument codeAttributeArgument) { if (codeAttributeArgument == null) throw new ArgumentNullException(nameof(codeAttributeArgument)); return new CodeAttributeArgument(codeAttributeArgument.Name, codeAttributeArgument.Value.Maybe(v => this.VisitExpression(v))); } - public virtual CodeParameterDeclarationExpressionCollection VisitParameterDeclarationExpressionCollection (CodeParameterDeclarationExpressionCollection collection) + public virtual CodeParameterDeclarationExpressionCollection VisitParameterDeclarationExpressionCollection(CodeParameterDeclarationExpressionCollection collection) { if (collection == null) throw new ArgumentNullException(nameof(collection)); @@ -274,13 +274,13 @@ public virtual CodeParameterDeclarationExpression VisitParameterDeclarationExpre if (codeParameterDeclarationExpression == null) throw new ArgumentNullException(nameof(codeParameterDeclarationExpression)); return new CodeParameterDeclarationExpression(this.VisitTypeReference(codeParameterDeclarationExpression.Type), codeParameterDeclarationExpression.Name) - { - Direction = codeParameterDeclarationExpression.Direction, - CustomAttributes = new CodeAttributeDeclarationCollection(codeParameterDeclarationExpression.CustomAttributes.ToArrayExceptNull(this.VisitAttributeDeclaration)) - }.WithCopyUserDataFrom(codeParameterDeclarationExpression); + { + Direction = codeParameterDeclarationExpression.Direction, + CustomAttributes = new CodeAttributeDeclarationCollection(codeParameterDeclarationExpression.CustomAttributes.ToArrayExceptNull(this.VisitAttributeDeclaration)) + }.WithCopyUserDataFrom(codeParameterDeclarationExpression); } - public virtual CodeExpression VisitExpression (CodeExpression codeExpression) + public virtual CodeExpression VisitExpression(CodeExpression codeExpression) { if (codeExpression == null) throw new ArgumentNullException(nameof(codeExpression)); @@ -312,7 +312,7 @@ public virtual CodeExpression VisitExpression (CodeExpression codeExpression) { return this.VisitTypeReferenceExpression(typeReferenceExpression); } - else if(codeExpression is CodeLambdaExpression lambdaExpression) + else if (codeExpression is CodeLambdaExpression lambdaExpression) { return this.VisitLambdaExpression(lambdaExpression); } @@ -342,9 +342,9 @@ public virtual CodeExpression VisitTypeReferenceExpression(CodeTypeReferenceExpr if (codeExpression == null) throw new ArgumentNullException(nameof(codeExpression)); return new CodeTypeReferenceExpression - { - Type = this.VisitTypeReference(codeExpression.Type) - }.WithCopyUserDataFrom(codeExpression); + { + Type = this.VisitTypeReference(codeExpression.Type) + }.WithCopyUserDataFrom(codeExpression); } protected virtual CodeMethodReferenceExpression VisitMethodReferenceExpression(CodeMethodReferenceExpression codeMethodReferenceExpression) @@ -461,9 +461,9 @@ public virtual CodeStatement VisitVariableDeclarationStatement(CodeVariableDecla if (codeVariableDeclarationStatement == null) throw new ArgumentNullException(nameof(codeVariableDeclarationStatement)); return new CodeVariableDeclarationStatement(this.VisitTypeReference(codeVariableDeclarationStatement.Type), codeVariableDeclarationStatement.Name, codeVariableDeclarationStatement.InitExpression.Maybe(v => this.VisitExpression(v))) - { - LinePragma = codeVariableDeclarationStatement.LinePragma - }; + { + LinePragma = codeVariableDeclarationStatement.LinePragma + }; } public virtual CodeTypeReference VisitTypeReference(CodeTypeReference codeTypeReference) @@ -471,12 +471,12 @@ public virtual CodeTypeReference VisitTypeReference(CodeTypeReference codeTypeRe if (codeTypeReference == null) throw new ArgumentNullException(nameof(codeTypeReference)); var newTypeReference = new CodeTypeReference - { - ArrayElementType = codeTypeReference.ArrayElementType.Maybe(this.VisitTypeReference), - ArrayRank = codeTypeReference.ArrayRank, - BaseType = codeTypeReference.BaseType, - Options = codeTypeReference.Options - }; + { + ArrayElementType = codeTypeReference.ArrayElementType.Maybe(this.VisitTypeReference), + ArrayRank = codeTypeReference.ArrayRank, + BaseType = codeTypeReference.BaseType, + Options = codeTypeReference.Options + }; newTypeReference.TypeArguments.AddRange(codeTypeReference.TypeArguments.ToArrayExceptNull(this.VisitTypeReference)); @@ -537,3 +537,4 @@ protected T WithoutDeepOperation(Func func) private class CloneVisitor : CodeDomVisitor; } + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeIsNotNullExpression.cs b/src/CodeGeneration/Framework.CodeDom/CodeIsNotNullExpression.cs index d1aefbeac..1a41eb391 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeIsNotNullExpression.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeIsNotNullExpression.cs @@ -3,3 +3,4 @@ namespace Framework.CodeDom; public class CodeIsNotNullExpression(CodeExpression value) : CodeNegateExpression(new CodeIsNullExpression(value)); + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeIsNullExpression.cs b/src/CodeGeneration/Framework.CodeDom/CodeIsNullExpression.cs index a550ab8a7..54041aa8b 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeIsNullExpression.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeIsNullExpression.cs @@ -10,3 +10,4 @@ public CodeIsNullExpression(CodeExpression value) } } + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeNegateExpression.cs b/src/CodeGeneration/Framework.CodeDom/CodeNegateExpression.cs index deb688310..a3bf48789 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeNegateExpression.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeNegateExpression.cs @@ -3,3 +3,4 @@ namespace Framework.CodeDom; public class CodeNegateExpression(CodeExpression value) : CodeValueEqualityOperatorExpression(value, new CodePrimitiveExpression(false)); + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeNotNullConditionStatement.cs b/src/CodeGeneration/Framework.CodeDom/CodeNotNullConditionStatement.cs index 263490eaf..3c0c727ea 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeNotNullConditionStatement.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeNotNullConditionStatement.cs @@ -3,3 +3,4 @@ namespace Framework.CodeDom; public class CodeNotNullConditionStatement(CodeExpression expression) : CodeConditionStatement(new CodeIsNotNullExpression(expression)); + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeNullConditionStatement.cs b/src/CodeGeneration/Framework.CodeDom/CodeNullConditionStatement.cs index 39ae28b56..2ca24a5a4 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeNullConditionStatement.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeNullConditionStatement.cs @@ -3,3 +3,4 @@ namespace Framework.CodeDom; public class CodeNullConditionStatement(CodeExpression expression) : CodeConditionStatement(new CodeIsNullExpression(expression)); + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeObjectEqualsExpression.cs b/src/CodeGeneration/Framework.CodeDom/CodeObjectEqualsExpression.cs index 3b6380239..4eaf9078f 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeObjectEqualsExpression.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeObjectEqualsExpression.cs @@ -10,3 +10,4 @@ public CodeObjectEqualsExpression(CodeExpression value1, CodeExpression value2) } } + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeObjectReferenceEqualsExpression.cs b/src/CodeGeneration/Framework.CodeDom/CodeObjectReferenceEqualsExpression.cs index 966918243..02f0e4549 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeObjectReferenceEqualsExpression.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeObjectReferenceEqualsExpression.cs @@ -9,3 +9,4 @@ public CodeObjectReferenceEqualsExpression(CodeExpression value1, CodeExpression { } } + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeThrowArgumentNullExceptionConditionStatement.cs b/src/CodeGeneration/Framework.CodeDom/CodeThrowArgumentNullExceptionConditionStatement.cs index 898746f84..afbdb814c 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeThrowArgumentNullExceptionConditionStatement.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeThrowArgumentNullExceptionConditionStatement.cs @@ -9,3 +9,4 @@ public class CodeThrowArgumentNullExceptionConditionStatement(CodeParameterDecla new CodeThrowExceptionStatement( typeof(ArgumentNullException).ToTypeReference() .ToObjectCreateExpression(new CodePrimitiveExpression(parameter.Name)))); + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeThrowArgumentOutOfRangeExceptionStatement.cs b/src/CodeGeneration/Framework.CodeDom/CodeThrowArgumentOutOfRangeExceptionStatement.cs index 38fce85a5..29446361a 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeThrowArgumentOutOfRangeExceptionStatement.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeThrowArgumentOutOfRangeExceptionStatement.cs @@ -17,3 +17,4 @@ public CodeThrowArgumentOutOfRangeExceptionStatement(CodeTypeParameter parameter { } } + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeThrowInvalidOperationThrowExceptionStatement.cs b/src/CodeGeneration/Framework.CodeDom/CodeThrowInvalidOperationThrowExceptionStatement.cs index c97fa8f15..382c0bb7c 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeThrowInvalidOperationThrowExceptionStatement.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeThrowInvalidOperationThrowExceptionStatement.cs @@ -6,3 +6,4 @@ namespace Framework.CodeDom; public class CodeThrowInvalidOperationThrowExceptionStatement(string message) : CodeThrowExceptionStatement(typeof(InvalidOperationException).ToTypeReference().ToObjectCreateExpression(new CodePrimitiveExpression(message))); + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeTypeReferenceComparer.cs b/src/CodeGeneration/Framework.CodeDom/CodeTypeReferenceComparer.cs index 1e3e85b0c..5be705a8b 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeTypeReferenceComparer.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeTypeReferenceComparer.cs @@ -24,3 +24,4 @@ public bool Equals(CodeTypeReference x, CodeTypeReference y) => public static readonly CodeTypeReferenceComparer Value = new(); } + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeValueEqualityOperatorExpression.cs b/src/CodeGeneration/Framework.CodeDom/CodeValueEqualityOperatorExpression.cs index 51a60fd2c..ad19b9c64 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeValueEqualityOperatorExpression.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeValueEqualityOperatorExpression.cs @@ -3,3 +3,4 @@ namespace Framework.CodeDom; public class CodeValueEqualityOperatorExpression(CodeExpression left, CodeExpression right) : CodeBinaryOperatorExpression(left, CodeBinaryOperatorType.ValueEquality, right); + diff --git a/src/CodeGeneration/Framework.CodeDom/CodeValueUnequalityOperatorExpression.cs b/src/CodeGeneration/Framework.CodeDom/CodeValueUnequalityOperatorExpression.cs index 69ac978bb..906a0559f 100644 --- a/src/CodeGeneration/Framework.CodeDom/CodeValueUnequalityOperatorExpression.cs +++ b/src/CodeGeneration/Framework.CodeDom/CodeValueUnequalityOperatorExpression.cs @@ -6,3 +6,4 @@ public class CodeValueUnequalityOperatorExpression(CodeExpression left, CodeExpr new CodeValueEqualityOperatorExpression(left, right), CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(false)); + diff --git a/src/CodeGeneration/Framework.CodeDom/Extend/CodeBinaryOperatorCollectionExpression.cs b/src/CodeGeneration/Framework.CodeDom/Extend/CodeBinaryOperatorCollectionExpression.cs index 65fd9e466..5847cccb3 100644 --- a/src/CodeGeneration/Framework.CodeDom/Extend/CodeBinaryOperatorCollectionExpression.cs +++ b/src/CodeGeneration/Framework.CodeDom/Extend/CodeBinaryOperatorCollectionExpression.cs @@ -20,3 +20,4 @@ public CodeBinaryOperatorCollectionExpression(CodeBinaryOperatorType @operator, public CodeExpressionCollection Expressions { get; set; } = new(); } + diff --git a/src/CodeGeneration/Framework.CodeDom/Extend/CodeBooleanAndOperatorExpression.cs b/src/CodeGeneration/Framework.CodeDom/Extend/CodeBooleanAndOperatorExpression.cs index 8e10b70d7..cce28d1e6 100644 --- a/src/CodeGeneration/Framework.CodeDom/Extend/CodeBooleanAndOperatorExpression.cs +++ b/src/CodeGeneration/Framework.CodeDom/Extend/CodeBooleanAndOperatorExpression.cs @@ -5,3 +5,4 @@ namespace Framework.CodeDom.Extend; public class CodeBooleanAndOperatorExpression(params CodeExpression[] operations) : CodeBinaryOperatorCollectionExpression(CodeBinaryOperatorType.BooleanAnd, operations); public class CodeBooleanOrOperatorExpression(params CodeExpression[] operations) : CodeBinaryOperatorCollectionExpression(CodeBinaryOperatorType.BooleanOr, operations); + diff --git a/src/CodeGeneration/Framework.CodeDom/Extend/CodeForeachStatement.cs b/src/CodeGeneration/Framework.CodeDom/Extend/CodeForeachStatement.cs index 97c0a4361..23e4500e8 100644 --- a/src/CodeGeneration/Framework.CodeDom/Extend/CodeForeachStatement.cs +++ b/src/CodeGeneration/Framework.CodeDom/Extend/CodeForeachStatement.cs @@ -22,3 +22,4 @@ public CodeParameterDeclarationExpression Iterator public CodeExpression Source { get; set; } } + diff --git a/src/CodeGeneration/Framework.CodeDom/Extend/CodeLambdaExpression.cs b/src/CodeGeneration/Framework.CodeDom/Extend/CodeLambdaExpression.cs index a68901040..80dd7b168 100644 --- a/src/CodeGeneration/Framework.CodeDom/Extend/CodeLambdaExpression.cs +++ b/src/CodeGeneration/Framework.CodeDom/Extend/CodeLambdaExpression.cs @@ -28,3 +28,4 @@ public CodeParameterDeclarationExpressionCollection Parameters set => this.parameters = value ?? new CodeParameterDeclarationExpressionCollection(); } } + diff --git a/src/CodeGeneration/Framework.CodeDom/Extend/CodeMaybePropertyReferenceExpression.cs b/src/CodeGeneration/Framework.CodeDom/Extend/CodeMaybePropertyReferenceExpression.cs index c54604eca..6311c4024 100644 --- a/src/CodeGeneration/Framework.CodeDom/Extend/CodeMaybePropertyReferenceExpression.cs +++ b/src/CodeGeneration/Framework.CodeDom/Extend/CodeMaybePropertyReferenceExpression.cs @@ -13,3 +13,4 @@ public CodeMaybePropertyReferenceExpression(CodeExpression targetObject, string { } } + diff --git a/src/CodeGeneration/Framework.CodeDom/Extend/CodeMethodYieldBreakStatement.cs b/src/CodeGeneration/Framework.CodeDom/Extend/CodeMethodYieldBreakStatement.cs index 89e7dc18d..975d19b1f 100644 --- a/src/CodeGeneration/Framework.CodeDom/Extend/CodeMethodYieldBreakStatement.cs +++ b/src/CodeGeneration/Framework.CodeDom/Extend/CodeMethodYieldBreakStatement.cs @@ -3,3 +3,4 @@ namespace Framework.CodeDom.Extend; public class CodeMethodYieldBreakStatement : CodeStatement; + diff --git a/src/CodeGeneration/Framework.CodeDom/Extend/CodeMethodYieldReturnStatement.cs b/src/CodeGeneration/Framework.CodeDom/Extend/CodeMethodYieldReturnStatement.cs index 634daea65..0eaad22bd 100644 --- a/src/CodeGeneration/Framework.CodeDom/Extend/CodeMethodYieldReturnStatement.cs +++ b/src/CodeGeneration/Framework.CodeDom/Extend/CodeMethodYieldReturnStatement.cs @@ -6,3 +6,4 @@ public class CodeMethodYieldReturnStatement : CodeStatement { public CodeExpression Expression { get; set; } } + diff --git a/src/CodeGeneration/Framework.CodeDom/Extend/CodeNameofExpression.cs b/src/CodeGeneration/Framework.CodeDom/Extend/CodeNameofExpression.cs index 1db5021b7..a3c70cbb2 100644 --- a/src/CodeGeneration/Framework.CodeDom/Extend/CodeNameofExpression.cs +++ b/src/CodeGeneration/Framework.CodeDom/Extend/CodeNameofExpression.cs @@ -12,3 +12,4 @@ public CodeNameofExpression() public string Value { get; set; } } + diff --git a/src/CodeGeneration/Framework.CodeDom/Extensions/CodeExpressionExtensions.cs b/src/CodeGeneration/Framework.CodeDom/Extensions/CodeExpressionExtensions.cs index b510e098f..fbe5f7321 100644 --- a/src/CodeGeneration/Framework.CodeDom/Extensions/CodeExpressionExtensions.cs +++ b/src/CodeGeneration/Framework.CodeDom/Extensions/CodeExpressionExtensions.cs @@ -65,9 +65,10 @@ public static CodeLambdaExpression ToCodeLambdaExpression(this PropertyInfo prop var varDecl = new CodeParameterDeclarationExpression { Name = varName }; return new CodeLambdaExpression - { - Parameters = { varDecl }, - Statements = { varDecl.ToVariableReferenceExpression().ToPropertyReference(property) } - }; + { + Parameters = { varDecl }, + Statements = { varDecl.ToVariableReferenceExpression().ToPropertyReference(property) } + }; } } + diff --git a/src/CodeGeneration/Framework.CodeDom/Extensions/CodeMemberMethodExtensions.cs b/src/CodeGeneration/Framework.CodeDom/Extensions/CodeMemberMethodExtensions.cs index 5a416808f..57b821ad7 100644 --- a/src/CodeGeneration/Framework.CodeDom/Extensions/CodeMemberMethodExtensions.cs +++ b/src/CodeGeneration/Framework.CodeDom/Extensions/CodeMemberMethodExtensions.cs @@ -118,3 +118,4 @@ public static TMethod WithYield(this TMethod codeMemberMethod, IEnumera return codeMemberMethod; } } + diff --git a/src/CodeGeneration/Framework.CodeDom/Extensions/CodePrimitiveExpressionExtensions.cs b/src/CodeGeneration/Framework.CodeDom/Extensions/CodePrimitiveExpressionExtensions.cs index 7db67375a..ce1493a27 100644 --- a/src/CodeGeneration/Framework.CodeDom/Extensions/CodePrimitiveExpressionExtensions.cs +++ b/src/CodeGeneration/Framework.CodeDom/Extensions/CodePrimitiveExpressionExtensions.cs @@ -26,3 +26,4 @@ public static CodeExpression ToPrimitiveExpression(this Enum value) public static CodeExpression ToPrimitiveExpression(this string value) => new CodePrimitiveExpression(value); } + diff --git a/src/CodeGeneration/Framework.CodeDom/Extensions/CodeTypeReferenceExtensions.cs b/src/CodeGeneration/Framework.CodeDom/Extensions/CodeTypeReferenceExtensions.cs index 01670e6ab..e3cf59233 100644 --- a/src/CodeGeneration/Framework.CodeDom/Extensions/CodeTypeReferenceExtensions.cs +++ b/src/CodeGeneration/Framework.CodeDom/Extensions/CodeTypeReferenceExtensions.cs @@ -547,11 +547,11 @@ public static CodeStatement ToSwitchExpressionStatement(this IEnumerable new CodeConditionStatement - { - Condition = pair.Item1, - TrueStatements = { pair.Item2 }, - FalseStatements = { state } - }); + { + Condition = pair.Item1, + TrueStatements = { pair.Item2 }, + FalseStatements = { state } + }); } @@ -578,3 +578,4 @@ public static CodeStatement Composite(this IEnumerable statements } } } + diff --git a/src/CodeGeneration/Framework.CodeDom/Extensions/EnumerableExtensions.cs b/src/CodeGeneration/Framework.CodeDom/Extensions/EnumerableExtensions.cs index dafe9032f..ff1937f5a 100644 --- a/src/CodeGeneration/Framework.CodeDom/Extensions/EnumerableExtensions.cs +++ b/src/CodeGeneration/Framework.CodeDom/Extensions/EnumerableExtensions.cs @@ -174,3 +174,4 @@ private static T[] ToArrayExceptNull(this IEnumerable source) return source.Where(v => v != null).ToArray(); } } + diff --git a/src/CodeGeneration/Framework.CodeDom/Rendering/CSharpCodeDomRenderer.cs b/src/CodeGeneration/Framework.CodeDom/Rendering/CSharpCodeDomRenderer.cs index 45858686a..c90b2f48e 100644 --- a/src/CodeGeneration/Framework.CodeDom/Rendering/CSharpCodeDomRenderer.cs +++ b/src/CodeGeneration/Framework.CodeDom/Rendering/CSharpCodeDomRenderer.cs @@ -276,3 +276,4 @@ protected override CodeTypeReference NormalizeNullableCodeTypeReference(CodeType } } } + diff --git a/src/CodeGeneration/Framework.CodeDom/Rendering/CodeDomProviderRenderer.cs b/src/CodeGeneration/Framework.CodeDom/Rendering/CodeDomProviderRenderer.cs index 3a853c179..de35b857a 100644 --- a/src/CodeGeneration/Framework.CodeDom/Rendering/CodeDomProviderRenderer.cs +++ b/src/CodeGeneration/Framework.CodeDom/Rendering/CodeDomProviderRenderer.cs @@ -211,3 +211,4 @@ public override CodeTypeReference VisitTypeReference(CodeTypeReference codeTypeR protected abstract CodeExpression NormalizeExpression(CodeNameofExpression nameofExpression); } } + diff --git a/src/CodeGeneration/Framework.CodeDom/Rendering/CodeDomRenderer.cs b/src/CodeGeneration/Framework.CodeDom/Rendering/CodeDomRenderer.cs index ba3887f0c..de949005f 100644 --- a/src/CodeGeneration/Framework.CodeDom/Rendering/CodeDomRenderer.cs +++ b/src/CodeGeneration/Framework.CodeDom/Rendering/CodeDomRenderer.cs @@ -38,3 +38,4 @@ public abstract class CodeDomRenderer : {"CompilerVersion", "v4.0"} })); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/BLLCoreFileGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/BLLCoreFileGenerator.cs index cabfdca2b..c80d538c6 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/BLLCoreFileGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/BLLCoreFileGenerator.cs @@ -22,5 +22,11 @@ protected override IEnumerable GetInternalFileGenerators() yield return new BLLInterfaceFileFactory(this.Configuration, domainType); yield return new BLLFactoryInterfaceFileFactory(this.Configuration, domainType); } + + if (this.Configuration.GenerateValidation) + { + yield return new ValidatorInterfaceFileFactory(this.Configuration); + } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/BLLCoreGeneratorConfigurationBase.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/BLLCoreGeneratorConfigurationBase.cs index 2cf2de2ab..e49ef2a42 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/BLLCoreGeneratorConfigurationBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/BLLCoreGeneratorConfigurationBase.cs @@ -1,9 +1,8 @@ using System.CodeDom; using System.Collections.ObjectModel; using System.Reflection; - using Anch.Core; - +using Anch.SecuritySystem; using Framework.BLL; using Framework.BLL.Domain.ServiceRole; using Framework.BLL.Services; @@ -14,8 +13,6 @@ using Framework.FileGeneration.Configuration; using Framework.Projection; -using Anch.SecuritySystem; - #pragma warning disable S100 // Methods and properties should be named in camel case namespace Framework.CodeGeneration.BLLCoreGenerator.Configuration; @@ -45,6 +42,8 @@ protected BLLCoreGeneratorConfigurationBase(TEnvironment environment) protected override string NamespacePostfix { get; } = "BLL"; + public virtual bool GenerateValidation { get; } = true; + public ReadOnlyCollection BLLDomainTypes => this.lazyBLLDomainTypes.Value; /// @@ -68,6 +67,9 @@ protected BLLCoreGeneratorConfigurationBase(TEnvironment environment) new CodeFileFactoryHeader(FileType.BLLFactoryContainerInterface, string.Empty, _ => $"I{this.Environment.TargetSystemName}BLLFactoryContainer"); + protected virtual ICodeFileFactoryHeader ValidatorInterfaceFileFactoryHeader => + + new CodeFileFactoryHeader(FileType.ValidatorInterface, string.Empty, _ => $"I{this.Environment.TargetSystemName}Validator"); private Type DefaultBLLFactoryType => @@ -101,10 +103,10 @@ where this.Environment.MetadataProxyProvider.Wrap(domainType).HasAttribute> GetFileFactoryHeaders() => [ this.BLLContextInterfaceFileFactoryHeader, - this.BLLInterfaceFileFactoryHeader, this.BLLFactoryInterfaceFileFactoryHeader, - this.BLLFactoryContainerInterfaceFileFactoryHeader + this.BLLFactoryContainerInterfaceFileFactoryHeader, + this.ValidatorInterfaceFileFactoryHeader ]; public CodeExpression GetSecurityCodeExpression(SecurityRule securityRule) diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/BLLFactoryContainerInterfaceGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/BLLFactoryContainerInterfaceGeneratorConfiguration.cs index 5b2f594bd..cc4ec1f7e 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/BLLFactoryContainerInterfaceGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/BLLFactoryContainerInterfaceGeneratorConfiguration.cs @@ -1,8 +1,9 @@ using System.CodeDom; +using Anch.SecuritySystem; + using Framework.CodeDom.Extensions; using Framework.FileGeneration.Configuration; -using Anch.SecuritySystem; namespace Framework.CodeGeneration.BLLCoreGenerator.Configuration; @@ -35,3 +36,4 @@ public CodeExpression GetCreateSecurityBLLExpr(CodeExpression logicExpressionSou } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/IBLLCoreGenerationEnvironment.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/IBLLCoreGenerationEnvironment.cs index 7aba55eef..c31224a93 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/IBLLCoreGenerationEnvironment.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/IBLLCoreGenerationEnvironment.cs @@ -3,3 +3,4 @@ namespace Framework.CodeGeneration.BLLCoreGenerator.Configuration; public interface IBLLCoreGenerationEnvironment : ICodeGenerationEnvironment; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/IBLLCoreGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/IBLLCoreGeneratorConfiguration.cs index a9530eb7e..27fb440c6 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/IBLLCoreGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/IBLLCoreGeneratorConfiguration.cs @@ -1,8 +1,10 @@ using System.CodeDom; using System.Collections.ObjectModel; -using Framework.CodeGeneration.Configuration; + using Anch.SecuritySystem; +using Framework.CodeGeneration.Configuration; + namespace Framework.CodeGeneration.BLLCoreGenerator.Configuration; public interface IBLLCoreGeneratorConfiguration : IBLLCoreGeneratorConfiguration, ICodeGeneratorConfiguration @@ -53,6 +55,8 @@ public interface IBLLCoreGeneratorConfiguration : ICodeGeneratorConfiguration, I Type? IntegrationSaveModelType { get; } + bool GenerateValidation { get; } + /// /// Получает или возвращает флаг, указывающий на необходимость проверки уникальности путем запроса к БД. /// @@ -64,6 +68,8 @@ public interface IBLLCoreGeneratorConfiguration : ICodeGeneratorConfiguration, I string IntegrationSaveMethodName { get; } CodeExpression GetSecurityService(CodeExpression contextExpression); + CodeExpression GetSecurityCodeExpression(SecurityRule securityRule); } #pragma warning restore S100 // Methods and properties should be named in camel case + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/IBLLFactoryContainerInterfaceGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/IBLLFactoryContainerInterfaceGeneratorConfiguration.cs index 14c83becc..a80395662 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/IBLLFactoryContainerInterfaceGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/IBLLFactoryContainerInterfaceGeneratorConfiguration.cs @@ -6,3 +6,4 @@ public interface IBLLFactoryContainerInterfaceGeneratorConfiguration { CodeExpression GetCreateSecurityBLLExpr(CodeExpression logicExpressionSource, Type domainType, object securitySource); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/PropertyInfoExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/PropertyInfoExtensions.cs index d9fd7349c..370a5b5a5 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/PropertyInfoExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Configuration/PropertyInfoExtensions.cs @@ -16,3 +16,4 @@ public static class PropertyInfoExtensions _ => null }; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Extensions/TypeExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Extensions/TypeExtensions.cs index 56e7140f5..3caaa88d4 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Extensions/TypeExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/Extensions/TypeExtensions.cs @@ -57,3 +57,4 @@ internal static Dictionary GetInterfaceImplementationArgumentDict(th (genericArg, implArg) => (genericArg, implArg)).ToDictionary(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLContextInterfaceFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLContextInterfaceFileFactory.cs index 6b3853ae1..b89499a56 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLContextInterfaceFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLContextInterfaceFileFactory.cs @@ -35,11 +35,12 @@ protected override IEnumerable GetBaseTypes() protected override IEnumerable GetMembers() { yield return new CodeMemberProperty - { - Name = "Logics", - Attributes = MemberAttributes.New, - Type = this.Configuration.GetCodeTypeReference(null, FileType.BLLFactoryContainerInterface), - HasGet = true - }; + { + Name = "Logics", + Attributes = MemberAttributes.New, + Type = this.Configuration.GetCodeTypeReference(null, FileType.BLLFactoryContainerInterface), + HasGet = true + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLFactoryContainerInterfaceFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLFactoryContainerInterfaceFileFactory.cs index a2a375c37..bc79ae2c1 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLFactoryContainerInterfaceFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLFactoryContainerInterfaceFileFactory.cs @@ -1,4 +1,5 @@ using System.CodeDom; + using Framework.CodeGeneration.BLLCoreGenerator.Configuration; namespace Framework.CodeGeneration.BLLCoreGenerator.FileFactory; @@ -19,11 +20,12 @@ protected override IEnumerable GetMembers() foreach (var domainType in this.Configuration.BLLDomainTypes) { yield return new CodeMemberProperty - { - Name = domainType.Name + "Factory", - Type = this.Configuration.GetCodeTypeReference(domainType, FileType.BLLFactoryInterface), - HasGet = true - }; + { + Name = domainType.Name + "Factory", + Type = this.Configuration.GetCodeTypeReference(domainType, FileType.BLLFactoryInterface), + HasGet = true + }; } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLFactoryContainerInterfaceFileFactoryBase.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLFactoryContainerInterfaceFileFactoryBase.cs index 9753be42b..a531b83e9 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLFactoryContainerInterfaceFileFactoryBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLFactoryContainerInterfaceFileFactoryBase.cs @@ -1,4 +1,5 @@ using System.CodeDom; + using Framework.CodeGeneration.BLLCoreGenerator.Configuration; namespace Framework.CodeGeneration.BLLCoreGenerator.FileFactory; @@ -26,11 +27,12 @@ protected override IEnumerable GetMembers() foreach (var domainType in this.Configuration.BLLDomainTypes) { yield return new CodeMemberProperty - { - Name = domainType.Name, - Type = this.Configuration.GetCodeTypeReference(domainType, FileType.BLLInterface), - HasGet = true - }; + { + Name = domainType.Name, + Type = this.Configuration.GetCodeTypeReference(domainType, FileType.BLLInterface), + HasGet = true + }; } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLFactoryInterfaceFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLFactoryInterfaceFileFactory.cs index c2293f3af..ed994dbb4 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLFactoryInterfaceFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLFactoryInterfaceFileFactory.cs @@ -29,3 +29,4 @@ protected override IEnumerable GetBaseTypes() yield return typeof(ISecurityBLLFactory<,>).ToTypeReference(bllInterfaceTypeRef, this.DomainType.ToTypeReference()); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLInterfaceFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLInterfaceFileFactory.cs index 42456bbc2..3cfb52fad 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLInterfaceFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/BLLInterfaceFileFactory.cs @@ -1,6 +1,8 @@ using System.CodeDom; using Anch.Core; +using Anch.GenericQueryable.Fetching; +using Anch.OData.Domain; using Framework.BLL; using Framework.BLL.Domain.DirectMode; @@ -13,10 +15,6 @@ using Framework.FileGeneration.Configuration; using Framework.Projection; -using Anch.GenericQueryable.Fetching; - -using Anch.OData.Domain; - namespace Framework.CodeGeneration.BLLCoreGenerator.FileFactory; /// @@ -58,14 +56,14 @@ protected override IEnumerable GetMembers() createModelType.CheckDirectMode(DirectMode.Out, true); yield return new CodeMemberMethod - { - Name = this.DomainType.GetModelMethodName(createModelType, ModelRole.Create, false), - ReturnType = this.DomainType.ToTypeReference(), - Parameters = + { + Name = this.DomainType.GetModelMethodName(createModelType, ModelRole.Create, false), + ReturnType = this.DomainType.ToTypeReference(), + Parameters = { createModelType.ToTypeReference().ToParameterDeclarationExpression("createModel") } - }; + }; } } @@ -78,27 +76,27 @@ protected override IEnumerable GetMembers() if (directMode.HasFlag(DirectMode.Out)) { yield return new CodeMemberMethod - { - Name = "Get" + methodName, - ReturnType = changeModelType.ToTypeReference(), - Parameters = + { + Name = "Get" + methodName, + ReturnType = changeModelType.ToTypeReference(), + Parameters = { this.DomainType.ToTypeReference().ToParameterDeclarationExpression(this.DomainType.Name.ToStartLowerCase()) } - }; + }; } if (directMode.HasFlag(DirectMode.In)) { yield return new CodeMemberMethod - { - Name = methodName, - ReturnType = this.DomainType.ToTypeReference(), - Parameters = + { + Name = methodName, + ReturnType = this.DomainType.ToTypeReference(), + Parameters = { changeModelType.ToTypeReference().ToParameterDeclarationExpression("changeModel") } - }; + }; } } } @@ -112,27 +110,27 @@ protected override IEnumerable GetMembers() if (directMode.HasFlag(DirectMode.Out)) { yield return new CodeMemberMethod - { - Name = "Get" + methodName, - ReturnType = changeModelType.ToTypeReference(), - Parameters = + { + Name = "Get" + methodName, + ReturnType = changeModelType.ToTypeReference(), + Parameters = { typeof(List<>).MakeGenericType(this.DomainType).ToTypeReference().ToParameterDeclarationExpression(this.DomainType.Name.ToPluralize().ToStartLowerCase()) } - }; + }; } if (directMode.HasFlag(DirectMode.In)) { yield return new CodeMemberMethod - { - Name = methodName, - ReturnType = typeof(List<>).MakeGenericType(this.DomainType).ToTypeReference(), - Parameters = + { + Name = methodName, + ReturnType = typeof(List<>).MakeGenericType(this.DomainType).ToTypeReference(), + Parameters = { changeModelType.ToTypeReference().ToParameterDeclarationExpression("changeModel") } - }; + }; } } } @@ -143,15 +141,15 @@ protected override IEnumerable GetMembers() contextFilterModelType.CheckDirectMode(DirectMode.Out, true); yield return new CodeMemberMethod - { - Name = "GetListBy", - ReturnType = typeof(List<>).MakeGenericType(this.DomainType).ToTypeReference(), - Parameters = + { + Name = "GetListBy", + ReturnType = typeof(List<>).MakeGenericType(this.DomainType).ToTypeReference(), + Parameters = { contextFilterModelType.ToTypeReference().ToParameterDeclarationExpression("filter"), typeof(FetchRule<>).MakeGenericType(this.DomainType).ToTypeReference().ToParameterDeclarationExpression("fetchs") } - }; + }; } } @@ -163,15 +161,15 @@ protected override IEnumerable GetMembers() contextFilterModelType.CheckDirectMode(DirectMode.Out, true); yield return new CodeMemberMethod - { - Name = "GetListBy", - ReturnType = typeof(List<>).MakeGenericType(this.DomainType).ToTypeReference(), - Parameters = + { + Name = "GetListBy", + ReturnType = typeof(List<>).MakeGenericType(this.DomainType).ToTypeReference(), + Parameters = { contextFilterModelType.ToTypeReference().ToParameterDeclarationExpression("filter"), typeof(FetchRule<>).MakeGenericType(this.DomainType).ToTypeReference().ToParameterDeclarationExpression("fetchs") } - }; + }; } foreach (var contextFilterModelType in this.DomainType.GetProjectionFilters(ProjectionFilterTargets.Single)) @@ -179,15 +177,15 @@ protected override IEnumerable GetMembers() contextFilterModelType.CheckDirectMode(DirectMode.Out, true); yield return new CodeMemberMethod - { - Name = "GetObjectBy", - ReturnType = this.DomainType.ToTypeReference(), - Parameters = + { + Name = "GetObjectBy", + ReturnType = this.DomainType.ToTypeReference(), + Parameters = { contextFilterModelType.ToTypeReference().ToParameterDeclarationExpression("filter"), typeof(FetchRule<>).MakeGenericType(this.DomainType).ToTypeReference().ToParameterDeclarationExpression("fetchs") } - }; + }; } } @@ -197,16 +195,16 @@ protected override IEnumerable GetMembers() contextFilterModelType.CheckDirectMode(DirectMode.Out, true); yield return new CodeMemberMethod - { - Name = "GetObjectsByOData", - ReturnType = typeof(SelectOperationResult<>).MakeGenericType(this.DomainType).ToTypeReference(), - Parameters = + { + Name = "GetObjectsByOData", + ReturnType = typeof(SelectOperationResult<>).MakeGenericType(this.DomainType).ToTypeReference(), + Parameters = { typeof(SelectOperation<>).ToTypeReference(this.DomainType).ToParameterDeclarationExpression("selectOperation"), contextFilterModelType.ToTypeReference().ToParameterDeclarationExpression("filter"), typeof(FetchRule<>).MakeGenericType(this.DomainType).ToTypeReference().ToParameterDeclarationExpression("fetchs") } - }; + }; } } @@ -219,27 +217,27 @@ protected override IEnumerable GetMembers() if (directMode.HasFlag(DirectMode.Out)) { yield return new CodeMemberMethod - { - Name = "Get" + methodName, - ReturnType = extendedModelType.ToTypeReference(), - Parameters = + { + Name = "Get" + methodName, + ReturnType = extendedModelType.ToTypeReference(), + Parameters = { this.DomainType.ToTypeReference().ToParameterDeclarationExpression("extendedModel") } - }; + }; } if (directMode.HasFlag(DirectMode.In)) { yield return new CodeMemberMethod - { - Name = "Save" + methodName, - ReturnType = this.DomainType.ToTypeReference(), - Parameters = + { + Name = "Save" + methodName, + ReturnType = this.DomainType.ToTypeReference(), + Parameters = { extendedModelType.ToTypeReference().ToParameterDeclarationExpression("extendedModel") } - }; + }; } } } @@ -251,14 +249,14 @@ protected override IEnumerable GetMembers() formatModelType.CheckDirectMode(DirectMode.Out, true); yield return new CodeMemberMethod - { - Name = this.DomainType.GetModelMethodName(formatModelType, ModelRole.Format, false), - ReturnType = this.DomainType.ToTypeReference(), - Parameters = + { + Name = this.DomainType.GetModelMethodName(formatModelType, ModelRole.Format, false), + ReturnType = this.DomainType.ToTypeReference(), + Parameters = { formatModelType.ToTypeReference().ToParameterDeclarationExpression("formatModel") } - }; + }; } } @@ -268,14 +266,14 @@ protected override IEnumerable GetMembers() integrationModelType.CheckDirectMode(DirectMode.In, true); yield return new CodeMemberMethod - { - Name = this.Configuration.IntegrationSaveMethodName, - ReturnType = this.DomainType.ToTypeReference(), - Parameters = + { + Name = this.Configuration.IntegrationSaveMethodName, + ReturnType = this.DomainType.ToTypeReference(), + Parameters = { integrationModelType.ToTypeReference().ToParameterDeclarationExpression("integrationSaveModel") } - }; + }; } } @@ -284,16 +282,16 @@ protected override IEnumerable GetMembers() foreach (var filterModelType in this.DomainType.GetProjectionFilters(ProjectionFilterTargets.OData)) { yield return new CodeMemberMethod - { - Name = "GetObjectsByOData", - ReturnType = typeof(SelectOperationResult<>).MakeGenericType(this.DomainType).ToTypeReference(), - Parameters = + { + Name = "GetObjectsByOData", + ReturnType = typeof(SelectOperationResult<>).MakeGenericType(this.DomainType).ToTypeReference(), + Parameters = { typeof(SelectOperation<>).ToTypeReference(this.DomainType).ToParameterDeclarationExpression("selectOperation"), filterModelType.ToTypeReference().ToParameterDeclarationExpression("filter"), typeof(FetchRule<>).MakeGenericType(this.DomainType).ToTypeReference().ToParameterDeclarationExpression("fetchs") } - }; + }; } if (this.Configuration.Environment.IsHierarchical(this.DomainType.GetProjectionSourceTypeOrSelf())) @@ -301,18 +299,19 @@ protected override IEnumerable GetMembers() foreach (var filterModelType in this.DomainType.GetProjectionFilters(ProjectionFilterTargets.ODataTree)) { yield return new CodeMemberMethod - { - Name = "GetTreeByOData", - ReturnType = typeof(SelectOperationResult<>).MakeGenericType(typeof(HierarchicalNode<,>).MakeGenericType(this.DomainType, this.Configuration.Environment.GetIdentityType())).ToTypeReference(), - Parameters = + { + Name = "GetTreeByOData", + ReturnType = typeof(SelectOperationResult<>).MakeGenericType(typeof(HierarchicalNode<,>).MakeGenericType(this.DomainType, this.Configuration.Environment.GetIdentityType())).ToTypeReference(), + Parameters = { typeof(SelectOperation<>).ToTypeReference(this.DomainType).ToParameterDeclarationExpression("selectOperation"), filterModelType.ToTypeReference().ToParameterDeclarationExpression("filter"), typeof(FetchRule<>).MakeGenericType(this.DomainType).ToTypeReference().ToParameterDeclarationExpression("fetchs") } - }; + }; } } } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/FileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/FileFactory.cs index 3ed93dfbe..1a620ac9a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/FileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/FileFactory.cs @@ -5,3 +5,4 @@ namespace Framework.CodeGeneration.BLLCoreGenerator.FileFactory; public abstract class FileFactory(TConfiguration configuration, Type? domainType) : CodeFileFactory(configuration, domainType) where TConfiguration : class, IBLLCoreGeneratorConfiguration; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorInterfaceFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/ValidatorInterfaceFileFactory.cs similarity index 74% rename from src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorInterfaceFileFactory.cs rename to src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/ValidatorInterfaceFileFactory.cs index b99d4a582..2782f5aee 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorInterfaceFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileFactory/ValidatorInterfaceFileFactory.cs @@ -1,13 +1,13 @@ using System.CodeDom; using Framework.CodeDom.Extensions; -using Framework.CodeGeneration.BLLGenerator.Configuration; +using Framework.CodeGeneration.BLLCoreGenerator.Configuration; using Framework.Validation; -namespace Framework.CodeGeneration.BLLGenerator.FileFactory; +namespace Framework.CodeGeneration.BLLCoreGenerator.FileFactory; public class ValidatorInterfaceFileFactory(TConfiguration configuration) : FileFactory(configuration, null) - where TConfiguration : class, IBLLGeneratorConfiguration + where TConfiguration : class, IBLLCoreGeneratorConfiguration { public override FileType FileType => FileType.ValidatorInterface; @@ -22,3 +22,4 @@ protected override CodeTypeDeclaration GetCodeTypeDeclaration() => IsInterface = true }; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileType.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileType.cs index 9ad43cc1e..6a8aaf3ae 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileType.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileType.cs @@ -8,5 +8,7 @@ public enum FileType BLLFactoryInterface, - BLLFactoryContainerInterface + BLLFactoryContainerInterface, + + ValidatorInterface } diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileTypeExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileTypeExtensions.cs index 7b099d16f..6bc200e07 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileTypeExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLCoreGenerator/FileTypeExtensions.cs @@ -8,3 +8,4 @@ public static class FileTypeExtensions { public static ICodeFileFactoryHeader ToHeader(this FileType fileType, string? contextTypePrefix = null) => new CodeFileFactoryHeader(fileType, "", @domainType => contextTypePrefix + @domainType.Maybe(v => v.Name) + fileType); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/BLLFileGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/BLLFileGenerator.cs index f14ee394d..a67289fbd 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/BLLFileGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/BLLFileGenerator.cs @@ -30,7 +30,7 @@ protected override IEnumerable GetInternalFileGenerators() yield return new SecurityDomainBLLBaseFileFactory(this.Configuration); - if (this.Configuration.GenerateValidation) + if (this.Configuration.Environment.BLLCore.GenerateValidation) { yield return new ValidationMapBaseFileFactory(this.Configuration); yield return new ValidationMapFileFactory(this.Configuration); @@ -39,7 +39,7 @@ protected override IEnumerable GetInternalFileGenerators() yield return new ValidatorBaseFileFactory(this.Configuration); yield return new ValidatorFileFactory(this.Configuration); - yield return new ValidatorInterfaceFileFactory(this.Configuration); } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/BLLFactoryContainerGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/BLLFactoryContainerGeneratorConfiguration.cs index 87a03acd4..af30fda9a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/BLLFactoryContainerGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/BLLFactoryContainerGeneratorConfiguration.cs @@ -20,3 +20,4 @@ public IEnumerable GetFileFactories() } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/BLLGeneratorConfigurationBase.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/BLLGeneratorConfigurationBase.cs index a9bf6bd8e..214b1d32b 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/BLLGeneratorConfigurationBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/BLLGeneratorConfigurationBase.cs @@ -98,8 +98,6 @@ public virtual IValidatorGenerator GetValidatorGenerator(Type domainType, CodeEx return new DefaultValidatorGenerator>(this, domainType, validatorMapExpr); } - public virtual bool GenerateValidation { get; } = true; - public virtual Type OperationContextType { get; } = typeof(OperationContextBase); public virtual bool UseDbUniquenessEvaluation { get; } = false; @@ -145,10 +143,6 @@ public virtual bool GenerateBllConstructor(Type domainType) new CodeFileFactoryHeader(FileType.Validator, string.Empty, _ => $"{this.Environment.TargetSystemName}{FileType.Validator}"); - protected virtual ICodeFileFactoryHeader ValidatorInterfaceFileFactoryHeader => - - new CodeFileFactoryHeader(FileType.ValidatorInterface, string.Empty, _ => $"I{this.Environment.TargetSystemName}{FileType.Validator}"); - public CodeTypeReference SecurityDomainBLLBaseTypeReference => this.GetSecurityDomainBLLBaseTypeReference(null); public CodeTypeReference GetSecurityDomainBLLBaseTypeReference(Type? type) => this.GetCodeTypeReference(type, FileType.SecurityDomainBLLBase); @@ -162,7 +156,6 @@ protected override IEnumerable> GetFileFactoryH yield return this.ValidatorBaseFileFactoryHeader; yield return this.ValidatorFileFactoryHeader; - yield return this.ValidatorInterfaceFileFactoryHeader; yield return this.MainDTOFetchRuleExpanderBaseFileFactoryHeader; yield return this.MainDTOFetchRuleExpanderFileFactoryHeader; @@ -182,3 +175,4 @@ protected override IEnumerable> GetFileFactoryH yield return new CodeFileFactoryHeader(FileType.BLLFactoryContainer, "", _ => this.Environment.TargetSystemName + FileType.BLLFactoryContainer); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/DefaultValidatorGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/DefaultValidatorGenerator.cs index 7448b1d25..04d3082c7 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/DefaultValidatorGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/DefaultValidatorGenerator.cs @@ -4,14 +4,14 @@ using Anch.Core; using Framework.Application.Domain; -using Framework.Core; -using Framework.Restriction; -using Framework.Validation; using Framework.BLL.Validation; using Framework.CodeDom.Extend; using Framework.CodeDom.Extensions; -using Framework.Tracking.Validation; +using Framework.Core; using Framework.FileGeneration.Configuration; +using Framework.Restriction; +using Framework.Tracking.Validation; +using Framework.Validation; using Framework.Validation.Attributes; using Framework.Validation.Attributes.Available; using Framework.Validation.Attributes.Available.Range; @@ -20,8 +20,8 @@ using Framework.Validation.Validators.Deep; using Framework.Validation.Validators.DynamicClass.Available.Base; -using ValidatorPairExpr = System.Collections.Generic.KeyValuePair; using ValidatorExpr = System.Collections.Generic.IReadOnlyDictionary; +using ValidatorPairExpr = System.Collections.Generic.KeyValuePair; namespace Framework.CodeGeneration.BLLGenerator.Configuration; @@ -86,10 +86,10 @@ protected virtual IEnumerable GetClassValidators() var attributes = this.DomainType .TryGetRestrictionValidatorAttribute(attr => new UniDBGroupValidatorAttribute - { - GroupKey = attr.Key, - UseDbEvaluation = attr.UseDbEvaluation - }) + { + GroupKey = attr.Key, + UseDbEvaluation = attr.UseDbEvaluation + }) .Where(attr => attr.UseDbEvaluation || this.Configuration.UseDbUniquenessEvaluation); foreach (var attr in attributes) @@ -166,18 +166,18 @@ protected virtual CodeExpression ExpandPropertyAttributes(PropertyInfo property, return this.GetFixedPropertyValidator(property, fixedPropertyValidatorAttribute); default: - { - var autoExpr = this.TryAutoExpandPropertyAttributes(property, attribute); - - if (autoExpr != null) - { - return autoExpr; - } - else { - throw new ArgumentOutOfRangeException(nameof(attribute)); + var autoExpr = this.TryAutoExpandPropertyAttributes(property, attribute); + + if (autoExpr != null) + { + return autoExpr; + } + else + { + throw new ArgumentOutOfRangeException(nameof(attribute)); + } } - } } } @@ -366,9 +366,9 @@ private CodeExpression GetUniqueCollectionValidator(PropertyInfo property, Uniqu var createTupleExpr = new CodeParameterDeclarationExpression { Name = "source" } .Pipe(param => new CodeLambdaExpression - { - Parameters = { param }, - Statements = + { + Parameters = { param }, + Statements = { groupElementType.ToTypeReference().ToObjectCreateExpression( @@ -384,7 +384,7 @@ private CodeExpression GetUniqueCollectionValidator(PropertyInfo property, Uniqu ).ToMethodReturnStatement() } - }); + }); return internalPropertyValidatorType .ToTypeReference() @@ -517,16 +517,16 @@ private CodeExpression GetRequiredGroupValidator(RequiredGroupValidatorAttribute var propertyValidatorDict = uniProperties.ToDictionary( property => property.Name, property => new CodeLambdaExpression - { - Parameters = { sourceParam }, - Statements = + { + Parameters = { sourceParam }, + Statements = { typeof(RequiredHelper).ToTypeReferenceExpression().ToMethodInvokeExpression( "IsValid", sourceParam.ToVariableReferenceExpression().ToPropertyReference(property), RequiredMode.Default.ToPrimitiveExpression()) } - }); + }); @@ -619,3 +619,4 @@ protected virtual IReadOnlyDictionary ConvertClass } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/GeneratorConfigurationExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/GeneratorConfigurationExtensions.cs index d548febde..323a8e734 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/GeneratorConfigurationExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/GeneratorConfigurationExtensions.cs @@ -23,11 +23,11 @@ public static CodeTypeDeclaration GetBLLContextContainerCodeTypeDeclaration( var contextParameterRefExpr = contextParameter.ToVariableReferenceExpression(); return new CodeTypeDeclaration - { - Name = typeName, - TypeAttributes = asAbstract ? (TypeAttributes.Public | TypeAttributes.Abstract) : TypeAttributes.Public, - IsPartial = true, - Members = + { + Name = typeName, + TypeAttributes = asAbstract ? (TypeAttributes.Public | TypeAttributes.Abstract) : TypeAttributes.Public, + IsPartial = true, + Members = { new CodeConstructor { @@ -36,7 +36,8 @@ public static CodeTypeDeclaration GetBLLContextContainerCodeTypeDeclaration( BaseConstructorArgs = { contextParameterRefExpr } } }, - BaseTypes = { containerType ?? typeof(BLLContextContainer<>).ToTypeReference(bllContextInterfaceTypeReference) } - }; + BaseTypes = { containerType ?? typeof(BLLContextContainer<>).ToTypeReference(bllContextInterfaceTypeReference) } + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/IBLLGenerationEnvironment.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/IBLLGenerationEnvironment.cs index b3c24de2a..cb8702839 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/IBLLGenerationEnvironment.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/IBLLGenerationEnvironment.cs @@ -4,3 +4,4 @@ namespace Framework.CodeGeneration.BLLGenerator.Configuration; public interface IBLLGenerationEnvironment : ICodeGenerationEnvironment, IBLLCoreGeneratorConfigurationContainer; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/IBLLGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/IBLLGeneratorConfiguration.cs index 8991a813a..ef2942e94 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/IBLLGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/IBLLGeneratorConfiguration.cs @@ -41,8 +41,6 @@ public interface IBLLGeneratorConfiguration : ICodeGeneratorConfiguration, ICode IValidatorGenerator GetValidatorGenerator(Type domainType, CodeExpression validatorMapExpr); - bool GenerateValidation { get; } - CodeTypeReference SecurityDomainBLLBaseTypeReference { get; } IFetchPathFactory FetchPathFactory { get; } @@ -69,3 +67,4 @@ public interface IBLLGeneratorConfiguration : ICodeGeneratorConfiguration, ICode /// bool SquashPropertyValidators(PropertyInfo property); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/IValidatorGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/IValidatorGenerator.cs index 3c04442b6..3f0256f12 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/IValidatorGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Configuration/IValidatorGenerator.cs @@ -1,5 +1,4 @@ using System.Reflection; - using ValidatorExpr = System.Collections.Generic.IReadOnlyDictionary; namespace Framework.CodeGeneration.BLLGenerator.Configuration; @@ -10,3 +9,4 @@ public interface IValidatorGenerator IReadOnlyDictionary PropertyValidators { get; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/DTOFetchPathFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/DTOFetchPathFactory.cs index 55fa7a7f8..02b65e59e 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/DTOFetchPathFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/DTOFetchPathFactory.cs @@ -2,6 +2,7 @@ using System.Reflection; using Anch.Core; + using Framework.BLL.Domain.DTO; using Framework.BLL.Domain.DTO.Extensions; using Framework.BLL.Domain.Extensions; @@ -243,3 +244,4 @@ group pair.Value by pair.Key into propGroup } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/ExpandFetchPathFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/ExpandFetchPathFactory.cs index bc3b2dd7d..0c77df714 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/ExpandFetchPathFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/ExpandFetchPathFactory.cs @@ -1,4 +1,5 @@ using System.Reflection; + using Framework.BLL.Domain.Fetching; using Framework.BLL.Domain.Persistent.Attributes; using Framework.BLL.Extensions; @@ -91,3 +92,4 @@ private PropertyLoadNode ToLoadNode(Type domainType, PropertyPath propertyPath) } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/FetchPathFactoryExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/FetchPathFactoryExtensions.cs index 6c5bf7d99..f00f4a338 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/FetchPathFactoryExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/FetchPathFactoryExtensions.cs @@ -14,3 +14,4 @@ public static IFetchPathFactory WithCompress(this IFetchPathFa private class FuncFetchPathFactory(Func> createFunc) : FuncFactory>(createFunc), IFetchPathFactory; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/FetchPropertyInfoExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/FetchPropertyInfoExtensions.cs index b0e158dd0..3736af18e 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/FetchPropertyInfoExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/FetchPropertyInfoExtensions.cs @@ -1,4 +1,5 @@ using System.Reflection; + using Framework.BLL.Domain.DTO; using Framework.BLL.Domain.DTO.Extensions; using Framework.Core; @@ -36,3 +37,4 @@ public static bool IsNotMaster(this PropertyInfo property) .Any(prop => prop != property && prop.PropertyType == propertyType && prop.IsMaster()); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/IFetchPathFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/IFetchPathFactory.cs index f07db150b..013f2eda3 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/IFetchPathFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/Fetching/IFetchPathFactory.cs @@ -6,3 +6,4 @@ public interface IFetchPathFactory { IEnumerable Create(Type startDomainType, T rule); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLContextFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLContextFileFactory.cs index 88d8695be..f3c9f71fe 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLContextFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLContextFileFactory.cs @@ -37,20 +37,21 @@ protected override IEnumerable GetMembers() { var pairs = new[] { this.Configuration.Environment.BLLCore.DefaultBLLFactoryContainerType, this.Configuration.Environment.BLLCore.SecurityBLLFactoryContainerType } .Select(z => new - { - BLLFactoryContextType = z, - ContainerContextType = typeof(IBLLFactoryContainerContext<>).MakeGenericType(z) - }); + { + BLLFactoryContextType = z, + ContainerContextType = typeof(IBLLFactoryContainerContext<>).MakeGenericType(z) + }); foreach (var pair in pairs) { yield return new CodeMemberProperty - { - Name = "Logics", - PrivateImplementationType = pair.ContainerContextType.ToTypeReference(), - Type = pair.BLLFactoryContextType.ToTypeReference(), - GetStatements = { new CodeThisReferenceExpression().ToPropertyReference("Logics").ToMethodReturnStatement() } - }; + { + Name = "Logics", + PrivateImplementationType = pair.ContainerContextType.ToTypeReference(), + Type = pair.BLLFactoryContextType.ToTypeReference(), + GetStatements = { new CodeThisReferenceExpression().ToPropertyReference("Logics").ToMethodReturnStatement() } + }; } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFactoryContainerFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFactoryContainerFileFactory.cs index 6b99e6fd2..d87111154 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFactoryContainerFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFactoryContainerFileFactory.cs @@ -33,15 +33,15 @@ protected override IEnumerable GetMembers() bllFactoryInterfaceTypeRef); var factoryProperty = new CodeMemberProperty - { - Attributes = MemberAttributes.Public | MemberAttributes.Final, - Name = domainType.Name + "Factory", - Type = bllFactoryInterfaceTypeRef, - GetStatements = + { + Attributes = MemberAttributes.Public | MemberAttributes.Final, + Name = domainType.Name + "Factory", + Type = bllFactoryInterfaceTypeRef, + GetStatements = { contextFieldRefExpr.ToPropertyReference("ServiceProvider").ToStaticMethodInvokeExpression(getRequiredServiceMethod).ToMethodReturnStatement() } - }; + }; var factoryPropertyRefExpr = new CodeThisReferenceExpression().ToPropertyReference(factoryProperty); @@ -55,16 +55,16 @@ protected override IEnumerable GetMembers() yield return defaultBLLFieldMember; yield return new CodeMemberProperty - { - Attributes = MemberAttributes.Public | MemberAttributes.Final, - Name = domainType.Name, - Type = bllTypeRef, - GetStatements = + { + Attributes = MemberAttributes.Public | MemberAttributes.Final, + Name = domainType.Name, + Type = bllTypeRef, + GetStatements = { new CodeThisReferenceExpression().ToFieldReference(defaultBLLFieldMember) .ToMethodReturnStatementWithLazyInitialize(factoryPropertyRefExpr.ToMethodInvokeExpression("Create")) } - }; + }; } foreach (var member in this.GetGenericFactoryMembers(contextFieldRefExpr)) @@ -93,16 +93,16 @@ private IEnumerable GetGenericFactoryMembers(CodeExpression cont yield return bllFactoryField; yield return new CodeMemberProperty - { - Attributes = MemberAttributes.Public | MemberAttributes.Final, - Type = pair.Type.ToTypeReference(), - Name = pair.FileType.ToString().SkipLast("BLLFactory", true), - GetStatements = + { + Attributes = MemberAttributes.Public | MemberAttributes.Final, + Type = pair.Type.ToTypeReference(), + Name = pair.FileType.ToString().SkipLast("BLLFactory", true), + GetStatements = { new CodeThisReferenceExpression().ToFieldReference(bllFactoryField) .ToMethodReturnStatementWithLazyInitialize(bllTypeRef.ToObjectCreateExpression(contextFieldRefExpr)) } - }; + }; } } @@ -119,11 +119,11 @@ from statement in this.GetRegisterBLLStatements(serviceCollectionParameter, doma select statement; return new CodeMemberMethod - { - Name = methodName, - Attributes = MemberAttributes.Public | MemberAttributes.Static, - Parameters = { serviceCollectionParameter }, - }.WithStatements(addScopedStatements); + { + Name = methodName, + Attributes = MemberAttributes.Public | MemberAttributes.Static, + Parameters = { serviceCollectionParameter }, + }.WithStatements(addScopedStatements); } @@ -156,3 +156,4 @@ private IEnumerable GetRegisterBLLStatements(CodeParame yield return serviceCollectionParameter.ToVariableReferenceExpression().ToStaticMethodInvokeExpression(addScopedFromMethod).ToExpressionStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFactoryContainerFileFactoryBase.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFactoryContainerFileFactoryBase.cs index 29e4f401b..891264ce4 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFactoryContainerFileFactoryBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFactoryContainerFileFactoryBase.cs @@ -15,3 +15,4 @@ protected override IEnumerable GetBaseTypes() yield return this.Configuration.Environment.BLLCore.GetCodeTypeReference(null, BLLCoreGenerator.FileType.BLLFactoryContainerInterface); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFactoryFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFactoryFileFactory.cs index 63bbf0334..c0d2cef64 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFactoryFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFactoryFileFactory.cs @@ -28,3 +28,4 @@ protected override IEnumerable GetBaseTypes() yield return this.BLLFactoryInterfaceRef; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFileFactory.cs index 10b932dd8..0681e9bc7 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BLLFileFactory.cs @@ -1,10 +1,10 @@ using System.CodeDom; +using Anch.SecuritySystem.Providers; + using Framework.CodeDom.Extensions; using Framework.CodeGeneration.BLLGenerator.Configuration; -using Anch.SecuritySystem.Providers; - namespace Framework.CodeGeneration.BLLGenerator.FileFactory; public class BLLFileFactory(TConfiguration configuration, Type domainType) : FileFactory(configuration, domainType) @@ -19,47 +19,47 @@ protected override CodeTypeDeclaration GetCodeTypeDeclaration() .ToTypeReference(this.DomainType!.ToTypeReference()); var codeTypeDeclaration = new CodeTypeDeclaration - { - Name = this.Name, + { + Name = this.Name, - Attributes = MemberAttributes.Public, - IsPartial = true, + Attributes = MemberAttributes.Public, + IsPartial = true, - BaseTypes = + BaseTypes = { baseBLLType, this.Configuration.Environment.BLLCore.GetCodeTypeReference(this.DomainType, BLLCoreGenerator.FileType.BLLInterface) } - }; + }; { if (this.Configuration.GenerateBllConstructor(this.DomainType)) { var contextParameter = new CodeParameterDeclarationExpression - { - Type = this.Configuration.BLLContextTypeReference, - Name = "context" - }; + { + Type = this.Configuration.BLLContextTypeReference, + Name = "context" + }; var contextParameterExpr = contextParameter.ToVariableReferenceExpression(); var securityProviderParameterTypeRef = typeof(ISecurityProvider<>).ToTypeReference(this.DomainType.ToTypeReference()); var securityProviderParameter = securityProviderParameterTypeRef.ToParameterDeclarationExpression("securityProvider"); var securityOperationConstructor = new CodeConstructor - { - Attributes = MemberAttributes.Public, - Parameters = + { + Attributes = MemberAttributes.Public, + Parameters = { contextParameter, securityProviderParameter }, - BaseConstructorArgs = + BaseConstructorArgs = { contextParameterExpr, securityProviderParameter.ToVariableReferenceExpression() } - }; + }; codeTypeDeclaration.Members.Add(securityOperationConstructor); } @@ -68,3 +68,4 @@ protected override CodeTypeDeclaration GetCodeTypeDeclaration() return codeTypeDeclaration; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BaseCodeDomHelper.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BaseCodeDomHelper.cs index ee9430411..2632c7662 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BaseCodeDomHelper.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/BaseCodeDomHelper.cs @@ -1,10 +1,11 @@ using System.CodeDom; + +using Anch.SecuritySystem.Providers; + using Framework.CodeDom.Extensions; using Framework.CodeGeneration.BLLGenerator.Configuration; using Framework.Core; -using Anch.SecuritySystem.Providers; - namespace Framework.CodeGeneration.BLLGenerator.FileFactory; internal static class BaseCodeDomHelper @@ -44,13 +45,14 @@ public CodeTypeParameter GetSecurityModeCodeTypeParameter() if (fileFactory == null) throw new ArgumentNullException(nameof(fileFactory)); return new CodeTypeParameter - { - Name = "TSecurityMode", - Constraints = + { + Name = "TSecurityMode", + Constraints = { new CodeTypeReference(" struct") } - }; + }; } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/DefaultBLLFactoryFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/DefaultBLLFactoryFileFactory.cs index 2cba4806a..eecc4b202 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/DefaultBLLFactoryFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/DefaultBLLFactoryFileFactory.cs @@ -1,12 +1,12 @@ using System.CodeDom; +using Anch.SecuritySystem.Providers; + using Framework.BLL; using Framework.CodeDom.Extensions; using Framework.CodeGeneration.BLLGenerator.Configuration; using Framework.FileGeneration.Configuration; -using Anch.SecuritySystem.Providers; - namespace Framework.CodeGeneration.BLLGenerator.FileFactory; public class DefaultBLLFactoryFileFactory(TConfiguration configuration) : FileFactory(configuration, null) @@ -44,13 +44,13 @@ protected override CodeTypeDeclaration GetCodeTypeDeclaration() var implMethod = new CodeMemberMethod - { - Attributes = MemberAttributes.Public | MemberAttributes.Override, - ReturnType = typeof(IDefaultSecurityDomainBLLBase<,,>).ToTypeReference(this.Configuration.Environment.PersistentDomainObjectBaseType.ToTypeReference(), genericDomainObjectParameterTypeRef, this.Configuration.Environment.GetIdentityType().ToTypeReference()), - Name = "Create", - Parameters = { parameter }, - TypeParameters = { genericDomainObjectParameter }, - Statements = + { + Attributes = MemberAttributes.Public | MemberAttributes.Override, + ReturnType = typeof(IDefaultSecurityDomainBLLBase<,,>).ToTypeReference(this.Configuration.Environment.PersistentDomainObjectBaseType.ToTypeReference(), genericDomainObjectParameterTypeRef, this.Configuration.Environment.GetIdentityType().ToTypeReference()), + Name = "Create", + Parameters = { parameter }, + TypeParameters = { genericDomainObjectParameter }, + Statements = { this.Configuration .SecurityDomainBLLBaseTypeReference @@ -58,16 +58,16 @@ protected override CodeTypeDeclaration GetCodeTypeDeclaration() .ToObjectCreateExpression(contextFieldRefExpr, parameter.ToVariableReferenceExpression()) .ToMethodReturnStatement() } - }; + }; return new CodeTypeDeclaration - { - Name = this.Name, + { + Name = this.Name, - Attributes = MemberAttributes.Public, - IsPartial = true, - Members = + Attributes = MemberAttributes.Public, + IsPartial = true, + Members = { new CodeConstructor { @@ -81,8 +81,8 @@ protected override CodeTypeDeclaration GetCodeTypeDeclaration() ////GetCreateBySecurityProviderMethod(), ////GetCreateBLLSecurityModeMethod() }, - BaseTypes = { baseTypeRef, interfaceBase } - }; + BaseTypes = { baseTypeRef, interfaceBase } + }; } ////private CodeTypeMember GetCreateBySecurityProviderMethod() @@ -171,3 +171,4 @@ protected override CodeTypeDeclaration GetCodeTypeDeclaration() ////} } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/FileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/FileFactory.cs index 9b1a82d84..c32d5f47a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/FileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/FileFactory.cs @@ -6,3 +6,4 @@ namespace Framework.CodeGeneration.BLLGenerator.FileFactory; public abstract class FileFactory(TConfiguration configuration, Type? domainType) : CodeFileFactory(configuration, domainType) where TConfiguration : class, IBLLGeneratorConfiguration; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ImplementedBLLFactoryFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ImplementedBLLFactoryFileFactory.cs index b1e00c784..b389bcd9a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ImplementedBLLFactoryFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ImplementedBLLFactoryFileFactory.cs @@ -1,12 +1,12 @@ using System.CodeDom; +using Anch.SecuritySystem.Providers; + using Framework.BLL; using Framework.CodeDom.Extensions; using Framework.CodeGeneration.BLLGenerator.Configuration; using Framework.FileGeneration.Configuration; -using Anch.SecuritySystem.Providers; - namespace Framework.CodeGeneration.BLLGenerator.FileFactory; public class ImplementedBLLFactoryFileFactory(TConfiguration configuration) : FileFactory(configuration, null) @@ -32,12 +32,12 @@ protected override CodeTypeDeclaration GetCodeTypeDeclaration() this.Configuration.Environment.GetIdentityType().ToTypeReference()); return new CodeTypeDeclaration - { - Name = this.Name, + { + Name = this.Name, - Attributes = MemberAttributes.Public, - IsPartial = true, - Members = + Attributes = MemberAttributes.Public, + IsPartial = true, + Members = { new CodeConstructor { @@ -49,8 +49,8 @@ protected override CodeTypeDeclaration GetCodeTypeDeclaration() this.GetCreateMethod(), }, - BaseTypes = { baseTypeRef, interfaceBase } - }; + BaseTypes = { baseTypeRef, interfaceBase } + }; } private CodeTypeMember GetCreateMethod() @@ -68,16 +68,17 @@ private CodeTypeMember GetCreateMethod() var parameter = typeof(ISecurityProvider<>).ToTypeReference(genericDomainTypeRefExpr).ToParameterDeclarationExpression("securityProvider"); return new CodeMemberMethod - { - Name = methodName, - Attributes = MemberAttributes.Family | MemberAttributes.Override, - ReturnType = resultType, - Parameters = { parameter }, - Statements = + { + Name = methodName, + Attributes = MemberAttributes.Family | MemberAttributes.Override, + ReturnType = resultType, + Parameters = { parameter }, + Statements = { this.Configuration.SecurityDomainBLLBaseTypeReference.ToTypeReference(genericDomainTypeRefExpr).ToObjectCreateExpression(contextFieldRefExpr, parameter.ToVariableReferenceExpression()).ToMethodReturnStatement() }, - TypeParameters = { genericDomainTypeRef } - }; + TypeParameters = { genericDomainTypeRef } + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/MainDTOFetchRuleExpanderBaseFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/MainDTOFetchRuleExpanderBaseFileFactory.cs index 1753415cb..5d8aa3d02 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/MainDTOFetchRuleExpanderBaseFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/MainDTOFetchRuleExpanderBaseFileFactory.cs @@ -1,6 +1,8 @@ using System.CodeDom; using System.Reflection; +using Anch.GenericQueryable.Fetching; + using Framework.BLL; using Framework.BLL.Domain.DTO; using Framework.CodeDom; @@ -9,11 +11,8 @@ using Framework.CodeGeneration.BLLGenerator.Configuration; using Framework.Core; using Framework.Core.Helpers; - using Framework.Projection; -using Anch.GenericQueryable.Fetching; - namespace Framework.CodeGeneration.BLLGenerator.FileFactory; public class MainDTOFetchRuleExpanderBaseFileFactory(TConfiguration configuration) : FileFactory(configuration, null) @@ -74,14 +73,14 @@ private CodeMemberMethod GetGetContainerMethod() select Tuple.Create((CodeExpression)condition, (CodeStatement)statement); return new CodeMemberMethod - { - Attributes = MemberAttributes.Family | MemberAttributes.Override, - Name = "TryExpand", - ReturnType = typeof(PropertyFetchRule<>).ToTypeReference(domainObjectTypeRef), - TypeParameters = { domainObjectParameter }, - Parameters = { dtoTypeParameter }, - Statements = { statementsRequest.ToSwitchExpressionStatement(new CodePrimitiveExpression(null).ToMethodReturnStatement()) } - }; + { + Attributes = MemberAttributes.Family | MemberAttributes.Override, + Name = "TryExpand", + ReturnType = typeof(PropertyFetchRule<>).ToTypeReference(domainObjectTypeRef), + TypeParameters = { domainObjectParameter }, + Parameters = { dtoTypeParameter }, + Statements = { statementsRequest.ToSwitchExpressionStatement(new CodePrimitiveExpression(null).ToMethodReturnStatement()) } + }; } @@ -106,12 +105,12 @@ orderby dtoType select Tuple.Create((CodeExpression)condition, (CodeStatement)statement); return new CodeMemberMethod - { - Attributes = MemberAttributes.Family, - Name = $"TryGet{domainType.Name}FetchRule", - ReturnType = typeof(PropertyFetchRule<>).ToTypeReference(domainType), - Parameters = { dtoTypeParameter }, - Statements = { statementsRequest.ToSwitchExpressionStatement(new CodePrimitiveExpression(null).ToMethodReturnStatement()) } + { + Attributes = MemberAttributes.Family, + Name = $"TryGet{domainType.Name}FetchRule", + ReturnType = typeof(PropertyFetchRule<>).ToTypeReference(domainType), + Parameters = { dtoTypeParameter }, + Statements = { statementsRequest.ToSwitchExpressionStatement(new CodePrimitiveExpression(null).ToMethodReturnStatement()) } }; } @@ -152,8 +151,10 @@ private static CodeExpression AddFetch(CodeExpression startState, PropertyPath p .ToMethodInvokeExpression( new CodeLambdaExpression { - Parameters = { lambdaParam }, Statements = { lambdaParamExpr.ToPropertyReference(propInfo.prop).ToMethodReturnStatement() } + Parameters = { lambdaParam }, + Statements = { lambdaParamExpr.ToPropertyReference(propInfo.prop).ToMethodReturnStatement() } }); }); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/MainDTOFetchRuleExpanderFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/MainDTOFetchRuleExpanderFileFactory.cs index f82965eba..6553e5379 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/MainDTOFetchRuleExpanderFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/MainDTOFetchRuleExpanderFileFactory.cs @@ -22,3 +22,4 @@ protected override IEnumerable GetBaseTypes() yield return this.Configuration.GetCodeTypeReference(this.DomainType, FileType.MainDTOFetchRuleExpanderBase); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/SecurityDomainBLLBaseFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/SecurityDomainBLLBaseFileFactory.cs index c3f225cc7..c07f7174a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/SecurityDomainBLLBaseFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/SecurityDomainBLLBaseFileFactory.cs @@ -1,5 +1,6 @@ using System.CodeDom; using System.Reflection; + using Framework.BLL; using Framework.CodeDom.Extensions; using Framework.CodeGeneration.BLLGenerator.Configuration; @@ -25,24 +26,24 @@ protected override CodeTypeDeclaration GetCodeTypeDeclaration() var securityProviderParameterRefExpr = securityProviderParameter.ToVariableReferenceExpression(); return new CodeTypeDeclaration - { - TypeParameters = + { + TypeParameters = { genericDomainObjectParameter }, - TypeAttributes = TypeAttributes.Public, - Name = this.Name, - IsClass = true, - IsPartial = true, - BaseTypes = + TypeAttributes = TypeAttributes.Public, + Name = this.Name, + IsClass = true, + IsPartial = true, + BaseTypes = { typeof(DefaultSecurityDomainBLLBase<,,,>).ToTypeReference(this.Configuration.Environment.BLLCore.BLLContextInterfaceTypeReference, this.Configuration.Environment.PersistentDomainObjectBaseType.ToTypeReference(), genericDomainObjectParameterTypeRef, this.Configuration.Environment.GetIdentityType().ToTypeReference()) }, - Members = + Members = { new CodeConstructor { @@ -51,6 +52,7 @@ protected override CodeTypeDeclaration GetCodeTypeDeclaration() BaseConstructorArgs = { contextParameterRefExpr, securityProviderParameterRefExpr } } } - }; + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidationMapBaseFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidationMapBaseFileFactory.cs index bbc609142..2a7c41ab7 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidationMapBaseFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidationMapBaseFileFactory.cs @@ -52,12 +52,12 @@ protected override IEnumerable GetMembers() var extendedValidationDataParam = typeof(IServiceProvider).ToTypeReference().ToParameterDeclarationExpression("serviceProvider"); yield return new CodeConstructor - { - Attributes = MemberAttributes.Family, - Parameters = { extendedValidationDataParam }, - BaseConstructorArgs = { extendedValidationDataParam.ToVariableReferenceExpression() }, - Statements = { typeof(ValidationMap).ToTypeReference().ToObjectCreateExpression(extendedValidationDataParam.ToVariableReferenceExpression()).ToAssignStatement(new CodeThisReferenceExpression().ToFieldReference(defaultValidatorMapField)) } - }; + { + Attributes = MemberAttributes.Family, + Parameters = { extendedValidationDataParam }, + BaseConstructorArgs = { extendedValidationDataParam.ToVariableReferenceExpression() }, + Statements = { typeof(ValidationMap).ToTypeReference().ToObjectCreateExpression(extendedValidationDataParam.ToVariableReferenceExpression()).ToAssignStatement(new CodeThisReferenceExpression().ToFieldReference(defaultValidatorMapField)) } + }; } if (this.Configuration.GenerateExternalClassValidators) @@ -75,11 +75,11 @@ protected override IEnumerable GetMembers() var domainTypeValidatorGenerator = this.Configuration.GetValidatorGenerator(domainType, new CodeThisReferenceExpression()); var getMethod = new CodeMemberMethod - { - Attributes = MemberAttributes.Family, - Name = $"Get{domainType.Name}ValidationMap", - ReturnType = typeof(IClassValidationMap<>).ToTypeReference(domainType) - }; + { + Attributes = MemberAttributes.Family, + Name = $"Get{domainType.Name}ValidationMap", + ReturnType = typeof(IClassValidationMap<>).ToTypeReference(domainType) + }; if (this.IsEmptyClassMap(domainType, domainTypeValidatorGenerator)) { @@ -147,14 +147,14 @@ private CodeMemberMethod GetInternalClassMapMethod(CodeMemberField defaultValida select Tuple.Create((CodeExpression)condition, (CodeStatement)statement); return new CodeMemberMethod - { + { #pragma warning disable S3265 // Non-flags enums should not be used in bitwise operations - Attributes = MemberAttributes.Family | MemberAttributes.Override, + Attributes = MemberAttributes.Family | MemberAttributes.Override, #pragma warning restore S3265 // Non-flags enums should not be used in bitwise operations - Name = "GetInternalClassMap", - ReturnType = typeof(IClassValidationMap<>).ToTypeReference(sourceTypeRef), - TypeParameters = { sourceParameter }, - Statements = + Name = "GetInternalClassMap", + ReturnType = typeof(IClassValidationMap<>).ToTypeReference(sourceTypeRef), + TypeParameters = { sourceParameter }, + Statements = { statementsRequest.ToSwitchExpressionStatement( @@ -162,7 +162,7 @@ private CodeMemberMethod GetInternalClassMapMethod(CodeMemberField defaultValida .ToStaticMethodInvokeExpression(typeof(ValidationMapExtensions).ToTypeReferenceExpression().ToMethodReferenceExpression("GetClassMap", sourceParameter.ToTypeReference())) .ToMethodReturnStatement()) } - }; + }; } @@ -173,16 +173,16 @@ private CodeMemberMethod GetExternalClassValidatorsMethod() var classValidatorType = typeof(IClassValidator<>).ToTypeReference(sourceParameter.ToTypeReference()); return new CodeMemberMethod - { - Attributes = MemberAttributes.Family, - Name = this.ExternalClassValidatorsMethodName, - ReturnType = classValidatorType.ToEnumerableReference(), - TypeParameters = { sourceParameter }, - Statements = + { + Attributes = MemberAttributes.Family, + Name = this.ExternalClassValidatorsMethodName, + ReturnType = classValidatorType.ToEnumerableReference(), + TypeParameters = { sourceParameter }, + Statements = { new CodeMethodYieldBreakStatement() } - }; + }; } private CodeMemberMethod GetExternalPropertyValidatorsMethod() @@ -197,17 +197,17 @@ private CodeMemberMethod GetExternalPropertyValidatorsMethod() var propertyValidatorType = typeof(IPropertyValidator<,>).ToTypeReference(sourceParameter.ToTypeReference(), propertyParameter.ToTypeReference()); return new CodeMemberMethod - { - Attributes = MemberAttributes.Family, - Name = this.ExternalPropertyValidatorsMethodName, - ReturnType = propertyValidatorType.ToEnumerableReference(), - TypeParameters = { sourceParameter, propertyParameter }, - Parameters = { expressionParam }, - Statements = + { + Attributes = MemberAttributes.Family, + Name = this.ExternalPropertyValidatorsMethodName, + ReturnType = propertyValidatorType.ToEnumerableReference(), + TypeParameters = { sourceParameter, propertyParameter }, + Parameters = { expressionParam }, + Statements = { new CodeMethodYieldBreakStatement() } - }; + }; } private CodeMemberMethod GetClassPropertiesMethod(Type domainType, IValidatorGenerator validatorGenerator) @@ -242,12 +242,12 @@ select validatorType.ToTypeReference().ToObjectCreateExpression( new CodeThisReferenceExpression().ToMethodReferenceExpression("GetClassMap", (collectionElementType ?? property.PropertyType).ToTypeReference()).ToMethodInvokeExpression(true.ToPrimitiveExpression())); return new CodeMemberMethod - { - Attributes = MemberAttributes.Family, - Name = $"Get{domainType.Name}Properties", - ReturnType = typeof(IPropertyValidationMap<>).ToTypeReference(domainType).ToEnumerableReference(), - Parameters = { currentClassValidatorParam } - }.WithYield(propertyValidatorExpressions); + { + Attributes = MemberAttributes.Family, + Name = $"Get{domainType.Name}Properties", + ReturnType = typeof(IPropertyValidationMap<>).ToTypeReference(domainType).ToEnumerableReference(), + Parameters = { currentClassValidatorParam } + }.WithYield(propertyValidatorExpressions); } private CodeMemberMethod GetClassValidatorsMethod(Type domainType, IReadOnlyDictionary classValidators) @@ -257,11 +257,11 @@ private CodeMemberMethod GetClassValidatorsMethod(Type domainType, IReadOnlyDict var classValidatorType = typeof(IClassValidator<>).ToTypeReference(domainType); var method = new CodeMemberMethod - { - Attributes = MemberAttributes.Family, - Name = $"Get{domainType.Name}Validators", - ReturnType = classValidatorType.ToEnumerableReference() - }; + { + Attributes = MemberAttributes.Family, + Name = $"Get{domainType.Name}Validators", + ReturnType = classValidatorType.ToEnumerableReference() + }; var getExternalExpr = new CodeThisReferenceExpression().ToMethodReferenceExpression(this.ExternalClassValidatorsMethodName, domainType.ToTypeReference()).ToMethodInvokeExpression(); @@ -276,13 +276,13 @@ private CodeMemberMethod GetClassValidatorsMethod(Type domainType, IReadOnlyDict select TryApplyValidatorDataExpression(classValidatorExpressionPair.Key, classValidatorExpressionPair.Value, typeof(ClassValidatorExtensions)); var getForeachStatement = FuncHelper.Create(() => new CodeParameterDeclarationExpression { Name = "classValidator" }.Pipe(iterator => new CodeForeachStatement - { - Iterator = iterator, + { + Iterator = iterator, - Source = getExternalExpr, + Source = getExternalExpr, - Statements = { iterator.ToVariableReferenceExpression().ToMethodYieldReturnStatement() } - })); + Statements = { iterator.ToVariableReferenceExpression().ToMethodYieldReturnStatement() } + })); return method.WithStatement(this.Configuration.GenerateExternalClassValidators, getForeachStatement) .WithYield(validatorsExpressions, false) @@ -303,20 +303,20 @@ private CodeMemberMethod GetPropertyValidatorsMethod(Type domainType, KeyValuePa var property = propertyValidatorPair.Key; var getForeachStatement = FuncHelper.Create(() => new CodeParameterDeclarationExpression { Name = "propertyValidator" }.Pipe(iterator => new CodeForeachStatement - { - Iterator = iterator, + { + Iterator = iterator, - Source = new CodeThisReferenceExpression().ToMethodReferenceExpression(this.ExternalPropertyValidatorsMethodName, domainType.ToTypeReference(), property.PropertyType.ToTypeReference()).ToMethodInvokeExpression(property.ToCodeLambdaExpression()), + Source = new CodeThisReferenceExpression().ToMethodReferenceExpression(this.ExternalPropertyValidatorsMethodName, domainType.ToTypeReference(), property.PropertyType.ToTypeReference()).ToMethodInvokeExpression(property.ToCodeLambdaExpression()), - Statements = { iterator.ToVariableReferenceExpression().ToMethodYieldReturnStatement() } - })); + Statements = { iterator.ToVariableReferenceExpression().ToMethodYieldReturnStatement() } + })); return new CodeMemberMethod - { - Attributes = MemberAttributes.Family, - Name = $"Get{domainType.Name}_{property.Name}Validators", - ReturnType = propValidatorType.ToEnumerableReference() - } + { + Attributes = MemberAttributes.Family, + Name = $"Get{domainType.Name}_{property.Name}Validators", + ReturnType = propValidatorType.ToEnumerableReference() + } .WithStatement(this.Configuration.GenerateExternalPropertyValidators, getForeachStatement) .WithYield(validatorsExpressions, false) .WithTryBreak(); @@ -349,3 +349,4 @@ private static IEnumerable> GetApplyValidat } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidationMapFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidationMapFileFactory.cs index af99bbb05..7d8c241d1 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidationMapFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidationMapFileFactory.cs @@ -36,11 +36,12 @@ protected override IEnumerable GetMembers() yield return new CodeConstructor - { - Attributes = MemberAttributes.Public, - Parameters = { extendedValidationDataParam }, - BaseConstructorArgs = { extendedValidationDataParam.ToVariableReferenceExpression() } - }; + { + Attributes = MemberAttributes.Public, + Parameters = { extendedValidationDataParam }, + BaseConstructorArgs = { extendedValidationDataParam.ToVariableReferenceExpression() } + }; } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorBaseFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorBaseFileFactory.cs index dfe45fa25..9e2423519 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorBaseFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorBaseFileFactory.cs @@ -46,11 +46,11 @@ protected override IEnumerable GetMembers() .ToExpressionStatement(); yield return new CodeConstructor - { - Attributes = MemberAttributes.Public, - Parameters = { contextParameter, cacheParameter }, - BaseConstructorArgs = { contextParameter.ToVariableReferenceExpression(), cacheParameter.ToVariableReferenceExpression() } - }.WithStatements(statements); + { + Attributes = MemberAttributes.Public, + Parameters = { contextParameter, cacheParameter }, + BaseConstructorArgs = { contextParameter.ToVariableReferenceExpression(), cacheParameter.ToVariableReferenceExpression() } + }.WithStatements(statements); } foreach (var domainType in this.Configuration.ValidationTypes) @@ -62,19 +62,20 @@ protected override IEnumerable GetMembers() var ownerStateParameter = typeof(IValidationState).ToTypeReference().ToParameterDeclarationExpression("ownerState"); yield return new CodeMemberMethod - { - Attributes = MemberAttributes.Family, - Name = $"Get{domainType.Name}ValidationResult", - ReturnType = typeof(ValidationResult).ToTypeReference(), - Parameters = { sourceParameter, operationContextParameter, ownerStateParameter }, + { + Attributes = MemberAttributes.Family, + Name = $"Get{domainType.Name}ValidationResult", + ReturnType = typeof(ValidationResult).ToTypeReference(), + Parameters = { sourceParameter, operationContextParameter, ownerStateParameter }, - Statements = { new CodeBaseReferenceExpression().ToMethodInvokeExpression( + Statements = { new CodeBaseReferenceExpression().ToMethodInvokeExpression( "GetValidationResult", sourceParameter.ToVariableReferenceExpression(), operationContextParameter.ToVariableReferenceExpression(), ownerStateParameter.ToVariableReferenceExpression(), false.ToPrimitiveExpression()).ToMethodReturnStatement() } - }; + }; } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorCompileCacheFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorCompileCacheFileFactory.cs index afe75bb96..d16ef4eb5 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorCompileCacheFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorCompileCacheFileFactory.cs @@ -28,10 +28,11 @@ protected override IEnumerable GetMembers() .ToParameterDeclarationExpression("validationMap"); yield return new CodeConstructor - { - Attributes = MemberAttributes.Public, - Parameters = { validationMapParam }, - BaseConstructorArgs = { validationMapParam.ToVariableReferenceExpression() } - }; + { + Attributes = MemberAttributes.Public, + Parameters = { validationMapParam }, + BaseConstructorArgs = { validationMapParam.ToVariableReferenceExpression() } + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorFileFactory.cs index ed2380706..4ea55d0d1 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileFactory/ValidatorFileFactory.cs @@ -11,17 +11,12 @@ public class ValidatorFileFactory(TConfiguration configuration) public override FileType FileType => FileType.Validator; protected override CodeTypeDeclaration GetCodeTypeDeclaration() => - new() - { - Name = this.Name, - Attributes = MemberAttributes.Public, - IsPartial = true, - }; + new() { Name = this.Name, Attributes = MemberAttributes.Public, IsPartial = true, }; protected override IEnumerable GetBaseTypes() { yield return this.Configuration.GetCodeTypeReference(this.DomainType, FileType.ValidatorBase); - yield return this.Configuration.GetCodeTypeReference(this.DomainType, FileType.ValidatorInterface); + yield return this.Configuration.Environment.BLLCore.GetCodeTypeReference(this.DomainType, BLLCoreGenerator.FileType.ValidatorInterface); } protected override IEnumerable GetMembers() @@ -36,11 +31,12 @@ protected override IEnumerable GetMembers() var cacheParameter = this.Configuration.GetCodeTypeReference(null, FileType.ValidatorCompileCache).ToParameterDeclarationExpression("cache"); yield return new CodeConstructor - { - Attributes = MemberAttributes.Public, - Parameters = { contextParameter, cacheParameter }, - BaseConstructorArgs = { contextParameter.ToVariableReferenceExpression(), cacheParameter.ToVariableReferenceExpression() } - }; + { + Attributes = MemberAttributes.Public, + Parameters = { contextParameter, cacheParameter }, + BaseConstructorArgs = { contextParameter.ToVariableReferenceExpression(), cacheParameter.ToVariableReferenceExpression() } + }; } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileType.cs b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileType.cs index 6aab67378..e4817b784 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileType.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.BLLGenerator/FileType.cs @@ -29,8 +29,5 @@ public enum FileType ValidatorBase, - Validator, - - - ValidatorInterface + Validator } diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/AuditDTOModelFileGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/AuditDTOModelFileGenerator.cs index 52601fe68..61e62961e 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/AuditDTOModelFileGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/AuditDTOModelFileGenerator.cs @@ -41,9 +41,9 @@ private CodeTypeDeclaration GetRootPropertyRevisionDTO() .Self(z => z.TypeArguments.Add(this.Configuration.PropertyRevisionTypeName)); return new CodeTypeDeclaration(this.Configuration.DomainObjectPropertiesRevisionDTOTypeName) - { - CustomAttributes = new CodeAttributeDeclarationCollection([new CodeAttributeDeclaration(typeof(DataContractAttribute).FullName)]), - } + { + CustomAttributes = new CodeAttributeDeclarationCollection([new CodeAttributeDeclaration(typeof(DataContractAttribute).FullName)]), + } .Self(z => z.BaseTypes.Add(baseType)); } @@ -51,9 +51,9 @@ private CodeTypeDeclaration GetPropertyRevisionDTOBase() { var baseType = new CodeTypeReference(typeof(PropertyRevisionDTOBase)); return new CodeTypeDeclaration(this.Configuration.PropertyRevisionTypeName) - { - CustomAttributes = new CodeAttributeDeclarationCollection(this.GetCustomerAttributeNames().ToArray()), - } + { + CustomAttributes = new CodeAttributeDeclarationCollection(this.GetCustomerAttributeNames().ToArray()), + } .Self(z => z.BaseTypes.Add(baseType)) .Self(z => z.Members.AddRange([.. GetPropertyRevisionsCodeConstructor()])); } @@ -133,19 +133,19 @@ private CodeTypeDeclaration GetPropertyRevisionDTO() var fieldExpr = new CodeThisReferenceExpression().ToFieldReference(field); var property = new CodeMemberProperty - { - Name = "Value", - Type = new CodeTypeReference("TValue"), - Attributes = MemberAttributes.Public, - CustomAttributes = { new CodeAttributeDeclaration(typeof(DataMemberAttribute).FullName) }, - GetStatements = { fieldExpr.ToMethodReturnStatement() }, - SetStatements = { new CodePropertySetValueReferenceExpression().ToAssignStatement(fieldExpr) } - }; + { + Name = "Value", + Type = new CodeTypeReference("TValue"), + Attributes = MemberAttributes.Public, + CustomAttributes = { new CodeAttributeDeclaration(typeof(DataMemberAttribute).FullName) }, + GetStatements = { fieldExpr.ToMethodReturnStatement() }, + SetStatements = { new CodePropertySetValueReferenceExpression().ToAssignStatement(fieldExpr) } + }; return new CodeTypeDeclaration(this.Configuration.PropertyRevisionTypeName) - { - CustomAttributes = new CodeAttributeDeclarationCollection([new CodeAttributeDeclaration(typeof(DataContractAttribute).FullName)]), - } + { + CustomAttributes = new CodeAttributeDeclarationCollection([new CodeAttributeDeclaration(typeof(DataContractAttribute).FullName)]), + } .Self(z => z.BaseTypes.Add(this.Configuration.PropertyRevisionTypeName)) .Self(z => z.TypeParameters.Add("TValue")) .Self(z => z.Members.AddRange([.. GetPropertyRevisionsCodeConstructor()])) @@ -170,3 +170,4 @@ private class AuditFileFactory(TConfiguration configuration, CodeNamespace codeN public string Filename => this.Configuration.PropertyRevisionTypeName; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/Configuration/AuditDTOGeneratorConfigurationBase.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/Configuration/AuditDTOGeneratorConfigurationBase.cs index ff6e2bad0..4e8c82206 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/Configuration/AuditDTOGeneratorConfigurationBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/Configuration/AuditDTOGeneratorConfigurationBase.cs @@ -24,3 +24,4 @@ public abstract class AuditDTOGeneratorConfigurationBase(TEnvironm protected override string NamespacePostfix { get; } = "Generated.DTO"; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/Configuration/IAuditDTOGenerationEnvironment.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/Configuration/IAuditDTOGenerationEnvironment.cs index 69735a637..820122436 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/Configuration/IAuditDTOGenerationEnvironment.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/Configuration/IAuditDTOGenerationEnvironment.cs @@ -3,3 +3,4 @@ namespace Framework.CodeGeneration.DTOGenerator.Audit.Configuration; public interface IAuditDTOGenerationEnvironment : IServerDTOGenerationEnvironment, IServerDTOGeneratorConfigurationContainer; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/Configuration/IAuditDTOGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/Configuration/IAuditDTOGeneratorConfiguration.cs index eab640526..3d557546c 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/Configuration/IAuditDTOGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Audit/Configuration/IAuditDTOGeneratorConfiguration.cs @@ -15,3 +15,4 @@ public interface IAuditDTOGeneratorConfiguration : ICodeGeneratorConfiguration string PropertyRevisionFullTypeName { get; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/CodeTypeReferenceService/CryptCodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/CodeTypeReferenceService/CryptCodeTypeReferenceService.cs index be41589e4..eb2b95781 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/CodeTypeReferenceService/CryptCodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/CodeTypeReferenceService/CryptCodeTypeReferenceService.cs @@ -15,3 +15,4 @@ public class CryptCodeTypeReferenceService( { public override bool IsOptional(PropertyInfo property) => false; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/IServerDTOGenerationEnvironment.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/IServerDTOGenerationEnvironment.cs index c56e2d102..14dadb605 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/IServerDTOGenerationEnvironment.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/IServerDTOGenerationEnvironment.cs @@ -4,3 +4,4 @@ namespace Framework.CodeGeneration.DTOGenerator.Server.Configuration; public interface IServerDTOGenerationEnvironment : IDTOGenerationEnvironment, IBLLCoreGeneratorConfigurationContainer; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/IServerDTOGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/IServerDTOGeneratorConfiguration.cs index 153e7bf54..919b5c9fd 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/IServerDTOGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/IServerDTOGeneratorConfiguration.cs @@ -60,3 +60,4 @@ public interface IServerDTOGeneratorConfiguration : IDTOGeneratorConfiguration CodeAttributeDeclaration GetDTOFileAttribute(Type domainType, RoleFileType fileType); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/ServerDTOGeneratorConfigurationBase.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/ServerDTOGeneratorConfigurationBase.cs index 93695577d..da966de7a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/ServerDTOGeneratorConfigurationBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/ServerDTOGeneratorConfigurationBase.cs @@ -378,3 +378,4 @@ private IEnumerable GetDomainTypeDetails(Type domainType, DTOFileType file return this.domainTypeDetailsCache.GetValue(domainType, fileType, isWritable); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/ServerDTOGeneratorConfigurationExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/ServerDTOGeneratorConfigurationExtensions.cs index f0a28b729..2a02aa798 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/ServerDTOGeneratorConfigurationExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Configuration/ServerDTOGeneratorConfigurationExtensions.cs @@ -12,15 +12,15 @@ public static CodeMemberProperty GetVersionObjectPrivateImplementation(this ISer if (configuration == null) throw new ArgumentNullException(nameof(configuration)); return new CodeMemberProperty - { - Name = "Version", - PrivateImplementationType = configuration.GetVersionObjectCodeTypeReference(), - GetStatements = + { + Name = "Version", + PrivateImplementationType = configuration.GetVersionObjectCodeTypeReference(), + GetStatements = { new CodeThisReferenceExpression().ToPropertyReference(configuration.VersionProperty).ToMethodReturnStatement() }, - Type = configuration.VersionType.ToTypeReference() - }; + Type = configuration.VersionType.ToTypeReference() + }; } @@ -32,3 +32,4 @@ public static CodeTypeReference GetVersionObjectCodeTypeReference(this IServerDT return typeof(IVersionObject<>).MakeGenericType(configuration.VersionType).ToTypeReference(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/CodeDomHelper.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/CodeDomHelper.cs index b8370ebdc..055d810cb 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/CodeDomHelper.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/CodeDomHelper.cs @@ -1,6 +1,8 @@ using System.CodeDom; using Anch.Core; +using Anch.SecuritySystem; + using Framework.BLL; using Framework.BLL.DTOMapping.Services; using Framework.CodeDom.Extend; @@ -13,8 +15,6 @@ using Framework.Core; using Framework.Database; -using Anch.SecuritySystem; - namespace Framework.CodeGeneration.DTOGenerator.Server.FileFactory; internal static class CodeDomHelper @@ -42,24 +42,24 @@ public static CodeConstructor GenerateFromDomainObjectConstructor(this IFileFact var sourceDomainParameterRef = sourceDomainParameter.ToVariableReferenceExpression(); return new CodeConstructor - { - Attributes = (domainType.IsAbstractDTO() ? MemberAttributes.Family : MemberAttributes.Public) | MemberAttributes.Final, - Parameters = { mappingServiceParameter, sourceDomainParameter }, - Statements = + { + Attributes = (domainType.IsAbstractDTO() ? MemberAttributes.Family : MemberAttributes.Public) | MemberAttributes.Final, + Parameters = { mappingServiceParameter, sourceDomainParameter }, + Statements = { mappingServiceParameterRefExpr.ToMethodInvokeExpression("Map" + domainType.Name, sourceDomainParameterRef, new CodeThisReferenceExpression()) } - }.Self(decl => - { - if (fileFactory.FileType == BaseFileType.ProjectionDTO || (fileFactory.FileType as MainDTOFileType).Maybe(fileType => fileType.BaseType != null)) - { - decl.BaseConstructorArgs.AddRange( - [ - mappingServiceParameterRefExpr, + }.Self(decl => + { + if (fileFactory.FileType == BaseFileType.ProjectionDTO || (fileFactory.FileType as MainDTOFileType).Maybe(fileType => fileType.BaseType != null)) + { + decl.BaseConstructorArgs.AddRange( + [ + mappingServiceParameterRefExpr, sourceDomainParameter.ToVariableReferenceExpression() - ]); - } - }); + ]); + } + }); } @@ -117,18 +117,18 @@ public static CodeMemberMethod GetToDomainObjectMethod(this IFileFactory> fileFactory) @@ -140,18 +140,18 @@ public static CodeMemberMethod GetToDomainObjectWithAllowCreateMethod(this IFile var allowCreateParameterExpr = allowCreateParameter.ToVariableReferenceExpression(); return new CodeMemberMethod - { - Name = fileFactory.Configuration.ToDomainObjectMethodName, - Attributes = MemberAttributes.Public | MemberAttributes.Final, - Parameters = { mappingServiceParameter, allowCreateParameter }, - ReturnType = fileFactory.DomainType.ToTypeReference(), - Statements = + { + Name = fileFactory.Configuration.ToDomainObjectMethodName, + Attributes = MemberAttributes.Public | MemberAttributes.Final, + Parameters = { mappingServiceParameter, allowCreateParameter }, + ReturnType = fileFactory.DomainType.ToTypeReference(), + Statements = { mappingServiceParameterRefExpr.ToMethodReferenceExpression($"To{fileFactory.DomainType.Name}") .ToMethodInvokeExpression(new CodeThisReferenceExpression(), allowCreateParameterExpr) .ToMethodReturnStatement() } - }; + }; } @@ -170,11 +170,11 @@ public static CodeMemberMethod GetMappingServiceInterfaceToDomainObjectMethod(th var parameter = fileFactory.GetMappingServiceDomainObjectParameter(); return new CodeMemberMethod - { - Name = $"To{fileFactory.DomainType.Name}", - Parameters = { parameter }, - ReturnType = fileFactory.DomainType.ToTypeReference() - }; + { + Name = $"To{fileFactory.DomainType.Name}", + Parameters = { parameter }, + ReturnType = fileFactory.DomainType.ToTypeReference() + }; } public static CodeMemberMethod GetMappingServiceInterfaceToDomainObjectWithAllowCreateMethod(this IFileFactory fileFactory) @@ -185,11 +185,11 @@ public static CodeMemberMethod GetMappingServiceInterfaceToDomainObjectWithAllow var allowCreateParameter = typeof(bool).ToTypeReference().ToParameterDeclarationExpression("allowCreate"); return new CodeMemberMethod - { - Name = $"To{fileFactory.DomainType.Name}", - Parameters = { parameter, allowCreateParameter }, - ReturnType = fileFactory.DomainType.ToTypeReference() - }; + { + Name = $"To{fileFactory.DomainType.Name}", + Parameters = { parameter, allowCreateParameter }, + ReturnType = fileFactory.DomainType.ToTypeReference() + }; } public static CodeMemberMethod GetMappingServiceInterfaceToDomainObjectMethod(this IFileFactory fileFactory, Type masterType) @@ -202,11 +202,11 @@ public static CodeMemberMethod GetMappingServiceInterfaceToDomainObjectMethod(th var masterParameter = masterType.ToTypeReference().ToParameterDeclarationExpression("master"); return new CodeMemberMethod - { - Name = $"To{fileFactory.DomainType.Name}", - Parameters = { parameter, masterParameter }, - ReturnType = fileFactory.DomainType.ToTypeReference() - }; + { + Name = $"To{fileFactory.DomainType.Name}", + Parameters = { parameter, masterParameter }, + ReturnType = fileFactory.DomainType.ToTypeReference() + }; } public static CodeMemberMethod GetMappingServiceToDomainObjectMethod(this IDTOFileFactory fileFactory, Type masterType) @@ -226,12 +226,12 @@ public static CodeMemberMethod GetMappingServiceToDomainObjectMethod.GetById)}", fileFactory.DomainType.ToTypeReference()) .ToMethodInvokeExpression(parameterIdExpr) .ToMethodReturnStatement() }, - }; + }; } private static CodeMemberMethod GetMappingServiceIdentityToIntegrationVersionDomainObjectMethod(this IFileFactory, DTOFileType> fileFactory) @@ -308,19 +308,19 @@ private static CodeMemberMethod GetMappingServiceIdentityToIntegrationVersionDom var parameterIdExpr = parameterExpr.ToPropertyReference(fileFactory.Configuration.Environment.IdentityProperty.Name); return new CodeMemberMethod - { - Attributes = MemberAttributes.Public, - Name = $"To{fileFactory.DomainType.Name}", - Parameters = { parameter }, - ReturnType = fileFactory.DomainType.ToTypeReference(), - Statements = + { + Attributes = MemberAttributes.Public, + Name = $"To{fileFactory.DomainType.Name}", + Parameters = { parameter }, + ReturnType = fileFactory.DomainType.ToTypeReference(), + Statements = { new CodeThisReferenceExpression() .ToMethodReferenceExpression($"{nameof(IDTOMappingService.GetById)}", fileFactory.DomainType.ToTypeReference()) .ToMethodInvokeExpression(parameterIdExpr, IdCheckMode.SkipEmpty.ToPrimitiveExpression(), LockRole.Update.ToPrimitiveExpression()) .ToMethodReturnStatement() }, - }; + }; } @@ -334,12 +334,12 @@ private static CodeMemberMethod GetMappingServiceUnpersistentToDomainObjectMetho var mappingServiceParameterRefExpr = new CodeThisReferenceExpression(); return new CodeMemberMethod - { - Attributes = MemberAttributes.Public, - Name = $"To{fileFactory.DomainType.Name}", - Parameters = { parameter }, - ReturnType = fileFactory.DomainType.ToTypeReference(), - Statements = + { + Attributes = MemberAttributes.Public, + Name = $"To{fileFactory.DomainType.Name}", + Parameters = { parameter }, + ReturnType = fileFactory.DomainType.ToTypeReference(), + Statements = { mappingServiceParameterRefExpr.ToMethodReferenceExpression( fileFactory.Configuration.ToDomainObjectMethodName + "Base", @@ -348,7 +348,7 @@ private static CodeMemberMethod GetMappingServiceUnpersistentToDomainObjectMetho .ToMethodInvokeExpression(parameterExpr) .ToMethodReturnStatement() } - }; + }; } private static CodeMemberMethod GetMappingServicePersistentToDomainObjectMethod(this IFileFactory, DTOFileType> fileFactory) @@ -364,18 +364,18 @@ private static CodeMemberMethod GetMappingServicePersistentToDomainObjectMethod( return new CodeMemberMethod - { - Attributes = MemberAttributes.Public, - Name = methodName, - Parameters = { parameter }, - ReturnType = fileFactory.DomainType.ToTypeReference(), - Statements = + { + Attributes = MemberAttributes.Public, + Name = methodName, + Parameters = { parameter }, + ReturnType = fileFactory.DomainType.ToTypeReference(), + Statements = { mappingServiceParameterRefExpr.ToMethodReferenceExpression(fileFactory.Configuration.ToDomainObjectMethodName, fileFactory.CurrentReference, fileFactory.DomainType.ToTypeReference()) .ToMethodInvokeExpression(parameterExpr) .ToMethodReturnStatement() } - }; + }; } @@ -395,28 +395,29 @@ public static CodeMemberMethod GetMappingServiceToDomainObjectWithAllowCreateMet var conditionStatement = new CodeConditionStatement - { - Condition = allowCreateParameterExpr, - TrueStatements = + { + Condition = allowCreateParameterExpr, + TrueStatements = { mappingServiceParameterRefExpr.ToMethodInvokeExpression(fileFactory.Configuration.ToDomainObjectMethodName, parameterExpr, new CodeLambdaExpression { Statements = { fileFactory.DomainType.ToTypeReference().ToObjectCreateExpression() } }) .ToMethodReturnStatement() }, - FalseStatements = + FalseStatements = { mappingServiceParameterRefExpr.ToMethodInvokeExpression(methodName, parameterExpr) .ToMethodReturnStatement() } - }; + }; return new CodeMemberMethod - { - Attributes = MemberAttributes.Public, - Name = methodName, - Parameters = { parameter, allowCreateParameter }, - ReturnType = fileFactory.DomainType.ToTypeReference(), - Statements = { conditionStatement } - }; + { + Attributes = MemberAttributes.Public, + Name = methodName, + Parameters = { parameter, allowCreateParameter }, + ReturnType = fileFactory.DomainType.ToTypeReference(), + Statements = { conditionStatement } + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Custom/LambdaHelperFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Custom/LambdaHelperFileFactory.cs index 952198295..5e80de336 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Custom/LambdaHelperFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Custom/LambdaHelperFileFactory.cs @@ -90,41 +90,41 @@ private CodeMemberMethod GetConvertToDTOMethod(Type domainType, BaseFileType fil if (!fileType.NeedMappingServiceForConvert()) { return new CodeMemberMethod - { - Attributes = MemberAttributes.Public | MemberAttributes.Static, - Name = "To" + fileType.Name, - ReturnType = dtoRef, - Parameters = + { + Attributes = MemberAttributes.Public | MemberAttributes.Static, + Name = "To" + fileType.Name, + ReturnType = dtoRef, + Parameters = { new CodeParameterDeclarationExpression(domainType, sourceDomainParameter.Name) }, - Statements = + Statements = { dtoRef.ToObjectCreateExpression(sourceDomainParameter.ToVariableReferenceExpression()) .ToMethodReturnStatement() } - }.MarkAsExtension(); + }.MarkAsExtension(); } else { var mappingServiceParameter = this.GetMappingServiceParameter(); return new CodeMemberMethod - { - Attributes = MemberAttributes.Public | MemberAttributes.Static, - Name = "To" + fileType.Name, - ReturnType = dtoRef, - Parameters = + { + Attributes = MemberAttributes.Public | MemberAttributes.Static, + Name = "To" + fileType.Name, + ReturnType = dtoRef, + Parameters = { new CodeParameterDeclarationExpression(domainType, sourceDomainParameter.Name), mappingServiceParameter }, - Statements = + Statements = { dtoRef.ToObjectCreateExpression(mappingServiceParameter.ToVariableReferenceExpression(), sourceDomainParameter.ToVariableReferenceExpression()) .ToMethodReturnStatement() } - }.MarkAsExtension(); + }.MarkAsExtension(); } } @@ -142,15 +142,15 @@ private CodeMemberMethod GetConvertToDTOListMethod(Type domainType, BaseFileType if (!fileType.NeedMappingServiceForConvert()) { return new CodeMemberMethod - { - Attributes = MemberAttributes.Public | MemberAttributes.Static, - Name = "To" + fileType.Name + "List", - ReturnType = typeof(List<>).ToTypeReference(dtoRef), - Parameters = + { + Attributes = MemberAttributes.Public | MemberAttributes.Static, + Name = "To" + fileType.Name + "List", + ReturnType = typeof(List<>).ToTypeReference(dtoRef), + Parameters = { new CodeParameterDeclarationExpression(typeof(IEnumerable<>).MakeGenericType(domainType), domainObjectsParameter.Name) }, - Statements = + Statements = { typeof(CoreEnumerableExtensions) .ToTypeReferenceExpression() @@ -171,23 +171,23 @@ private CodeMemberMethod GetConvertToDTOListMethod(Type domainType, BaseFileType })) .ToMethodReturnStatement() } - }.MarkAsExtension(); + }.MarkAsExtension(); } else { var mappingServiceParameter = this.GetMappingServiceParameter(); return new CodeMemberMethod - { - Attributes = MemberAttributes.Public | MemberAttributes.Static, - Name = "To" + fileType.Name + "List", - ReturnType = typeof(List<>).ToTypeReference(dtoRef), - Parameters = + { + Attributes = MemberAttributes.Public | MemberAttributes.Static, + Name = "To" + fileType.Name + "List", + ReturnType = typeof(List<>).ToTypeReference(dtoRef), + Parameters = { new CodeParameterDeclarationExpression(typeof(IEnumerable<>).MakeGenericType(domainType), domainObjectsParameter.Name), mappingServiceParameter }, - Statements = + Statements = { typeof(CoreEnumerableExtensions) .ToTypeReferenceExpression() @@ -208,7 +208,8 @@ private CodeMemberMethod GetConvertToDTOListMethod(Type domainType, BaseFileType })) .ToMethodReturnStatement() } - }.MarkAsExtension(); + }.MarkAsExtension(); } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultProjectionDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultProjectionDTOFileFactory.cs index 12a6cb13e..39b82528c 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultProjectionDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultProjectionDTOFileFactory.cs @@ -100,3 +100,4 @@ protected override IEnumerable GetConstructors() yield return this.GenerateFromDomainObjectConstructor(this.MapDomainObjectToMappingObjectPropertyAssigner); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultServerIdentityDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultServerIdentityDTOFileFactory.cs index 5260b9cca..585df71d3 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultServerIdentityDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultServerIdentityDTOFileFactory.cs @@ -34,16 +34,16 @@ protected override IEnumerable GetConstructors() var domainParameter = this.GetDomainObjectParameter(); yield return new CodeConstructor - { - Attributes = MemberAttributes.Public, - Parameters = { domainParameter }, - Statements = + { + Attributes = MemberAttributes.Public, + Parameters = { domainParameter }, + Statements = { new CodeThrowArgumentNullExceptionConditionStatement(domainParameter), domainParameter.ToVariableReferenceExpression().ToPropertyReference(this.Configuration.Environment.IdentityProperty) .ToAssignStatement(this.GetAssignIdExpression()) } - }; + }; } if (this.Configuration.IdentityIsReference) @@ -55,11 +55,11 @@ protected override IEnumerable GetConstructors() var idParameter = new CodeParameterDeclarationExpression(typeof(string), "id"); yield return new CodeConstructor - { - Attributes = MemberAttributes.Public, - Parameters = { idParameter }, - ChainedConstructorArgs = { typeof(Guid).ToTypeReference().ToObjectCreateExpression(idParameter.ToVariableReferenceExpression())} - }; + { + Attributes = MemberAttributes.Public, + Parameters = { idParameter }, + ChainedConstructorArgs = { typeof(Guid).ToTypeReference().ToObjectCreateExpression(idParameter.ToVariableReferenceExpression()) } + }; } } @@ -83,3 +83,4 @@ protected override IEnumerable GetCustomAttributes() yield return this.Configuration.GetDTOFileAttribute(this.DomainType, this.FileType); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultStrictDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultStrictDTOFileFactory.cs index 0067ba2f2..02a020fdd 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultStrictDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultStrictDTOFileFactory.cs @@ -192,11 +192,11 @@ public IEnumerable GetClientMappingServiceMethods() var properties = this.Configuration.GetDomainTypeProperties(this.DomainType!, sourceFileType).Intersect(this.GetProperties(false)); yield return new CodeMemberMethod - { - Name = $"Map{sourceFileType.ShortName}To{this.FileType.ShortName}For{this.DomainType!.Name}", - Attributes = MemberAttributes.Public, - Parameters = { targetParameter, currentSourceParameter } - }.WithStatement(new CodeThrowArgumentNullExceptionConditionStatement(currentSourceParameter)) + { + Name = $"Map{sourceFileType.ShortName}To{this.FileType.ShortName}For{this.DomainType!.Name}", + Attributes = MemberAttributes.Public, + Parameters = { targetParameter, currentSourceParameter } + }.WithStatement(new CodeThrowArgumentNullExceptionConditionStatement(currentSourceParameter)) .WithStatement(new CodeThrowArgumentNullExceptionConditionStatement(targetParameter)) .WithStatements(properties.Select(property => propertyAssigner.GetAssignStatementBySource(property, currentSourceParameterRefExpr, targetParameterRefExpr))); } @@ -211,10 +211,11 @@ public IEnumerable GetClientMappingServiceInterfaceMethods() var sourceParameter = this.Configuration.GetCodeTypeReference(this.DomainType, sourceFileType).ToParameterDeclarationExpression("currentSource"); yield return new CodeMemberMethod - { - Name = $"Map{sourceFileType.ShortName}To{this.FileType.ShortName}For{this.DomainType.Name}", - Parameters = { targetParameter, sourceParameter } - }; + { + Name = $"Map{sourceFileType.ShortName}To{this.FileType.ShortName}For{this.DomainType.Name}", + Parameters = { targetParameter, sourceParameter } + }; } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultUpdateDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultUpdateDTOFileFactory.cs index 8cb708617..bdc2bf80c 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultUpdateDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/DefaultUpdateDTOFileFactory.cs @@ -177,26 +177,26 @@ protected override IEnumerable GetMembers() var checkProperties = this.GetProperties(true).Where(prop => !prop.HasAttribute()).ToList(); yield return new CodeMemberProperty - { - Attributes = MemberAttributes.Public | MemberAttributes.Final, - Name = nameof(IUpdateDTO.IsEmpty), - Type = typeof(bool).ToTypeReference(), - HasGet = true, - GetStatements = + { + Attributes = MemberAttributes.Public | MemberAttributes.Final, + Name = nameof(IUpdateDTO.IsEmpty), + Type = typeof(bool).ToTypeReference(), + HasGet = true, + GetStatements = { checkProperties.ToArray(this.GetPropertyIsEmptyCondition) .Pipe(items => items.Any() ? new CodeBooleanAndOperatorExpression(items) : true.ToPrimitiveExpression()) .ToMethodReturnStatement() }, - CustomAttributes = { new CodeAttributeDeclaration(typeof(IgnoreDataMemberAttribute).ToTypeReference()) } + CustomAttributes = { new CodeAttributeDeclaration(typeof(IgnoreDataMemberAttribute).ToTypeReference()) } }; yield return new CodeMemberMethod - { - Attributes = MemberAttributes.Public | MemberAttributes.Final, - Name = nameof(IUpdateDTO.Compress), - ReturnType = typeof(void).ToTypeReference() - }.WithStatements(checkProperties.Select(this.TryGetPropertyCompressStatement).Where(statement => statement != null)); + { + Attributes = MemberAttributes.Public | MemberAttributes.Final, + Name = nameof(IUpdateDTO.Compress), + ReturnType = typeof(void).ToTypeReference() + }.WithStatements(checkProperties.Select(this.TryGetPropertyCompressStatement).Where(statement => statement != null)); } private CodeExpression GetPropertyIsEmptyCondition(PropertyInfo property) @@ -260,11 +260,11 @@ public IEnumerable GetClientMappingServiceMethods() var propertyAssigner = new UpdatePropertyAssigner(this); yield return new CodeMemberMethod - { - Name = $"Map{this.DomainType.Name}", - Attributes = MemberAttributes.Public, - Parameters = { targetParameter, currentSourceParameter } - }.WithStatement(new CodeThrowArgumentNullExceptionConditionStatement(targetParameter)) + { + Name = $"Map{this.DomainType.Name}", + Attributes = MemberAttributes.Public, + Parameters = { targetParameter, currentSourceParameter } + }.WithStatement(new CodeThrowArgumentNullExceptionConditionStatement(targetParameter)) .WithStatement(new CodeThrowArgumentNullExceptionConditionStatement(currentSourceParameter)) .WithStatements(this.GetProperties(false).Select(property => propertyAssigner.GetAssignStatement(property, currentSourceParameterRefExpr.ToPropertyReference(property), targetParameterRefExpr.ToPropertyReference(property)))); } @@ -276,11 +276,11 @@ public IEnumerable GetClientMappingServiceMethods() var propertyAssigner = new DiffUpdatePropertyAssigner(this); yield return new CodeMemberMethod - { - Name = $"Map{this.DomainType.Name}", - Attributes = MemberAttributes.Public, - Parameters = { targetParameter, currentSourceParameter, baseSourceParameter } - }.WithStatement(new CodeThrowArgumentNullExceptionConditionStatement(targetParameter)) + { + Name = $"Map{this.DomainType.Name}", + Attributes = MemberAttributes.Public, + Parameters = { targetParameter, currentSourceParameter, baseSourceParameter } + }.WithStatement(new CodeThrowArgumentNullExceptionConditionStatement(targetParameter)) .WithStatement(new CodeThrowArgumentNullExceptionConditionStatement(currentSourceParameter)) .WithStatement(new CodeThrowArgumentNullExceptionConditionStatement(baseSourceParameter)) .WithStatements(this.GetProperties(false).Select(property => propertyAssigner.GetAssignStatement(property, baseSourceParameterRefExpr.ToPropertyReference(property), currentSourceParameterRefExpr.ToPropertyReference(property), targetParameterRefExpr.ToPropertyReference(property)))) @@ -296,20 +296,21 @@ public IEnumerable GetClientMappingServiceInterfaceMethods() { yield return new CodeMemberMethod - { - Name = $"Map{this.DomainType.Name}", - Parameters = { targetParameter, currentSourceParameter } - }; + { + Name = $"Map{this.DomainType.Name}", + Parameters = { targetParameter, currentSourceParameter } + }; } { var baseSourceParameter = this.Configuration.GetCodeTypeReference(this.DomainType, BaseFileType.StrictDTO).ToParameterDeclarationExpression("baseSource"); yield return new CodeMemberMethod - { - Name = $"Map{this.DomainType.Name}", - Parameters = { targetParameter, currentSourceParameter, baseSourceParameter } - }; + { + Name = $"Map{this.DomainType.Name}", + Parameters = { targetParameter, currentSourceParameter, baseSourceParameter } + }; } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Extensions.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Extensions.cs index 01214dc56..5a547c9ae 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Extensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Extensions.cs @@ -1,6 +1,7 @@ using System.Reflection; using Anch.Core; + using Framework.BLL.Domain.Attributes; using Framework.BLL.Domain.Serialization; using Framework.BLL.Domain.Serialization.Extensions; @@ -28,3 +29,4 @@ public static class Extensions public static bool IsIntegrationVersion(this Type domainType) => domainType.TryGetIntegrationVersionProperty() != null; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/IDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/IDTOFileFactory.cs index 1a88361c1..e007c9b94 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/IDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/IDTOFileFactory.cs @@ -3,6 +3,7 @@ using System.Runtime.Serialization; using Anch.Core; + using Framework.BLL.Domain.Persistent.Attributes; using Framework.BLL.DTOMapping.MappingObject; using Framework.CodeDom.Extensions; @@ -49,29 +50,29 @@ public virtual IEnumerable GetServerMappingServiceInterfaceMet if (this.MapDomainObjectToMappingObjectPropertyAssigner != null) { yield return new CodeMemberMethod - { - Name = "Map" + this.DomainType!.Name, - ReturnType = typeof(void).ToTypeReference(), - Parameters = + { + Name = "Map" + this.DomainType!.Name, + ReturnType = typeof(void).ToTypeReference(), + Parameters = { domainTypeRef.ToParameterDeclarationExpression("domainObject"), mappingTypeRef.ToParameterDeclarationExpression("mappingObject"), } - }; + }; } if (this.MapMappingObjectToDomainObjectPropertyAssigner != null) { yield return new CodeMemberMethod - { - Name = "Map" + this.DomainType.Name, - ReturnType = typeof(void).ToTypeReference(), - Parameters = + { + Name = "Map" + this.DomainType.Name, + ReturnType = typeof(void).ToTypeReference(), + Parameters = { mappingTypeRef.ToParameterDeclarationExpression("mappingObject"), domainTypeRef.ToParameterDeclarationExpression("domainObject"), } - }; + }; } if (this.HasToDomainObjectMethod) @@ -111,12 +112,12 @@ public virtual IEnumerable GetServerMappingServiceMethods() this.MapDomainObjectToMappingObjectPropertyAssigner.GetAssignStatementBySource(property, domainTypeParameterRef, mappingTypeParameterRef)); yield return new CodeMemberMethod - { - Attributes = MemberAttributes.Public, - Name = "Map" + this.DomainType.Name, - Parameters = { domainTypeParameter, mappingTypeParameter }, - Statements = { assignStatements.Composite() } - }; + { + Attributes = MemberAttributes.Public, + Name = "Map" + this.DomainType.Name, + Parameters = { domainTypeParameter, mappingTypeParameter }, + Statements = { assignStatements.Composite() } + }; } if (this.MapMappingObjectToDomainObjectPropertyAssigner != null) @@ -134,15 +135,15 @@ public virtual IEnumerable GetServerMappingServiceMethods() yield return new CodeMemberMethod - { - Attributes = MemberAttributes.Public, - Name = "Map" + this.DomainType.Name, - Parameters = { mappingTypeParameter, domainTypeParameter }, - Statements = + { + Attributes = MemberAttributes.Public, + Name = "Map" + this.DomainType.Name, + Parameters = { mappingTypeParameter, domainTypeParameter }, + Statements = { properties.Select(property => this.MapMappingObjectToDomainObjectPropertyAssigner.GetAssignStatementBySource(property, mappingTypeParameterRef, domainTypeParameterRef)).Composite(), } - }; + }; } if (this.HasToDomainObjectMethod) @@ -251,11 +252,11 @@ protected virtual CodeMemberField CreateFieldMember(PropertyInfo property, strin var fieldTypeRef = this.CodeTypeReferenceService.GetCodeTypeReference(property, true); return new CodeMemberField - { - Name = fieldName, - Type = fieldTypeRef, - InitExpression = this.GetFieldInitExpression(fieldTypeRef, property) - }; + { + Name = fieldName, + Type = fieldTypeRef, + InitExpression = this.GetFieldInitExpression(fieldTypeRef, property) + }; } protected virtual CodeExpression GetFieldInitExpression(CodeTypeReference codeTypeReference, PropertyInfo property) => null; @@ -267,13 +268,13 @@ protected virtual CodeMemberProperty CreatePropertyMember(PropertyInfo sourcePro var fieldMemberRef = new CodeThisReferenceExpression().ToFieldReference(fieldMember); return new CodeMemberProperty - { - Type = fieldMember.Type, - Name = sourceProperty.Name, - Attributes = MemberAttributes.Public | MemberAttributes.Final, - GetStatements = { fieldMemberRef.ToMethodReturnStatement() }, - SetStatements = { new CodePropertySetValueReferenceExpression().ToAssignStatement(fieldMemberRef) } - }.Self(p => p.CustomAttributes.AddRange(this.GetPropertyCustomAttributes(sourceProperty).ToArray())); + { + Type = fieldMember.Type, + Name = sourceProperty.Name, + Attributes = MemberAttributes.Public | MemberAttributes.Final, + GetStatements = { fieldMemberRef.ToMethodReturnStatement() }, + SetStatements = { new CodePropertySetValueReferenceExpression().ToAssignStatement(fieldMemberRef) } + }.Self(p => p.CustomAttributes.AddRange(this.GetPropertyCustomAttributes(sourceProperty).ToArray())); } @@ -318,13 +319,13 @@ protected CodeTypeReference GetMappingObjectReference() => } } : new CodeTypeReference(typeof(IMappingObject<,>)) - { - TypeArguments = + { + TypeArguments = { this.Configuration.DTOMappingServiceInterfaceTypeReference, this.DomainType } - }; + }; DTOFileType IDTOSource.FileType => this.FileType; //DTOFileType IFileTypeSource.FileType => this.FileType; @@ -334,3 +335,4 @@ protected CodeTypeReference GetMappingObjectReference() => //{ // IEnumerable CreatePropertyMember(PropertyInfo sourceProperty); //} + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/Base/MainDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/Base/MainDTOFileFactory.cs index 6805f2d6e..f21535eea 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/Base/MainDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/Base/MainDTOFileFactory.cs @@ -115,3 +115,4 @@ protected override IEnumerable GetConstructors() yield return this.GenerateFromDomainObjectConstructor(this.MapDomainObjectToMappingObjectPropertyAssigner); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultBaseAbstractDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultBaseAbstractDTOFileFactory.cs index 990d68b57..cb6a1467a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultBaseAbstractDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultBaseAbstractDTOFileFactory.cs @@ -23,3 +23,4 @@ public class DefaultBaseAbstractDTOFileFactory(TConfiguration co // yield return this.GenerateFromDomainObjectConstructor(this.MapToMappingObjectPropertyAssigner); //} } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultBaseAuditPersistentDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultBaseAuditPersistentDTOFileFactory.cs index 450c3e8e0..4a87f1759 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultBaseAuditPersistentDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultBaseAuditPersistentDTOFileFactory.cs @@ -10,3 +10,4 @@ public class DefaultBaseAuditPersistentDTOFileFactory(TConfigura { public override MainDTOFileType FileType { get; } = BaseFileType.BaseAuditPersistentDTO; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultBasePersistentDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultBasePersistentDTOFileFactory.cs index e7f3ecfe5..c884d7981 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultBasePersistentDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultBasePersistentDTOFileFactory.cs @@ -42,22 +42,23 @@ protected override IEnumerable GetMembers() yield return new CodeMemberProperty - { - Attributes = MemberAttributes.Public | MemberAttributes.Final, - Name = "IsNew", - Type = new CodeTypeReference(typeof(bool)), - GetStatements = + { + Attributes = MemberAttributes.Public | MemberAttributes.Final, + Name = "IsNew", + Type = new CodeTypeReference(typeof(bool)), + GetStatements = { new CodeValueEqualityOperatorExpression( this.Configuration.Environment.GetIdentityType().ToTypeReference().ToDefaultValueExpression(), this.Configuration.GetIdentityPropertyCodeExpression()).ToMethodReturnStatement() }, - CustomAttributes = + CustomAttributes = { new CodeAttributeDeclaration(new CodeTypeReference(typeof(IgnoreDataMemberAttribute))), } - }; + }; yield return this.GetIdentityObjectImplementation(true); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultFullDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultFullDTOFileFactory.cs index fff63d4c6..c3a49f508 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultFullDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultFullDTOFileFactory.cs @@ -9,3 +9,4 @@ public class DefaultFullDTOFileFactory(TConfiguration configurat { public override MainDTOFileType FileType { get; } = BaseFileType.FullDTO; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultRichDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultRichDTOFileFactory.cs index 4b0a7cb2b..dafd45ca2 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultRichDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultRichDTOFileFactory.cs @@ -51,3 +51,4 @@ protected override CodeExpression GetFieldInitExpression(CodeTypeReference codeT return base.GetFieldInitExpression(codeTypeReference, property); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultSimpleDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultSimpleDTOFileFactory.cs index da28a2e43..171002c6b 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultSimpleDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultSimpleDTOFileFactory.cs @@ -10,7 +10,6 @@ using Framework.CodeGeneration.DTOGenerator.Server.FileFactory.Main.Base; using Framework.Core; - namespace Framework.CodeGeneration.DTOGenerator.Server.FileFactory.Main; public class DefaultSimpleDTOFileFactory(TConfiguration configuration, Type domainType) : MainDTOFileFactory(configuration, domainType) @@ -72,3 +71,4 @@ protected override CodeExpression GetFieldInitExpression(CodeTypeReference codeT return base.GetFieldInitExpression(codeTypeReference, property); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultVisualDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultVisualDTOFileFactory.cs index a114fc689..df1e17f40 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultVisualDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Main/DefaultVisualDTOFileFactory.cs @@ -1,4 +1,5 @@ using System.CodeDom; + using Framework.CodeGeneration.DTOGenerator.FileFactory; using Framework.CodeGeneration.DTOGenerator.FileTypes; using Framework.CodeGeneration.DTOGenerator.Server.Configuration; @@ -40,3 +41,4 @@ protected override IEnumerable GetMembers() } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/IServerMappingServiceExternalMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/IServerMappingServiceExternalMethodGenerator.cs index 2b52f0c4f..53dc0a2e4 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/IServerMappingServiceExternalMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/IServerMappingServiceExternalMethodGenerator.cs @@ -8,3 +8,4 @@ public interface IServerMappingServiceExternalMethodGenerator IEnumerable GetServerMappingServiceInterfaceMethods(); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/ServerDTOMappingServiceInterfaceFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/ServerDTOMappingServiceInterfaceFileFactory.cs index 6f47ab532..4097507ea 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/ServerDTOMappingServiceInterfaceFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/ServerDTOMappingServiceInterfaceFileFactory.cs @@ -2,6 +2,7 @@ using System.Collections.ObjectModel; using Anch.Core; + using Framework.BLL.DTOMapping.Services; using Framework.CodeDom.Extensions; using Framework.CodeGeneration.DTOGenerator.FileFactory.Base; @@ -56,3 +57,4 @@ protected override IEnumerable GetMembers() } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/ServerPrimitiveDTOMappingServiceBaseFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/ServerPrimitiveDTOMappingServiceBaseFileFactory.cs index 77a3fdffe..01a43dd1b 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/ServerPrimitiveDTOMappingServiceBaseFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/ServerPrimitiveDTOMappingServiceBaseFileFactory.cs @@ -68,9 +68,11 @@ protected override IEnumerable GetMembers() var contextParameter = this.Configuration.BLLContextTypeReference.ToParameterDeclarationExpression("context"); yield return new CodeConstructor - { - Attributes = MemberAttributes.Family, Parameters = { contextParameter }, BaseConstructorArgs = { contextParameter.ToVariableReferenceExpression() } - }; + { + Attributes = MemberAttributes.Family, + Parameters = { contextParameter }, + BaseConstructorArgs = { contextParameter.ToVariableReferenceExpression() } + }; @@ -96,16 +98,16 @@ private CodeMemberMethod GetToPersistentDomainObjectMethod() var domainObjectGenericParameter = new CodeTypeParameter { Name = "TDomainObject", Constraints = { this.Configuration.Environment.PersistentDomainObjectBaseType } }; var mappingObjectGenericParameter = new CodeTypeParameter - { - Name = "TMappingObject", - Constraints = + { + Name = "TMappingObject", + Constraints = { typeof(IMappingObject<,,>).ToTypeReference( mappingServiceTypeRef, domainObjectGenericParameter.ToTypeReference(), this.Configuration.Environment.GetIdentityType().ToTypeReference()) } - }; + }; var mappingObjectMethodParameter = mappingObjectGenericParameter.ToTypeReference().ToParameterDeclarationExpression("mappingObject"); @@ -119,12 +121,12 @@ private CodeMemberMethod GetToPersistentDomainObjectMethod() IdCheckMode.CheckAll.ToPrimitiveExpression())); return new CodeMemberMethod - { - Name = this.Configuration.ToDomainObjectMethodName, - Attributes = MemberAttributes.Family, - TypeParameters = { mappingObjectGenericParameter, domainObjectGenericParameter }, - Parameters = { mappingObjectMethodParameter }, - Statements = + { + Name = this.Configuration.ToDomainObjectMethodName, + Attributes = MemberAttributes.Family, + TypeParameters = { mappingObjectGenericParameter, domainObjectGenericParameter }, + Parameters = { mappingObjectMethodParameter }, + Statements = { domainObjectVariableStatement, new CodeThisReferenceExpression().ToMethodInvokeExpression( @@ -133,8 +135,8 @@ private CodeMemberMethod GetToPersistentDomainObjectMethod() domainObjectVariableStatement.ToVariableReferenceExpression()), domainObjectVariableStatement.ToVariableReferenceExpression().ToMethodReturnStatement() }, - ReturnType = domainObjectGenericParameter.ToTypeReference() - }; + ReturnType = domainObjectGenericParameter.ToTypeReference() + }; } private CodeMemberMethod GetToPersistentDomainObjectByFactoryMethod() @@ -144,16 +146,16 @@ private CodeMemberMethod GetToPersistentDomainObjectByFactoryMethod() var domainObjectGenericParameter = new CodeTypeParameter { Name = "TDomainObject", Constraints = { this.Configuration.Environment.PersistentDomainObjectBaseType } }; var mappingObjectGenericParameter = new CodeTypeParameter - { - Name = "TMappingObject", - Constraints = + { + Name = "TMappingObject", + Constraints = { typeof(IMappingObject<,,>).ToTypeReference( mappingServiceTypeRef, domainObjectGenericParameter.ToTypeReference(), this.Configuration.Environment.GetIdentityType().ToTypeReference()) } - }; + }; var mappingObjectMethodParameter = mappingObjectGenericParameter.ToTypeReference().ToParameterDeclarationExpression("mappingObject"); var createFuncParameter = typeof(Func<>).ToTypeReference(domainObjectGenericParameter.ToTypeReference()).ToParameterDeclarationExpression("createFunc"); @@ -168,12 +170,12 @@ private CodeMemberMethod GetToPersistentDomainObjectByFactoryMethod() createFuncParameter.ToVariableReferenceExpression())); return new CodeMemberMethod - { - Name = this.Configuration.ToDomainObjectMethodName, - Attributes = MemberAttributes.Family, - TypeParameters = { mappingObjectGenericParameter, domainObjectGenericParameter }, - Parameters = { mappingObjectMethodParameter, createFuncParameter }, - Statements = + { + Name = this.Configuration.ToDomainObjectMethodName, + Attributes = MemberAttributes.Family, + TypeParameters = { mappingObjectGenericParameter, domainObjectGenericParameter }, + Parameters = { mappingObjectMethodParameter, createFuncParameter }, + Statements = { domainObjectVariableStatement, new CodeThisReferenceExpression().ToMethodInvokeExpression( @@ -182,8 +184,8 @@ private CodeMemberMethod GetToPersistentDomainObjectByFactoryMethod() domainObjectVariableStatement.ToVariableReferenceExpression()), domainObjectVariableStatement.ToVariableReferenceExpression().ToMethodReturnStatement() }, - ReturnType = domainObjectGenericParameter.ToTypeReference() - }; + ReturnType = domainObjectGenericParameter.ToTypeReference() + }; } private CodeMemberMethod GetToDomainObjectBaseMethod() @@ -191,15 +193,17 @@ private CodeMemberMethod GetToDomainObjectBaseMethod() var mappingServiceTypeRef = this.Configuration.GetCodeTypeReference(null, ServerFileType.ServerDTOMappingServiceInterface); var domainObjectGenericParameter = new CodeTypeParameter - { - Name = "TDomainObject", Constraints = { this.Configuration.Environment.DomainObjectBaseType }, HasConstructorConstraint = true - }; + { + Name = "TDomainObject", + Constraints = { this.Configuration.Environment.DomainObjectBaseType }, + HasConstructorConstraint = true + }; var mappingObjectGenericParameter = new CodeTypeParameter - { - Name = "TMappingObject", - Constraints = { typeof(IMappingObject<,>).ToTypeReference(mappingServiceTypeRef, domainObjectGenericParameter.ToTypeReference()) } - }; + { + Name = "TMappingObject", + Constraints = { typeof(IMappingObject<,>).ToTypeReference(mappingServiceTypeRef, domainObjectGenericParameter.ToTypeReference()) } + }; var mappingObjectMethodParameter = mappingObjectGenericParameter.ToTypeReference().ToParameterDeclarationExpression("mappingObject"); @@ -210,12 +214,12 @@ private CodeMemberMethod GetToDomainObjectBaseMethod() domainObjectGenericParameter.ToTypeReference().ToObjectCreateExpression()); return new CodeMemberMethod - { - Name = this.Configuration.ToDomainObjectMethodName + "Base", - Attributes = MemberAttributes.Family, - TypeParameters = { mappingObjectGenericParameter, domainObjectGenericParameter }, - Parameters = { mappingObjectMethodParameter }, - Statements = + { + Name = this.Configuration.ToDomainObjectMethodName + "Base", + Attributes = MemberAttributes.Family, + TypeParameters = { mappingObjectGenericParameter, domainObjectGenericParameter }, + Parameters = { mappingObjectMethodParameter }, + Statements = { domainObjectVariableStatement, new CodeThisReferenceExpression().ToMethodInvokeExpression( @@ -224,8 +228,8 @@ private CodeMemberMethod GetToDomainObjectBaseMethod() domainObjectVariableStatement.ToVariableReferenceExpression()), domainObjectVariableStatement.ToVariableReferenceExpression().ToMethodReturnStatement() }, - ReturnType = domainObjectGenericParameter.ToTypeReference() - }; + ReturnType = domainObjectGenericParameter.ToTypeReference() + }; } private CodeMemberMethod GetMapToDomainObjectMethod() @@ -235,22 +239,22 @@ private CodeMemberMethod GetMapToDomainObjectMethod() var domainObjectGenericParameter = new CodeTypeParameter { Name = "TDomainObject", Constraints = { this.Configuration.Environment.DomainObjectBaseType } }; var mappingObjectGenericParameter = new CodeTypeParameter - { - Name = "TMappingObject", - Constraints = { typeof(IMappingObject<,>).ToTypeReference(mappingServiceTypeRef, domainObjectGenericParameter.ToTypeReference()) } - }; + { + Name = "TMappingObject", + Constraints = { typeof(IMappingObject<,>).ToTypeReference(mappingServiceTypeRef, domainObjectGenericParameter.ToTypeReference()) } + }; var mappingObjectMethodParameter = mappingObjectGenericParameter.ToTypeReference().ToParameterDeclarationExpression("mappingObject"); var domainObjectMethodParameter = domainObjectGenericParameter.ToTypeReference().ToParameterDeclarationExpression("domainObject"); return new CodeMemberMethod - { - Name = this.Configuration.MapToDomainObjectMethodName, - Attributes = MemberAttributes.Family, - TypeParameters = { mappingObjectGenericParameter, domainObjectGenericParameter }, - Parameters = { mappingObjectMethodParameter, domainObjectMethodParameter }, - Statements = + { + Name = this.Configuration.MapToDomainObjectMethodName, + Attributes = MemberAttributes.Family, + TypeParameters = { mappingObjectGenericParameter, domainObjectGenericParameter }, + Parameters = { mappingObjectMethodParameter, domainObjectMethodParameter }, + Statements = { mappingObjectMethodParameter.ToVariableReferenceExpression() .ToMethodInvokeExpression( @@ -258,7 +262,8 @@ private CodeMemberMethod GetMapToDomainObjectMethod() new CodeThisReferenceExpression(), domainObjectMethodParameter.ToVariableReferenceExpression()), }, - ReturnType = typeof(void).ToTypeReference() - }; + ReturnType = typeof(void).ToTypeReference() + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/ServerPrimitiveDTOMappingServiceFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/ServerPrimitiveDTOMappingServiceFileFactory.cs index d5b0465bf..cd74df613 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/ServerPrimitiveDTOMappingServiceFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Mapping/ServerPrimitiveDTOMappingServiceFileFactory.cs @@ -33,10 +33,11 @@ protected override IEnumerable GetMembers() var contextParameter = this.Configuration.BLLContextTypeReference.ToParameterDeclarationExpression("context"); yield return new CodeConstructor - { - Attributes = MemberAttributes.Public, - Parameters = {contextParameter}, - BaseConstructorArgs = {contextParameter.ToVariableReferenceExpression()} - }; + { + Attributes = MemberAttributes.Public, + Parameters = { contextParameter }, + BaseConstructorArgs = { contextParameter.ToVariableReferenceExpression() } + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/Base/EventDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/Base/EventDTOFileFactory.cs index 070f67240..03112433f 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/Base/EventDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/Base/EventDTOFileFactory.cs @@ -16,3 +16,4 @@ protected EventDTOFileFactory(TConfiguration configuration, Type domainType) protected override string DataContractNamespace => this.Configuration.EventDataContractNamespace; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultBaseEventDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultBaseEventDTOFileFactory.cs index 410f36cdc..c275446a2 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultBaseEventDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultBaseEventDTOFileFactory.cs @@ -1,5 +1,6 @@ using System.CodeDom; using System.Reflection; + using Framework.CodeGeneration.DTOGenerator.Extensions; using Framework.CodeGeneration.DTOGenerator.FileFactory.Base; using Framework.CodeGeneration.DTOGenerator.FileTypes; @@ -53,3 +54,4 @@ protected override CodeTypeDeclaration GetCodeTypeDeclaration() => TypeAttributes = TypeAttributes.Public | TypeAttributes.Abstract }; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultDomainOperationEventDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultDomainOperationEventDTOFileFactory.cs index d69491de1..3f5f9ca1d 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultDomainOperationEventDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultDomainOperationEventDTOFileFactory.cs @@ -53,23 +53,23 @@ protected override IEnumerable GetMembers() var fieldTypeRef = this.Configuration.GetCodeTypeReference(this.DomainType, ServerFileType.RichEventDTO); var field = new CodeMemberField - { - Type = fieldTypeRef, - Name = this.DomainType!.Name.ToStartLowerCase(), - Attributes = MemberAttributes.Private, - }; + { + Type = fieldTypeRef, + Name = this.DomainType!.Name.ToStartLowerCase(), + Attributes = MemberAttributes.Private, + }; var fieldMemberRef = new CodeThisReferenceExpression().ToFieldReference(field); var property = new CodeMemberProperty - { - Type = fieldTypeRef, - Name = this.DomainType.Name, - Attributes = MemberAttributes.Public | MemberAttributes.Final, - CustomAttributes = { new CodeAttributeDeclaration(new CodeTypeReference(typeof(DataMemberAttribute))) }, - GetStatements = { fieldMemberRef.ToMethodReturnStatement() }, - SetStatements = { new CodePropertySetValueReferenceExpression().ToAssignStatement(fieldMemberRef) } - }; + { + Type = fieldTypeRef, + Name = this.DomainType.Name, + Attributes = MemberAttributes.Public | MemberAttributes.Final, + CustomAttributes = { new CodeAttributeDeclaration(new CodeTypeReference(typeof(DataMemberAttribute))) }, + GetStatements = { fieldMemberRef.ToMethodReturnStatement() }, + SetStatements = { new CodePropertySetValueReferenceExpression().ToAssignStatement(fieldMemberRef) } + }; var mappingServiceParameter = this.GetMappingServiceParameter(); var mappingServiceParameterRefExpr = mappingServiceParameter.ToVariableReferenceExpression(); @@ -83,15 +83,16 @@ protected override IEnumerable GetMembers() yield return this.GenerateDefaultConstructor(); yield return new CodeConstructor - { - Attributes = MemberAttributes.Public, - Parameters = { mappingServiceParameter, domainTypeParameter }, - Statements = + { + Attributes = MemberAttributes.Public, + Parameters = { mappingServiceParameter, domainTypeParameter }, + Statements = { this.Configuration.GetConvertToDTOMethod(this.DomainType, ServerFileType.RichEventDTO) .ToMethodInvokeExpression(domainTypeParameterRefExp, mappingServiceParameterRefExpr) .ToAssignStatement(new CodeThisReferenceExpression().ToFieldReference(field)) } - }; + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultRichEventDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultRichEventDTOFileFactory.cs index de1d43919..483b2c549 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultRichEventDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultRichEventDTOFileFactory.cs @@ -9,3 +9,4 @@ public class DefaultRichEventDTOFileFactory(TConfiguration confi { public override DTOFileType FileType { get; } = ServerFileType.RichEventDTO; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultSimpleEventDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultSimpleEventDTOFileFactory.cs index afdf749d2..cb6d2b939 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultSimpleEventDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/EventDTO/DefaultSimpleEventDTOFileFactory.cs @@ -9,3 +9,4 @@ public class DefaultSimpleEventDTOFileFactory(TConfiguration con { public override DTOFileType FileType { get; } = ServerFileType.SimpleEventDTO; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/IntegrationDTO/Base/IntegrationDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/IntegrationDTO/Base/IntegrationDTOFileFactory.cs index 0eb1949c3..dff7148be 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/IntegrationDTO/Base/IntegrationDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/IntegrationDTO/Base/IntegrationDTOFileFactory.cs @@ -66,3 +66,4 @@ protected override IEnumerable GetMembers() } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/IntegrationDTO/DefaultRichIntegrationDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/IntegrationDTO/DefaultRichIntegrationDTOFileFactory.cs index eef028cf5..09a549f83 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/IntegrationDTO/DefaultRichIntegrationDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/IntegrationDTO/DefaultRichIntegrationDTOFileFactory.cs @@ -36,3 +36,4 @@ public override IEnumerable GetServerMappingServiceMethods() } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/IntegrationDTO/DefaultSimpleIntegrationDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/IntegrationDTO/DefaultSimpleIntegrationDTOFileFactory.cs index 8672ad93a..1e8994bbe 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/IntegrationDTO/DefaultSimpleIntegrationDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/IntegrationDTO/DefaultSimpleIntegrationDTOFileFactory.cs @@ -15,3 +15,4 @@ public class DefaultSimpleIntegrationDTOFileFactory(TConfigurati protected override bool AllowCreate { get; } = false; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/RoleDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/RoleDTOFileFactory.cs index 7b9305a1d..6ef770fbc 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/RoleDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileFactory/Role/RoleDTOFileFactory.cs @@ -1,5 +1,6 @@ using System.CodeDom; using System.Reflection; + using Framework.CodeGeneration.DTOGenerator.FileFactory; using Framework.CodeGeneration.DTOGenerator.FileTypes; using Framework.CodeGeneration.DTOGenerator.PropertyAssigner; @@ -44,3 +45,4 @@ protected override IEnumerable GetMembers() yield return this.GenerateFromDomainObjectConstructor(this.MapDomainObjectToMappingObjectPropertyAssigner); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileType/DomainOperationEventDTOFileType.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileType/DomainOperationEventDTOFileType.cs index dff749b5e..385b32c1a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileType/DomainOperationEventDTOFileType.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileType/DomainOperationEventDTOFileType.cs @@ -8,3 +8,4 @@ public record DomainOperationEventDTOFileType(EventOperation EventOperation) : D { protected override string InternalToString() => $"{this.Name} ({this.EventOperation.Name})"; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileType/FileTypeExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileType/FileTypeExtensions.cs index 1ce8cbf42..71f91835c 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileType/FileTypeExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/FileType/FileTypeExtensions.cs @@ -11,3 +11,4 @@ public static bool NeedMappingServiceForConvert(this BaseFileType fileType) return fileType != BaseFileType.IdentityDTO; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/GeneratePolicy/AttributeGeneratePolicy.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/GeneratePolicy/AttributeGeneratePolicy.cs index 5c09d5a68..02c4a00f3 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/GeneratePolicy/AttributeGeneratePolicy.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/GeneratePolicy/AttributeGeneratePolicy.cs @@ -3,8 +3,8 @@ using Framework.CodeGeneration.DTOGenerator.FileTypes; using Framework.CodeGeneration.GeneratePolicy; using Framework.Core; -using Framework.Projection; using Framework.ExtendedMetadata; +using Framework.Projection; namespace Framework.CodeGeneration.DTOGenerator.Server.GeneratePolicy; @@ -54,3 +54,4 @@ public virtual bool Used(Type domainType, RoleFileType fileType) } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/GeneratePolicy/ServerAttributeGeneratePolicy.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/GeneratePolicy/ServerAttributeGeneratePolicy.cs index 5f34334e5..974bc67fa 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/GeneratePolicy/ServerAttributeGeneratePolicy.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/GeneratePolicy/ServerAttributeGeneratePolicy.cs @@ -30,3 +30,4 @@ public override bool Used(Type domainType, RoleFileType fileType) } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/GeneratePolicy/ServerDependencyGeneratePolicy.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/GeneratePolicy/ServerDependencyGeneratePolicy.cs index 1def0eeb1..a8d602180 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/GeneratePolicy/ServerDependencyGeneratePolicy.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/GeneratePolicy/ServerDependencyGeneratePolicy.cs @@ -48,3 +48,4 @@ protected override bool InternalUsed(Type domainType, RoleFileType fileType) } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Members/MapToDomainObject/BaseMapToDomainObjectMethodFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Members/MapToDomainObject/BaseMapToDomainObjectMethodFactory.cs index 2b3ec6092..d0da1b8a9 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Members/MapToDomainObject/BaseMapToDomainObjectMethodFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Members/MapToDomainObject/BaseMapToDomainObjectMethodFactory.cs @@ -62,3 +62,4 @@ protected virtual IEnumerable GetMapMethodCodeStatements() .ToExpressionStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Members/MapToDomainObject/MainMapToDomainObjectMethodFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Members/MapToDomainObject/MainMapToDomainObjectMethodFactory.cs index 44a5b1cdc..13dfcc1f0 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Members/MapToDomainObject/MainMapToDomainObjectMethodFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/Members/MapToDomainObject/MainMapToDomainObjectMethodFactory.cs @@ -29,3 +29,4 @@ protected override IEnumerable GetMapMethodCodeStatements() } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/DTOToDomainObjectPropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/DTOToDomainObjectPropertyAssigner.cs index c9255b08f..f0d18a8a3 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/DTOToDomainObjectPropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/DTOToDomainObjectPropertyAssigner.cs @@ -79,33 +79,33 @@ public override CodeStatement GetAssignStatement(PropertyInfo property, CodeExpr return new CodeConditionStatement - { - Condition = new CodeObjectEqualsExpression(sourcePropertyRef, propertyTypeRefExpr.ToDefaultValueExpression()).ToNegateExpression(), + { + Condition = new CodeObjectEqualsExpression(sourcePropertyRef, propertyTypeRefExpr.ToDefaultValueExpression()).ToNegateExpression(), - TrueStatements = + TrueStatements = { getToDomainObjectExpr(sourcePropertyRef, property.PropertyType, property.IsDetail()).ToAssignStatement(targetPropertyRef) }, - FalseStatements = + FalseStatements = { new CodePrimitiveExpression(null).ToAssignStatement(targetPropertyRef) } - }; + }; } else { return new CodeNotNullConditionStatement(sourcePropertyRef) - { - TrueStatements = + { + TrueStatements = { getToDomainObjectExpr (sourcePropertyRef, property.PropertyType, property.IsDetail()).ToAssignStatement(targetPropertyRef) }, - FalseStatements = + FalseStatements = { new CodePrimitiveExpression(null).ToAssignStatement(targetPropertyRef) } - }; + }; } } else if (this.Configuration.IsCollectionProperty(property)) @@ -120,8 +120,8 @@ public override CodeStatement GetAssignStatement(PropertyInfo property, CodeExpr } return new CodeNotNullConditionStatement(sourcePropertyRef) - { - TrueStatements = + { + TrueStatements = { typeof(CoreEnumerableExtensions).ToTypeReferenceExpression() .ToMethodInvokeExpression( @@ -133,7 +133,7 @@ public override CodeStatement GetAssignStatement(PropertyInfo property, CodeExpr Statements = { getToDomainObjectExpr(lamdaParam.ToVariableReferenceExpression(), elementType, property.IsDetail()) } })).ToAssignStatement(targetPropertyRef) } - }; + }; } else { @@ -145,33 +145,33 @@ public override CodeStatement GetAssignStatement(PropertyInfo property, CodeExpr var transferElementTypeRef = this.Configuration.GetCodeTypeReference(elementType, this.CodeTypeReferenceService.GetCollectionFileType(property)); var createDetailLambda = new CodeParameterDeclarationExpression { Name = "detailDTO" }.Pipe(lambdaParam => new CodeLambdaExpression - { - Parameters = { lambdaParam }, - Statements = { getToDomainObjectExpr(lambdaParam.ToVariableReferenceExpression(), elementType, true) } - }); + { + Parameters = { lambdaParam }, + Statements = { getToDomainObjectExpr(lambdaParam.ToVariableReferenceExpression(), elementType, true) } + }); var removeDetailLambda = this.Configuration.UseRemoveMappingExtension ? (CodeExpression)new CodeParameterDeclarationExpression { Name = "detail" }.Pipe(lamdaParam => new CodeLambdaExpression - { - Parameters = { lamdaParam }, - Statements = { typeof(AddRemoveDetailHelper).ToTypeReferenceExpression() + { + Parameters = { lamdaParam }, + Statements = { typeof(AddRemoveDetailHelper).ToTypeReferenceExpression() .ToMethodReferenceExpression("RemoveDetail", property.DeclaringType.ToTypeReference(), elementType.ToTypeReference()) .ToMethodInvokeExpression(this.DomainParameter.ToVariableReferenceExpression(), lamdaParam.ToVariableReferenceExpression()) } - }) + }) : this.DomainParameter.ToVariableReferenceExpression().ToPropertyReference("Remove" + elementType.Name); return new CodeNotNullConditionStatement(sourcePropertyRef) - { - TrueStatements = + { + TrueStatements = { this.GetCollectionMappingMethodReferenceExpression(transferElementTypeRef, elementType) .ToMethodInvokeExpression(createDetailLambda, removeDetailLambda) .ToMethodInvokeExpression("Map", sourcePropertyRef, targetPropertyRef) } - }; + }; } } @@ -264,3 +264,4 @@ private CodeStatement GetFixReferenceMappingStatement(PropertyInfo property, Cod return statement; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/DTOToDomainObjectUpdatePropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/DTOToDomainObjectUpdatePropertyAssigner.cs index 683194b1a..ddac87899 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/DTOToDomainObjectUpdatePropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/DTOToDomainObjectUpdatePropertyAssigner.cs @@ -17,3 +17,4 @@ protected override CodeMethodReferenceExpression GetCollectionMappingMethodRefer this.Configuration.GetCodeTypeReference(elementType, DTOType.IdentityDTO), elementType.ToTypeReference()); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/DomainObjectToDTOPropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/DomainObjectToDTOPropertyAssigner.cs index df0518b22..14fb00863 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/DomainObjectToDTOPropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/DomainObjectToDTOPropertyAssigner.cs @@ -29,18 +29,18 @@ public override CodeStatement GetAssignStatement(PropertyInfo property, CodeExpr : new[] { sourcePropertyRef }; return new CodeNotNullConditionStatement(sourcePropertyRef) - { - TrueStatements = + { + TrueStatements = { this.Configuration.GetConvertToDTOMethod(property.PropertyType, referenceFileType) .ToMethodInvokeExpression(convertArguments) .ToAssignStatement(targetPropertyRef) }, - FalseStatements = + FalseStatements = { new CodePrimitiveExpression(null).ToAssignStatement(targetPropertyRef) } - }; + }; } if (this.Configuration.IsCollectionProperty(property)) @@ -60,3 +60,4 @@ public override CodeStatement GetAssignStatement(PropertyInfo property, CodeExpr return sourcePropertyRef.ToAssignStatement(targetPropertyRef); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/IPropertyAssignerConfigurator.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/IPropertyAssignerConfigurator.cs index 472a87305..5df5fefb5 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/IPropertyAssignerConfigurator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/IPropertyAssignerConfigurator.cs @@ -10,3 +10,4 @@ public interface IPropertyAssignerConfigurator IPropertyAssigner GetDomainObjectToSecurityPropertyAssigner(IPropertyAssigner innerAssigner); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/IServerPropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/IServerPropertyAssigner.cs index 5ad73206b..ac4d2c4c0 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/IServerPropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/IServerPropertyAssigner.cs @@ -1,4 +1,5 @@ using System.CodeDom; + using Framework.CodeDom.Extensions; using Framework.CodeGeneration.DTOGenerator.FileFactory.Base; using Framework.CodeGeneration.DTOGenerator.PropertyAssigner; @@ -27,3 +28,4 @@ public abstract class ServerPropertyAssigner(IDTOSource this.DomainType.GetDomainObjectParameter(); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/PropertyAssignerConfigurator.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/PropertyAssignerConfigurator.cs index cb938b142..f0d644983 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/PropertyAssignerConfigurator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/PropertyAssignerConfigurator.cs @@ -2,6 +2,7 @@ using System.Reflection; using Anch.Core; + using Framework.BLL.Domain.Attributes; using Framework.BLL.Domain.Extensions; using Framework.CodeGeneration.DTOGenerator.Server.Configuration; @@ -40,3 +41,4 @@ private DomainObjectAccessAttribute GetDomainObjectAttribute(IServerPropertyAssi } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/PropertyAssignerConfiguratorBase.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/PropertyAssignerConfiguratorBase.cs index b7b12498e..534340168 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/PropertyAssignerConfiguratorBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/PropertyAssignerConfiguratorBase.cs @@ -1,5 +1,6 @@ using System.CodeDom; using System.Reflection; + using Framework.CodeGeneration.DTOGenerator.PropertyAssigner; using Framework.CodeGeneration.DTOGenerator.Server.Configuration; using Framework.CodeGeneration.DTOGenerator.Server.PropertyAssigner.Security.DomainObjectToSecurity; @@ -88,3 +89,4 @@ private class ExpandMaybeSecurityToDomainObjectPropertyAssigner( protected override CodeExpression GetCondition(PropertyInfo property) => this.propertyAssignerConfigurator.GetPropertyHasAccessCondition(this, property, true); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/DomainObjectToSecurity/DomainObjectToSecurityPropertyAssignerBase.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/DomainObjectToSecurity/DomainObjectToSecurityPropertyAssignerBase.cs index 01cdabca1..19f3ea34f 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/DomainObjectToSecurity/DomainObjectToSecurityPropertyAssignerBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/DomainObjectToSecurity/DomainObjectToSecurityPropertyAssignerBase.cs @@ -40,20 +40,21 @@ protected sealed override CodeStatement GetSecurityAssignStatement(PropertyInfo return new CodeConditionStatement - { - Condition = this.GetCondition(property, false), + { + Condition = this.GetCondition(property, false), - TrueStatements = + TrueStatements = { resultVarDecl, this.InnerAssigner.GetAssignStatement(property, sourcePropertyRef, resultVarDeclRef), this.GetCreateSecurityValueExpression(property, resultVarDeclRef).ToAssignStatement(targetPropertyRef) }, - FalseStatements = + FalseStatements = { targetPropertyTypeRef.ToNothingValueExpression().ToAssignStatement(targetPropertyRef) } - }; + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/ExpandMaybe/ExpandMaybeSecurityToDomainObjectPropertyAssignerBase.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/ExpandMaybe/ExpandMaybeSecurityToDomainObjectPropertyAssignerBase.cs index 1eab7c3ef..37254e540 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/ExpandMaybe/ExpandMaybeSecurityToDomainObjectPropertyAssignerBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/ExpandMaybe/ExpandMaybeSecurityToDomainObjectPropertyAssignerBase.cs @@ -24,9 +24,9 @@ protected override CodeStatement GetSecurityAssignStatement(PropertyInfo propert var sourcePropertyTypeRef = this.CodeTypeReferenceService.GetCodeTypeReference(property); return new CodeConditionStatement - { - Condition = new CodeValueEqualityOperatorExpression(sourcePropertyRef, new CodeDefaultValueExpression(sourcePropertyTypeRef)).ToNegateExpression(), - TrueStatements = + { + Condition = new CodeValueEqualityOperatorExpression(sourcePropertyRef, new CodeDefaultValueExpression(sourcePropertyTypeRef)).ToNegateExpression(), + TrueStatements = { new CodeConditionStatement { @@ -41,6 +41,7 @@ protected override CodeStatement GetSecurityAssignStatement(PropertyInfo propert new CodePrimitiveExpression($"Access for write to field \"{property.Name}\" denied"))) } } } - }; + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/ExpandMaybe/ExpandMaybeSecurityToSecurityPropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/ExpandMaybe/ExpandMaybeSecurityToSecurityPropertyAssigner.cs index 438f14dd6..617b2c146 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/ExpandMaybe/ExpandMaybeSecurityToSecurityPropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/ExpandMaybe/ExpandMaybeSecurityToSecurityPropertyAssigner.cs @@ -12,7 +12,7 @@ namespace Framework.CodeGeneration.DTOGenerator.Server.PropertyAssigner.Security.ExpandMaybe; -public class ExpandMaybeSecurityToSecurityPropertyAssigner : MaybePropertyAssigner +public class ExpandMaybeSecurityToSecurityPropertyAssigner : MaybePropertyAssigner where TConfiguration : class, IServerDTOGeneratorConfiguration { private readonly IPropertyCodeTypeReferenceService sourceTypeReferenceService; @@ -41,14 +41,15 @@ protected override CodeStatement GetSecurityAssignStatement(PropertyInfo propert var resultVarDeclRef = new CodeVariableReferenceExpression(resultVarDecl.Name); return new CodeConditionStatement(sourcePropertyRef.ToPropertyReference(nameof(Maybe<>.HasValue))) - { - TrueStatements = + { + TrueStatements = { resultVarDecl, this.InnerAssigner.GetAssignStatement(property, sourcePropertyRef.ToPropertyReference(nameof(Maybe<>.Value)), resultVarDeclRef), resultVarDeclRef.ToAssignStatement(targetPropertyRef) }, - FalseStatements = { new CodeDefaultValueExpression(targetPropertyTypeRef).ToAssignStatement(targetPropertyRef) } - }; + FalseStatements = { new CodeDefaultValueExpression(targetPropertyTypeRef).ToAssignStatement(targetPropertyRef) } + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityServerPropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityServerPropertyAssigner.cs index fe18bba18..dd8256d8c 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityServerPropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityServerPropertyAssigner.cs @@ -18,3 +18,4 @@ public abstract class SecurityServerPropertyAssigner(IPropertyAs public CodeParameterDeclarationExpression DomainParameter => this.DomainType.GetDomainObjectParameter(); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityToDomainObject/MaybeSecurityToDomainObjectPropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityToDomainObject/MaybeSecurityToDomainObjectPropertyAssigner.cs index 5dd21b9ab..02f1f6ff8 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityToDomainObject/MaybeSecurityToDomainObjectPropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityToDomainObject/MaybeSecurityToDomainObjectPropertyAssigner.cs @@ -33,3 +33,4 @@ protected sealed override CodeStatement GetSecurityAssignStatement(PropertyInfo } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityToDomainObject/Strict/StrictToDomainObjectPropertyAssignerBase.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityToDomainObject/Strict/StrictToDomainObjectPropertyAssignerBase.cs index 246f2421b..3ff3ed139 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityToDomainObject/Strict/StrictToDomainObjectPropertyAssignerBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityToDomainObject/Strict/StrictToDomainObjectPropertyAssignerBase.cs @@ -23,8 +23,8 @@ protected override CodeStatement GetSecurityAssignStatementInternal(PropertyInfo if (innerAssignStatement == null) throw new ArgumentNullException(nameof(innerAssignStatement)); return new CodeConditionStatement(justValueRefExpr.ToPropertyReference(nameof(Maybe<>.HasValue))) - { - TrueStatements = + { + TrueStatements = { new CodeConditionStatement { @@ -36,6 +36,7 @@ protected override CodeStatement GetSecurityAssignStatementInternal(PropertyInfo new CodePrimitiveExpression($"Access for write to field \"{property.Name}\" denied"))) } } } - }; + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityToDomainObject/Update/UpdateToDomainObjectPropertyAssignerBase.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityToDomainObject/Update/UpdateToDomainObjectPropertyAssignerBase.cs index 8cac2c829..67f01e599 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityToDomainObject/Update/UpdateToDomainObjectPropertyAssignerBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/PropertyAssigner/Security/SecurityToDomainObject/Update/UpdateToDomainObjectPropertyAssignerBase.cs @@ -31,8 +31,8 @@ protected sealed override CodeStatement GetSecurityAssignStatementInternal(Prope var editAttr = configuration.Environment.MetadataProxyProvider.Wrap(property).GetEditDomainObjectAttribute(); return new CodeConditionStatement(justValueRefExpr.ToPropertyReference(nameof(Maybe<>.HasValue))) - { - TrueStatements = + { + TrueStatements = { editAttr == null ? innerAssignStatement : new CodeConditionStatement { @@ -50,6 +50,7 @@ protected sealed override CodeStatement GetSecurityAssignStatementInternal(Prope } } } - }; + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/ServerFileGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/ServerFileGenerator.cs index a0d1ce538..f1f836d1d 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/ServerFileGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/ServerFileGenerator.cs @@ -125,3 +125,4 @@ protected override IEnumerable> GetDTOFileGenerato } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/ServerFileType.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/ServerFileType.cs index 9011e6df0..8ed2c4e75 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/ServerFileType.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator.Server/ServerFileType.cs @@ -26,3 +26,4 @@ public static class ServerFileType public static BaseFileType ServerPrimitiveDTOMappingServiceBase { get; } = new(nameof(ServerPrimitiveDTOMappingServiceBase)); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/CodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/CodeTypeReferenceService.cs index ee574db4a..26ff11a4d 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/CodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/CodeTypeReferenceService.cs @@ -32,3 +32,4 @@ public virtual RoleFileType GetFileType(PropertyInfo property) return null; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/ConfigurationCodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/ConfigurationCodeTypeReferenceService.cs index 8c1220cf5..aa2d2d92a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/ConfigurationCodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/ConfigurationCodeTypeReferenceService.cs @@ -15,3 +15,4 @@ public override CodeTypeReference GetCodeTypeReferenceByType(Type type) return type.ToTypeReference(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/DisableSecurityCodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/DisableSecurityCodeTypeReferenceService.cs index 70b8dfe92..509acacf4 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/DisableSecurityCodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/DisableSecurityCodeTypeReferenceService.cs @@ -9,3 +9,4 @@ public class DisableSecurityCodeTypeReferenceService(TConfigurat { public override bool IsOptional(PropertyInfo property) => false; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/FixedCodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/FixedCodeTypeReferenceService.cs index b86405204..d5cf91e58 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/FixedCodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/FixedCodeTypeReferenceService.cs @@ -33,3 +33,4 @@ public FixedCodeTypeReferenceService(TConfiguration configuration, RoleFileType public override RoleFileType GetCollectionFileType(PropertyInfo _) => this.collectionFileType; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/ICodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/ICodeTypeReferenceService.cs index 8f4ffce4a..569c21c67 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/ICodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/ICodeTypeReferenceService.cs @@ -11,3 +11,4 @@ public interface ICodeTypeReferenceService RoleFileType GetFileType(PropertyInfo property); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/ILayerCodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/ILayerCodeTypeReferenceService.cs index 66e85b69b..4818600af 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/ILayerCodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/ILayerCodeTypeReferenceService.cs @@ -72,3 +72,4 @@ protected override CodeTypeReference GetCodeTypeReferenceByProperty(PropertyInfo } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/IPropertyCodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/IPropertyCodeTypeReferenceService.cs index aa00d4775..f95f4a694 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/IPropertyCodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/Base/IPropertyCodeTypeReferenceService.cs @@ -57,3 +57,4 @@ protected virtual CodeTypeReference GetCodeTypeReferenceByProperty(PropertyInfo return this.GetCodeTypeReferenceByType(property.PropertyType); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/DynamicCodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/DynamicCodeTypeReferenceService.cs index a347c0dda..c88b224d1 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/DynamicCodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/DynamicCodeTypeReferenceService.cs @@ -60,3 +60,4 @@ public override RoleFileType GetCollectionFileType(PropertyInfo property) return this.detailFileType; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/MainCodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/MainCodeTypeReferenceService.cs index ae1637df1..439415dcf 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/MainCodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/MainCodeTypeReferenceService.cs @@ -9,3 +9,4 @@ public class MainCodeTypeReferenceService(TConfiguration configu { public override Type CollectionType => this.Configuration.ClientEditCollectionType; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/ProjectionCodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/ProjectionCodeTypeReferenceService.cs index 730122426..8fe95a0e6 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/ProjectionCodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/ProjectionCodeTypeReferenceService.cs @@ -41,3 +41,4 @@ public override RoleFileType GetCollectionFileType(PropertyInfo property) } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/StrictCodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/StrictCodeTypeReferenceService.cs index e32e74ab2..4ed5a580a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/StrictCodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/StrictCodeTypeReferenceService.cs @@ -29,3 +29,4 @@ public override RoleFileType GetCollectionFileType(PropertyInfo property) : BaseFileType.StrictDTO; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/UpdateCodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/UpdateCodeTypeReferenceService.cs index 8cbec9563..7180ae2eb 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/UpdateCodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/CodeTypeReferenceService/UpdateCodeTypeReferenceService.cs @@ -50,3 +50,4 @@ protected override CodeTypeReference GetCollectionCodeTypeReference(Type element return typeof(UpdateItemData<,>).ToTypeReference(elementTypeRef, identityTypeRef).ToCollectionReference(this.Configuration.CollectionType); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/DTOGeneratorConfigurationBase.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/DTOGeneratorConfigurationBase.cs index 299c9b75e..81dafb94c 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/DTOGeneratorConfigurationBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/DTOGeneratorConfigurationBase.cs @@ -34,7 +34,7 @@ public abstract class DTOGeneratorConfigurationBase : CodeGenerato { private readonly IDictionaryCache, ReadOnlyCollection> domainTypePropertiesCache; - private static readonly ImmutableArray MainDTOFileTypes = [..typeof(BaseFileType).GetStaticPropertyValueList()]; + private static readonly ImmutableArray MainDTOFileTypes = [.. typeof(BaseFileType).GetStaticPropertyValueList()]; private static readonly ConcurrentDictionary> NestedMainTypesCache = []; @@ -125,7 +125,7 @@ public IEnumerable GetNestedTypes(MainDTOFileType fileType) => { var children = MainDTOFileTypes.Where(dtoType => dtoType.BaseType == fileType); - return [..children.GetAllElements(this.GetNestedTypes)]; + return [.. children.GetAllElements(this.GetNestedTypes)]; }); public virtual bool ForceGenerateProperties(Type domainType, DTOFileType fileType) @@ -448,3 +448,4 @@ protected virtual IEnumerable GetProjectionTypes() => .SelectMany(projectionEnvironment => projectionEnvironment.Assembly.GetTypes()) .Where(type => this.Environment.MetadataProxyProvider.Wrap(type).HasAttribute(attr => attr.Role == ProjectionRole.Default)); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/DTOGeneratorConfigurationExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/DTOGeneratorConfigurationExtensions.cs index e508f13ca..12a190a51 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/DTOGeneratorConfigurationExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/DTOGeneratorConfigurationExtensions.cs @@ -102,3 +102,4 @@ public static CodeTypeReference GetCodeTypeReference(this IDTOGeneratorConfigura return configuration.GetCodeTypeReference(domainType, dtoType); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/IDTOGenerationEnvironment.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/IDTOGenerationEnvironment.cs index 2eab0bcab..c6474f14f 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/IDTOGenerationEnvironment.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/IDTOGenerationEnvironment.cs @@ -3,3 +3,4 @@ namespace Framework.CodeGeneration.DTOGenerator.Configuration; public interface IDTOGenerationEnvironment : ICodeGenerationEnvironment; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/IDTOGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/IDTOGeneratorConfiguration.cs index 5c1300530..2e0b729cf 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/IDTOGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Configuration/IDTOGeneratorConfiguration.cs @@ -59,3 +59,4 @@ CodeExpression GetCreateUpdateDTOExpression( //GenerateTypeMap GetTypeMap(Type domainType, DTOFileType fileType); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Extensions/CodeDomExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Extensions/CodeDomExtensions.cs index ec841f37a..2b26110cd 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Extensions/CodeDomExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Extensions/CodeDomExtensions.cs @@ -17,3 +17,4 @@ public static CodeTypeReference GetIdentityObjectTypeRef(this IF return typeof(IIdentityObject<>).ToTypeReference(fileFactory.Configuration.Environment.GetIdentityType().ToTypeReference()); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Extensions/DTOSourceExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Extensions/DTOSourceExtensions.cs index 8a46b85b0..9d07633cc 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Extensions/DTOSourceExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Extensions/DTOSourceExtensions.cs @@ -14,3 +14,4 @@ public static bool IsPersistent(this IDTOSource return source.Configuration.IsPersistentObject(source.DomainType); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Extensions/GetCodeTypeReferenceExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Extensions/GetCodeTypeReferenceExtensions.cs index 468b118c8..aed95dda2 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Extensions/GetCodeTypeReferenceExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Extensions/GetCodeTypeReferenceExtensions.cs @@ -12,3 +12,4 @@ public static CodeAttributeDeclaration ToKnownTypeCodeAttributeDeclaration(this typeof(KnownTypeAttribute).ToTypeReference(), new CodeAttributeArgument(codeTypeReference.ToTypeOfExpression())); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/Base/FileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/Base/FileFactory.cs index efab7d280..05b71b516 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/Base/FileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/Base/FileFactory.cs @@ -41,3 +41,4 @@ protected CodeAttributeDeclaration GetDataContractCodeAttributeDeclaration(strin }.Where(v => v != null).ToArray()); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/Base/IDTOSource.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/Base/IDTOSource.cs index 6cd9be82c..2f848442c 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/Base/IDTOSource.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/Base/IDTOSource.cs @@ -12,3 +12,4 @@ public interface IDTOSource : IDomainTypeContainer//, IFileTypeSource : IDTOSource, IFileGeneratorConfigurationContainer where TConfiguration : class, IDTOGeneratorConfiguration; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/Base/IFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/Base/IFileFactory.cs index 13f0e1507..57629b81b 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/Base/IFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/Base/IFileFactory.cs @@ -19,3 +19,4 @@ public interface IFileFactory : ICodeFileFactory IPropertyCodeTypeReferenceService CodeTypeReferenceService { get; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/BaseCodeDomHelper.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/BaseCodeDomHelper.cs index 0d66eae50..a4f937012 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/BaseCodeDomHelper.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/BaseCodeDomHelper.cs @@ -2,6 +2,7 @@ using System.Runtime.Serialization; using Anch.Core; + using Framework.Application.Domain; using Framework.BLL.Domain.DTO; using Framework.BLL.Domain.IdentityObject; @@ -28,9 +29,9 @@ public static CodeConstructor GenerateDefaultConstructor(this IF if (fileFactory == null) throw new ArgumentNullException(nameof(fileFactory)); return new CodeConstructor - { - Attributes = ((fileFactory as IFileTypeSource).Maybe(s => s.FileType.IsAbstract) || fileFactory.DomainType.IsAbstractDTO() ? MemberAttributes.Family : MemberAttributes.Public) | MemberAttributes.Override, - }; + { + Attributes = ((fileFactory as IFileTypeSource).Maybe(s => s.FileType.IsAbstract) || fileFactory.DomainType.IsAbstractDTO() ? MemberAttributes.Family : MemberAttributes.Public) | MemberAttributes.Override, + }; } public static CodeMemberMethod GenerateIdConstructor(this IFileFactory fileFactory) @@ -41,23 +42,23 @@ public static CodeMemberMethod GenerateIdConstructor(this IFileF var idParameter = new CodeParameterDeclarationExpression(typeof(string), "id"); return new CodeConstructor - { - Attributes = MemberAttributes.Public, - Parameters = { idParameter }, - Statements = + { + Attributes = MemberAttributes.Public, + Parameters = { idParameter }, + Statements = { typeof(Guid).ToTypeReference() .ToObjectCreateExpression(idParameter.ToVariableReferenceExpression()) .ToAssignStatement(new CodeThisReferenceExpression().ToPropertyReference(fileFactory.Configuration.Environment.IdentityProperty)) } - }; + }; } public static IEnumerable GenerateStrictConstructors(this IDTOSource source) where TConfiguration : class, IDTOGeneratorConfiguration => source.GetActualStrictConstructorFileTypes() .Concat([null]) - .Windowed2((fileType, baseFileType) => new[] { false, true}.Select(withoutMappingParameter => source.GenerateStrictConstructor(fileType, baseFileType, withoutMappingParameter))) + .Windowed2((fileType, baseFileType) => new[] { false, true }.Select(withoutMappingParameter => source.GenerateStrictConstructor(fileType, baseFileType, withoutMappingParameter))) .SelectMany(); public static IEnumerable GetStrictConstructorFileTypes(this IDTOSource source) @@ -98,11 +99,11 @@ private static CodeConstructor GenerateStrictConstructor(this ID if (withoutMappingParameter) { return new CodeConstructor - { - Parameters = { sourceTypeParameter }, - Attributes = sourceFileType.IsAbstract ? MemberAttributes.Private : MemberAttributes.Public, - ChainedConstructorArgs = { sourceTypeParameterRefExpr, source.Configuration.GetDefaultClientDTOMappingServiceExpression() } - }; + { + Parameters = { sourceTypeParameter }, + Attributes = sourceFileType.IsAbstract ? MemberAttributes.Private : MemberAttributes.Public, + ChainedConstructorArgs = { sourceTypeParameterRefExpr, source.Configuration.GetDefaultClientDTOMappingServiceExpression() } + }; } else { @@ -112,15 +113,15 @@ private static CodeConstructor GenerateStrictConstructor(this ID var mapName = $"Map{sourceFileType.ShortName}To{source.FileType.ShortName}For{source.DomainType.Name}"; var constructor = new CodeConstructor - { - Parameters = { sourceTypeParameter, mappingServiceParameter }, - Attributes = sourceFileType.IsAbstract ? MemberAttributes.Private : MemberAttributes.Public, - Statements = + { + Parameters = { sourceTypeParameter, mappingServiceParameter }, + Attributes = sourceFileType.IsAbstract ? MemberAttributes.Private : MemberAttributes.Public, + Statements = { new CodeThrowArgumentNullExceptionConditionStatement(mappingServiceParameter), mappingServiceParameterRefExpr.ToMethodInvokeExpression(mapName, new CodeThisReferenceExpression(), sourceTypeParameterRefExpr) } - }; + }; if (baseFileType != null) { @@ -160,11 +161,11 @@ public static CodeConstructor GenerateUpdateFromDiffStrictConstructor( if (withoutMappingParameter) { return new CodeConstructor - { - Parameters = { currentSourceTypeParameter }, - Attributes = MemberAttributes.Public, - ChainedConstructorArgs = { currentSourceTypeParameterRefExpr, fileFactory.Configuration.GetDefaultClientDTOMappingServiceExpression() } - }; + { + Parameters = { currentSourceTypeParameter }, + Attributes = MemberAttributes.Public, + ChainedConstructorArgs = { currentSourceTypeParameterRefExpr, fileFactory.Configuration.GetDefaultClientDTOMappingServiceExpression() } + }; } else { @@ -210,15 +211,15 @@ public static CodeConstructor GenerateUpdateFromStrictConstructor( var mappingServiceParameterRefExpr = mappingServiceParameter.ToVariableReferenceExpression(); return new CodeConstructor - { - Parameters = { currentSourceTypeParameter, mappingServiceParameter }, - Attributes = MemberAttributes.Public, - Statements = + { + Parameters = { currentSourceTypeParameter, mappingServiceParameter }, + Attributes = MemberAttributes.Public, + Statements = { new CodeThrowArgumentNullExceptionConditionStatement(mappingServiceParameter), mappingServiceParameterRefExpr.ToMethodInvokeExpression($"Map{fileFactory.DomainType.Name}", new CodeThisReferenceExpression(), currentSourceTypeParameterRefExpr) } - }; + }; } } @@ -248,17 +249,17 @@ public static CodeMemberProperty GetIdentityObjectContainerImplementation).ToTypeReference(identityRef); return new CodeMemberProperty - { - Attributes = MemberAttributes.Public | MemberAttributes.Final, - Name = "Identity", - Type = identityRef, - PrivateImplementationType = internalImplementation ? identityImplRef : null, - GetStatements = + { + Attributes = MemberAttributes.Public | MemberAttributes.Final, + Name = "Identity", + Type = identityRef, + PrivateImplementationType = internalImplementation ? identityImplRef : null, + GetStatements = { identityRef.ToObjectCreateExpression(fileFactory.Configuration.GetIdentityPropertyCodeExpression()).ToMethodReturnStatement() }, - CustomAttributes = { new CodeAttributeDeclaration(typeof(IgnoreDataMemberAttribute).ToTypeReference()) } - }; + CustomAttributes = { new CodeAttributeDeclaration(typeof(IgnoreDataMemberAttribute).ToTypeReference()) } + }; } public static CodeMemberProperty GetIdentityObjectImplementation(this IFileFactory fileFactory, bool internalImplementation = false) @@ -270,16 +271,16 @@ public static CodeMemberProperty GetIdentityObjectImplementation var identityImplRef = typeof(IIdentityObject<>).ToTypeReference(identityRef); return new CodeMemberProperty - { - Attributes = MemberAttributes.Public | MemberAttributes.Final, - Name = fileFactory.Configuration.Environment.IdentityProperty.Name, - Type = identityRef, - PrivateImplementationType = internalImplementation ? identityImplRef : null, - GetStatements = + { + Attributes = MemberAttributes.Public | MemberAttributes.Final, + Name = fileFactory.Configuration.Environment.IdentityProperty.Name, + Type = identityRef, + PrivateImplementationType = internalImplementation ? identityImplRef : null, + GetStatements = { new CodeThisReferenceExpression().ToPropertyReference(fileFactory.Configuration.Environment.IdentityProperty).ToMethodReturnStatement() } - }; + }; } @@ -293,13 +294,14 @@ public static CodeTypeMember GenerateConvertMethod(this IFileFac var targetRef = fileFactory.Configuration.GetCodeTypeReference(fileFactory.DomainType, fileType); return new CodeMemberMethod - { - Attributes = fileType != BaseFileType.StrictDTO ? MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.New + { + Attributes = fileType != BaseFileType.StrictDTO ? MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.New : fileFactory.FileType.ToMapToDomainObjectMemberAttributes(), - Name = "To" + fileType.Name.SkipLast("DTO", true), - ReturnType = targetRef, - Statements = { targetRef.ToObjectCreateExpression(new CodeThisReferenceExpression()).ToMethodReturnStatement() } - }; + Name = "To" + fileType.Name.SkipLast("DTO", true), + ReturnType = targetRef, + Statements = { targetRef.ToObjectCreateExpression(new CodeThisReferenceExpression()).ToMethodReturnStatement() } + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/ClientDTOMappingServiceInterfaceFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/ClientDTOMappingServiceInterfaceFileFactory.cs index e93d5aecf..92cbbd9b9 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/ClientDTOMappingServiceInterfaceFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/ClientDTOMappingServiceInterfaceFileFactory.cs @@ -42,3 +42,4 @@ protected override IEnumerable GetMembers() } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/ClientPrimitiveDTOMappingServiceBaseFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/ClientPrimitiveDTOMappingServiceBaseFileFactory.cs index 34d117dac..16cf41513 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/ClientPrimitiveDTOMappingServiceBaseFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/ClientPrimitiveDTOMappingServiceBaseFileFactory.cs @@ -65,3 +65,4 @@ protected override IEnumerable GetMembers() } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/ClientPrimitiveDTOMappingServiceFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/ClientPrimitiveDTOMappingServiceFileFactory.cs index 19c413ca9..011297287 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/ClientPrimitiveDTOMappingServiceFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/ClientPrimitiveDTOMappingServiceFileFactory.cs @@ -29,27 +29,28 @@ protected override CodeTypeDeclaration GetCodeTypeDeclaration() => protected override IEnumerable GetMembers() { var currentInstanceField = new CodeMemberField - { - Attributes = MemberAttributes.Private | MemberAttributes.Static, - Name = "_default", - Type = this.CurrentReference, - InitExpression = this.CurrentReference.ToObjectCreateExpression(), - }; + { + Attributes = MemberAttributes.Private | MemberAttributes.Static, + Name = "_default", + Type = this.CurrentReference, + InitExpression = this.CurrentReference.ToObjectCreateExpression(), + }; yield return currentInstanceField; yield return new CodeMemberProperty - { - Attributes = MemberAttributes.Public | MemberAttributes.Static, - Type = this.CurrentReference, - Name = "Default", - HasGet = true, - GetStatements = + { + Attributes = MemberAttributes.Public | MemberAttributes.Static, + Type = this.CurrentReference, + Name = "Default", + HasGet = true, + GetStatements = { this.CurrentReference.ToTypeReferenceExpression() .ToFieldReference(currentInstanceField) .ToMethodReturnStatement() } - }; + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/IClientMappingServiceExternalMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/IClientMappingServiceExternalMethodGenerator.cs index 5de30c1d0..43c4925af 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/IClientMappingServiceExternalMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/ClientMapping/IClientMappingServiceExternalMethodGenerator.cs @@ -8,3 +8,4 @@ public interface IClientMappingServiceExternalMethodGenerator IEnumerable GetClientMappingServiceInterfaceMethods(); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/DefaultIdentityDTOFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/DefaultIdentityDTOFileFactory.cs index f45fdb694..f9a19d206 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/DefaultIdentityDTOFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileFactory/DefaultIdentityDTOFileFactory.cs @@ -28,31 +28,31 @@ protected IEnumerable GetIdCodeMembers() if (this.Configuration.ForceGenerateProperties(this.DomainType, this.FileType)) { var fieldMember = new CodeMemberField(this.Configuration.Environment.IdentityProperty.PropertyType, "_" + this.IdPropertyName.ToStartLowerCase()) - { - Attributes = MemberAttributes.Private - }; + { + Attributes = MemberAttributes.Private + }; var fieldRefExpr = new CodeThisReferenceExpression().ToFieldReference(fieldMember); yield return fieldMember; yield return new CodeMemberProperty - { - Type = fieldMember.Type, - Name = this.IdPropertyName, - Attributes = MemberAttributes.Public | MemberAttributes.Final, - CustomAttributes = { new CodeAttributeDeclaration(new CodeTypeReference(typeof(DataMemberAttribute))) }, - GetStatements = { { fieldRefExpr.ToMethodReturnStatement() } }, - SetStatements = { { new CodePropertySetValueReferenceExpression().ToAssignStatement(fieldRefExpr) } } - }; + { + Type = fieldMember.Type, + Name = this.IdPropertyName, + Attributes = MemberAttributes.Public | MemberAttributes.Final, + CustomAttributes = { new CodeAttributeDeclaration(new CodeTypeReference(typeof(DataMemberAttribute))) }, + GetStatements = { { fieldRefExpr.ToMethodReturnStatement() } }, + SetStatements = { { new CodePropertySetValueReferenceExpression().ToAssignStatement(fieldRefExpr) } } + }; } else { yield return new CodeMemberField(this.Configuration.Environment.IdentityProperty.PropertyType, this.IdPropertyName) - { - Attributes = MemberAttributes.Public, - CustomAttributes = { new CodeAttributeDeclaration(new CodeTypeReference(typeof(DataMemberAttribute))) } - }; + { + Attributes = MemberAttributes.Public, + CustomAttributes = { new CodeAttributeDeclaration(new CodeTypeReference(typeof(DataMemberAttribute))) } + }; } } @@ -83,11 +83,11 @@ protected override IEnumerable GetConstructors() var idParameter = new CodeParameterDeclarationExpression(this.Configuration.Environment.IdentityProperty.PropertyType, this.IdPropertyName.ToStartLowerCase()); yield return new CodeConstructor - { - Attributes = MemberAttributes.Public, - Parameters = { idParameter }, - Statements = { idParameter.ToVariableReferenceExpression().ToAssignStatement(this.GetAssignIdExpression()) } - }; + { + Attributes = MemberAttributes.Public, + Parameters = { idParameter }, + Statements = { idParameter.ToVariableReferenceExpression().ToAssignStatement(this.GetAssignIdExpression()) } + }; } if (this.Configuration.GeneratePolicy.Used(this.DomainType, BaseFileType.SimpleDTO)) @@ -97,16 +97,16 @@ protected override IEnumerable GetConstructors() var sourceParameterRef = sourceParameter.ToVariableReferenceExpression(); yield return new CodeConstructor - { - Parameters = { sourceParameter }, - Attributes = MemberAttributes.Public | MemberAttributes.Override, - Statements = + { + Parameters = { sourceParameter }, + Attributes = MemberAttributes.Public | MemberAttributes.Override, + Statements = { new CodeThrowArgumentNullExceptionConditionStatement(sourceParameter), this.Configuration.GetIdentityPropertyCodeExpression(sourceParameterRef).ToAssignStatement(this.GetAssignIdExpression()) }, - }; + }; } } @@ -130,38 +130,38 @@ protected override IEnumerable GetMembers() } yield return new CodeMemberField(this.CurrentReference, emptyInstanceFieldName) - { - Attributes = MemberAttributes.Private | MemberAttributes.Static | MemberAttributes.Final, - InitExpression = new CodeObjectCreateExpression( + { + Attributes = MemberAttributes.Private | MemberAttributes.Static | MemberAttributes.Final, + InitExpression = new CodeObjectCreateExpression( this.CurrentReference, this.Configuration.Environment.GetIdentityType().ToTypeReferenceExpression().ToFieldReference( this.Configuration.DTOEmptyPropertyName)) - }; + }; yield return new CodeMemberProperty - { - Name = this.Configuration.DTOEmptyPropertyName, - Attributes = MemberAttributes.Public | MemberAttributes.Static, - Type = this.CurrentReference, - GetStatements = + { + Name = this.Configuration.DTOEmptyPropertyName, + Attributes = MemberAttributes.Public | MemberAttributes.Static, + Type = this.CurrentReference, + GetStatements = { this.CurrentReference.ToTypeReferenceExpression() .ToFieldReference(emptyInstanceFieldName) .ToMethodReturnStatement() } - }; + }; yield return new CodeMemberMethod - { - Name = "operator ==", - Attributes = MemberAttributes.Public | MemberAttributes.Static, - ReturnType = new CodeTypeReference(typeof(bool)), - Parameters = + { + Name = "operator ==", + Attributes = MemberAttributes.Public | MemberAttributes.Static, + ReturnType = new CodeTypeReference(typeof(bool)), + Parameters = { operatorValueParameter1, operatorValueParameter2 }, - Statements = + Statements = { this.Configuration.IdentityIsReference ? new CodeBooleanOrOperatorExpression( @@ -186,34 +186,34 @@ protected override IEnumerable GetMembers() operatorValueParameter2.ToVariableReferenceExpression()) .ToMethodReturnStatement() } - }; + }; yield return new CodeMemberMethod - { - Name = "operator !=", - Attributes = MemberAttributes.Public | MemberAttributes.Static, - ReturnType = new CodeTypeReference(typeof(bool)), - Parameters = + { + Name = "operator !=", + Attributes = MemberAttributes.Public | MemberAttributes.Static, + ReturnType = new CodeTypeReference(typeof(bool)), + Parameters = { operatorValueParameter1, operatorValueParameter2 }, - Statements = + Statements = { new CodeValueUnequalityOperatorExpression( operatorValueParameter1.ToVariableReferenceExpression(), operatorValueParameter2.ToVariableReferenceExpression()) .ToMethodReturnStatement() } - }; + }; yield return new CodeMemberMethod - { - Name = "Equals", - Attributes = MemberAttributes.Override | MemberAttributes.Public, - ReturnType = new CodeTypeReference(typeof(bool)), - Parameters = { new CodeParameterDeclarationExpression(typeof(object), operatorOtherName) }, - Statements = + { + Name = "Equals", + Attributes = MemberAttributes.Override | MemberAttributes.Public, + ReturnType = new CodeTypeReference(typeof(bool)), + Parameters = { new CodeParameterDeclarationExpression(typeof(object), operatorOtherName) }, + Statements = { new CodeBooleanAndOperatorExpression ( @@ -235,15 +235,15 @@ protected override IEnumerable GetMembers() .ToMethodReturnStatement() } - }; + }; yield return new CodeMemberMethod - { - Name = "Equals", - Attributes = MemberAttributes.Final | MemberAttributes.Public, - ReturnType = new CodeTypeReference(typeof(bool)), - Parameters = { this.CurrentReference.ToParameterDeclarationExpression(operatorOtherName) }, - Statements = + { + Name = "Equals", + Attributes = MemberAttributes.Final | MemberAttributes.Public, + ReturnType = new CodeTypeReference(typeof(bool)), + Parameters = { this.CurrentReference.ToParameterDeclarationExpression(operatorOtherName) }, + Statements = { this.Configuration.IdentityIsReference ? new CodeBooleanAndOperatorExpression( @@ -259,33 +259,33 @@ protected override IEnumerable GetMembers() .ToMethodReturnStatement() } - }; + }; yield return new CodeMemberMethod - { - Name = "GetHashCode", - Attributes = MemberAttributes.Override | MemberAttributes.Public, - ReturnType = new CodeTypeReference(typeof(int)), - Statements = + { + Name = "GetHashCode", + Attributes = MemberAttributes.Override | MemberAttributes.Public, + ReturnType = new CodeTypeReference(typeof(int)), + Statements = { new CodeThisReferenceExpression().ToFieldReference(this.IdPropertyName) .ToMethodInvokeExpression("GetHashCode") .ToMethodReturnStatement() } - }; + }; yield return new CodeMemberMethod - { - Name = "ToString", - Attributes = MemberAttributes.Override | MemberAttributes.Public, - ReturnType = new CodeTypeReference(typeof(string)), - Statements = + { + Name = "ToString", + Attributes = MemberAttributes.Override | MemberAttributes.Public, + ReturnType = new CodeTypeReference(typeof(string)), + Statements = { new CodeThisReferenceExpression().ToFieldReference(this.IdPropertyName) .ToMethodInvokeExpression("ToString") .ToMethodReturnStatement() } - }; + }; yield return this.GetIdentityObjectImplementation(true); } @@ -306,3 +306,4 @@ protected override IEnumerable GetBaseTypes() yield return this.Configuration.GetIdentityObjectCodeTypeReference(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileGenerator.cs index 76dccb822..a0f05e464 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileGenerator.cs @@ -69,3 +69,4 @@ protected virtual IEnumerable> GetDTOFileGenerator } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/BaseFileType.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/BaseFileType.cs index d3f919da6..f9c2171b0 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/BaseFileType.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/BaseFileType.cs @@ -10,23 +10,23 @@ public record BaseFileType(string Name) public string ShortName => this.Name.SkipLast("DTO", true); - public static MainDTOFileType BaseAbstractDTO { get; } = new (nameof (BaseAbstractDTO), null, true); + public static MainDTOFileType BaseAbstractDTO { get; } = new(nameof(BaseAbstractDTO), null, true); - public static MainDTOFileType BasePersistentDTO { get; } = new (nameof (BasePersistentDTO), BaseAbstractDTO, true); + public static MainDTOFileType BasePersistentDTO { get; } = new(nameof(BasePersistentDTO), BaseAbstractDTO, true); - public static MainDTOFileType BaseAuditPersistentDTO { get; } = new (nameof (BaseAuditPersistentDTO), BasePersistentDTO, true); + public static MainDTOFileType BaseAuditPersistentDTO { get; } = new(nameof(BaseAuditPersistentDTO), BasePersistentDTO, true); - public static MainDTOFileType SimpleDTO { get; } = new (nameof (SimpleDTO), BaseAuditPersistentDTO, false); + public static MainDTOFileType SimpleDTO { get; } = new(nameof(SimpleDTO), BaseAuditPersistentDTO, false); - public static MainDTOFileType FullDTO { get; } = new (nameof (FullDTO), SimpleDTO, false); + public static MainDTOFileType FullDTO { get; } = new(nameof(FullDTO), SimpleDTO, false); - public static MainDTOFileType RichDTO { get; } = new (nameof (RichDTO), FullDTO, false); + public static MainDTOFileType RichDTO { get; } = new(nameof(RichDTO), FullDTO, false); public static MainDTOFileType VisualDTO { get; } = new(nameof(VisualDTO), BasePersistentDTO, false); - public static DTOFileType ProjectionDTO { get; } = new (nameof (ProjectionDTO), DTORole.Client); + public static DTOFileType ProjectionDTO { get; } = new(nameof(ProjectionDTO), DTORole.Client); public static DTOFileType IdentityDTO { get; } = new(nameof(IdentityDTO), DTORole.Client); @@ -124,3 +124,4 @@ public static implicit operator BaseFileType(ViewDTOType dtoType) } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/DTOFileType.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/DTOFileType.cs index 72ff073d3..cea908eb6 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/DTOFileType.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/DTOFileType.cs @@ -3,3 +3,4 @@ namespace Framework.CodeGeneration.DTOGenerator.FileTypes; public record DTOFileType(string Name, DTORole Role) : RoleFileType(Name, Role); + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/DTOFileTypeExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/DTOFileTypeExtensions.cs index 00f5c9a1b..daee4143e 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/DTOFileTypeExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/DTOFileTypeExtensions.cs @@ -32,3 +32,4 @@ public static MemberAttributes ToMapToDomainObjectMemberAttributes(this MainDTOF return fileType.GetBaseType() == null ? MemberAttributes.Public : (MemberAttributes.Public | MemberAttributes.Override); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/FileTypeExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/FileTypeExtensions.cs index 35fed5b31..5bbf7ee34 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/FileTypeExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/FileTypeExtensions.cs @@ -29,3 +29,4 @@ public static ICodeFileFactoryHeader ToHeader(this TFileTy return new CodeFileFactoryHeader(fileType, relativePath, getTypeNameFunc); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/MainDTOFileType.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/MainDTOFileType.cs index 144a8902a..02f94975e 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/MainDTOFileType.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/MainDTOFileType.cs @@ -3,3 +3,4 @@ namespace Framework.CodeGeneration.DTOGenerator.FileTypes; public record MainDTOFileType(string Name, MainDTOFileType? BaseType, bool IsAbstract) : DTOFileType(Name, DTORole.Client); + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/RoleFileType.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/RoleFileType.cs index 6fac7a2a8..428a8f206 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/RoleFileType.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/FileTypes/RoleFileType.cs @@ -3,3 +3,4 @@ namespace Framework.CodeGeneration.DTOGenerator.FileTypes; public record RoleFileType(string Name, DTORole Role) : BaseFileType(Name); + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/GeneratePolicy/DTORoleGeneratePolicy.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/GeneratePolicy/DTORoleGeneratePolicy.cs index 01d5567eb..8fa826fe2 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/GeneratePolicy/DTORoleGeneratePolicy.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/GeneratePolicy/DTORoleGeneratePolicy.cs @@ -45,3 +45,4 @@ public bool Used(Type domainType, RoleFileType fileType) return filter.HasFlag(fileType.Role); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/GeneratePolicy/DependencyGeneratePolicy.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/GeneratePolicy/DependencyGeneratePolicy.cs index 68da0d288..26f77027d 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/GeneratePolicy/DependencyGeneratePolicy.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/GeneratePolicy/DependencyGeneratePolicy.cs @@ -7,7 +7,7 @@ namespace Framework.CodeGeneration.DTOGenerator.GeneratePolicy; public class DependencyGeneratePolicy : CachedGeneratePolicy { public DependencyGeneratePolicy(IGeneratePolicy baseGeneratePolicy, IEnumerable maps) - : base (baseGeneratePolicy) + : base(baseGeneratePolicy) { if (baseGeneratePolicy == null) throw new ArgumentNullException(nameof(baseGeneratePolicy)); if (maps == null) throw new ArgumentNullException(nameof(maps)); @@ -99,3 +99,4 @@ protected override bool InternalUsed(Type domainType, RoleFileType fileType) } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Map/GeneratePropertyMap.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Map/GeneratePropertyMap.cs index b7b61920d..25b6cd3df 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Map/GeneratePropertyMap.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Map/GeneratePropertyMap.cs @@ -33,3 +33,4 @@ public GeneratePropertyMap(PropertyInfo property, Type elementType, RoleFileType public override string ToString() => $"Name: {this.Property.Name} | ElementFileType: {this.ElementFileType} | ElementType: {this.ElementType}"; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Map/GenerateTypeMap.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Map/GenerateTypeMap.cs index 376751637..93c5b9404 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Map/GenerateTypeMap.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/Map/GenerateTypeMap.cs @@ -1,6 +1,4 @@ - - -using Framework.CodeGeneration.DTOGenerator.FileTypes; +using Framework.CodeGeneration.DTOGenerator.FileTypes; namespace Framework.CodeGeneration.DTOGenerator.Map; @@ -39,3 +37,4 @@ public bool UsedDetailRole(Type elementType, RoleFileType? elementFileType, bool public override string ToString() => $"DomainType: {this.DomainType.Name} | FileType: {this.FileType}"; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/IDiffUpdatePropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/IDiffUpdatePropertyAssigner.cs index 710ba8eab..c65011f2d 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/IDiffUpdatePropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/IDiffUpdatePropertyAssigner.cs @@ -9,3 +9,4 @@ public interface IDiffUpdatePropertyAssigner : IDTOSource { CodeStatement GetAssignStatement(PropertyInfo property, CodeExpression baseSourcePropertyRef, CodeExpression currentSourcePropertyRef, CodeExpression targetPropertyRef); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/IPropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/IPropertyAssigner.cs index 57e567108..01ceb1f73 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/IPropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/IPropertyAssigner.cs @@ -1,5 +1,6 @@ using System.CodeDom; using System.Reflection; + using Framework.CodeGeneration.DTOGenerator.Configuration; using Framework.CodeGeneration.DTOGenerator.FileFactory.Base; @@ -13,3 +14,4 @@ public interface IPropertyAssigner : IDTOSource public interface IPropertyAssigner : IDTOSource, IPropertyAssigner where TConfiguration : class, IDTOGeneratorConfiguration; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/MainToStrict/MainToStrictPropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/MainToStrict/MainToStrictPropertyAssigner.cs index d810eaaac..6112037b6 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/MainToStrict/MainToStrictPropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/MainToStrict/MainToStrictPropertyAssigner.cs @@ -31,13 +31,13 @@ public override CodeStatement GetAssignStatement(PropertyInfo property, CodeExpr var identityTypeRef = this.Configuration.GetCodeTypeReference(property.PropertyType, BaseFileType.IdentityDTO); return new CodeNotNullConditionStatement(sourcePropertyRef) - { - TrueStatements = + { + TrueStatements = { sourcePropertyRef.ToPropertyReference(this.Configuration.DTOIdentityPropertyName) .ToAssignStatement(targetPropertyRef) }, - FalseStatements = + FalseStatements = { this.Configuration.IdentityIsReference @@ -48,41 +48,41 @@ public override CodeStatement GetAssignStatement(PropertyInfo property, CodeExpr .ToFieldReference(this.Configuration.DTOEmptyPropertyName) .ToAssignStatement(targetPropertyRef) } - }; + }; } else { var strictRefType = this.CodeTypeReferenceService.GetCodeTypeReference(property); return new CodeNotNullConditionStatement(sourcePropertyRef) - { - TrueStatements = + { + TrueStatements = { strictRefType.ToObjectCreateExpression(sourcePropertyRef) .ToAssignStatement(targetPropertyRef) }, - FalseStatements = + FalseStatements = { new CodePrimitiveExpression(null).ToAssignStatement(targetPropertyRef) } - }; + }; } } if (property.PropertyType.IsArray) { return new CodeNotNullConditionStatement(sourcePropertyRef) - { - TrueStatements = + { + TrueStatements = { typeof(Enumerable).ToTypeReferenceExpression() .ToMethodInvokeExpression("ToArray", sourcePropertyRef) .ToAssignStatement(targetPropertyRef) }, - FalseStatements = + FalseStatements = { new CodePrimitiveExpression(null).ToAssignStatement(targetPropertyRef) } - }; + }; } else if (this.Configuration.IsCollectionProperty(property)) { @@ -103,10 +103,10 @@ public override CodeStatement GetAssignStatement(PropertyInfo property, CodeExpr : paramRef.ToPropertyReference(this.Configuration.DTOIdentityPropertyName); return new CodeLambdaExpression - { - Parameters = { param }, - Statements = { body } - }; + { + Parameters = { param }, + Statements = { body } + }; }); var selectMethod = typeof(CoreEnumerableExtensions) @@ -118,15 +118,16 @@ public override CodeStatement GetAssignStatement(PropertyInfo property, CodeExpr return new CodeNotNullConditionStatement(sourcePropertyRef) - { - TrueStatements = + { + TrueStatements = { assignStatement } - }; + }; } return sourcePropertyRef.ToAssignStatement(targetPropertyRef); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/PropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/PropertyAssigner.cs index 00a6f3fc4..a7ff8efc3 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/PropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/PropertyAssigner.cs @@ -1,5 +1,6 @@ using System.CodeDom; using System.Reflection; + using Framework.CodeDom.Extensions; using Framework.CodeGeneration.DTOGenerator.CodeTypeReferenceService.Base; using Framework.CodeGeneration.DTOGenerator.Configuration; @@ -45,3 +46,4 @@ public virtual CodeStatement GetAssignStatement(PropertyInfo property, CodeExpre return sourcePropertyRef.ToAssignStatement(targetPropertyRef); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/PropertyAssignerExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/PropertyAssignerExtensions.cs index 2092c688a..dfb4ab753 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/PropertyAssignerExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/PropertyAssignerExtensions.cs @@ -1,5 +1,6 @@ using System.CodeDom; using System.Reflection; + using Framework.CodeDom.Extensions; using Framework.CodeGeneration.DTOGenerator.Configuration; @@ -50,3 +51,4 @@ public override CodeStatement GetAssignStatement(PropertyInfo property, CodeExpr } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Security/MaybePropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Security/MaybePropertyAssigner.cs index 3da3ad34a..8d9d8979a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Security/MaybePropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Security/MaybePropertyAssigner.cs @@ -47,3 +47,4 @@ public sealed override CodeStatement GetAssignStatement(PropertyInfo property, C } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Security/SecurityToSecurityPropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Security/SecurityToSecurityPropertyAssigner.cs index aa5a12e11..5f0e3dedd 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Security/SecurityToSecurityPropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Security/SecurityToSecurityPropertyAssigner.cs @@ -40,8 +40,8 @@ protected override CodeStatement GetSecurityAssignStatement(PropertyInfo propert var resultVarDeclRef = new CodeVariableReferenceExpression(resultVarDecl.Name); return new CodeConditionStatement(sourcePropertyRef.ToPropertyReference(nameof(Maybe<>.HasValue))) - { - TrueStatements = + { + TrueStatements = { resultVarDecl, this.InnerAssigner.GetAssignStatement(property, sourcePropertyRef.ToPropertyReference(nameof(Maybe<>.Value)), resultVarDeclRef), @@ -50,9 +50,10 @@ protected override CodeStatement GetSecurityAssignStatement(PropertyInfo propert .ToMethodInvokeExpression(resultVarDeclRef) .ToAssignStatement(targetPropertyRef) }, - FalseStatements = { targetPropertyTypeRef.ToNothingValueExpression().ToAssignStatement(targetPropertyRef) } - }; + FalseStatements = { targetPropertyTypeRef.ToNothingValueExpression().ToAssignStatement(targetPropertyRef) } + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Security/SecurityToSecurityPropertyAssignerExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Security/SecurityToSecurityPropertyAssignerExtensions.cs index c505766a2..de4941536 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Security/SecurityToSecurityPropertyAssignerExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Security/SecurityToSecurityPropertyAssignerExtensions.cs @@ -14,3 +14,4 @@ public static IPropertyAssigner WithSecurityToSecurity(this IPro return new SecurityToSecurityPropertyAssigner(innerAssigner, sourceTypeReferenceService); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Update/DiffUpdatePropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Update/DiffUpdatePropertyAssigner.cs index dd4f94dcb..12b554957 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Update/DiffUpdatePropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Update/DiffUpdatePropertyAssigner.cs @@ -98,9 +98,9 @@ public CodeStatement GetAssignStatement( var baseSourceItemParam = new CodeParameterDeclarationExpression { Name = "baseSourceItem" }; var toPairElementLambda = new CodeLambdaExpression - { - Parameters = { currentSourceItemParam, baseSourceItemParam }, - Statements = + { + Parameters = { currentSourceItemParam, baseSourceItemParam }, + Statements = { this.Configuration.GetCreateUpdateDTOExpression( elementType, @@ -108,12 +108,12 @@ public CodeStatement GetAssignStatement( baseSourceItemParam.ToVariableReferenceExpression(), this.MappingServiceRefExpr) } - }; + }; var toSingleElementLambda = new CodeLambdaExpression - { - Parameters = { currentSourceItemParam }, - Statements = + { + Parameters = { currentSourceItemParam }, + Statements = { this.Configuration.GetCreateUpdateDTOExpression( elementType, @@ -121,7 +121,7 @@ public CodeStatement GetAssignStatement( null, this.MappingServiceRefExpr) } - }; + }; return extractMethod.ToMethodInvokeExpression(currentSourcePropertyRef, baseSourcePropertyRef, toPairElementLambda, toSingleElementLambda).ToAssignStatement(targetPropertyRef); } @@ -138,25 +138,26 @@ public CodeStatement GetAssignStatement( if (isSecurity) { return new CodeConditionStatement - { - Condition = new CodeBinaryOperatorExpression(baseSourcePropertyRef, CodeBinaryOperatorType.ValueEquality, currentSourcePropertyRef).ToNegateExpression(), - TrueStatements = + { + Condition = new CodeBinaryOperatorExpression(baseSourcePropertyRef, CodeBinaryOperatorType.ValueEquality, currentSourcePropertyRef).ToNegateExpression(), + TrueStatements = { currentSourcePropertyRef.ToAssignStatement(targetPropertyRef) } - }; + }; } else { return new CodeConditionStatement - { - Condition = new CodeBinaryOperatorExpression(baseSourcePropertyRef, CodeBinaryOperatorType.ValueEquality, currentSourcePropertyRef).ToNegateExpression(), - TrueStatements = + { + Condition = new CodeBinaryOperatorExpression(baseSourcePropertyRef, CodeBinaryOperatorType.ValueEquality, currentSourcePropertyRef).ToNegateExpression(), + TrueStatements = { currentSourcePropertyRef.ToMaybeReturnExpression().ToAssignStatement(targetPropertyRef) } - }; + }; } } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Update/UpdatePropertyAssigner.cs b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Update/UpdatePropertyAssigner.cs index 388f17fb8..c979db44a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Update/UpdatePropertyAssigner.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.DTOGenerator/PropertyAssigner/Update/UpdatePropertyAssigner.cs @@ -42,7 +42,7 @@ public override CodeStatement GetAssignStatement(PropertyInfo property, CodeExpr } else if (this.Configuration.IsReferenceProperty(property) && property.IsDetail()) { - return this.Configuration.GetCreateUpdateDTOExpression(property.PropertyType, sourcePropertyRef, null, this.MappingServiceRefExpr) + return this.Configuration.GetCreateUpdateDTOExpression(property.PropertyType, sourcePropertyRef, null, this.MappingServiceRefExpr) .ToMaybeReturnExpression() .ToAssignStatement(targetPropertyRef); } @@ -75,10 +75,10 @@ private CodeStatement GetCollectionAssignStatement(PropertyInfo property, CodeEx var body = this.Configuration.GetCreateUpdateDTOExpression(elementType, paramRef, null, this.MappingServiceRefExpr); return new CodeLambdaExpression - { - Parameters = { param }, - Statements = { body } - }; + { + Parameters = { param }, + Statements = { body } + }; }); var extractMethodExpr = this.MappingServiceRefExpr.ToMethodReferenceExpression(extractMethodName, sourceElementTypeRef, targetElementIdentityTypeRef, targetElementTypeRef) @@ -87,3 +87,4 @@ private CodeStatement GetCollectionAssignStatement(PropertyInfo property, CodeEx return extractMethodExpr.ToAssignStatement(targetPropertyRef); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Configuration/IProjectionGenerationEnvironment.cs b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Configuration/IProjectionGenerationEnvironment.cs index 0a0075f4a..a6692a6a6 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Configuration/IProjectionGenerationEnvironment.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Configuration/IProjectionGenerationEnvironment.cs @@ -3,3 +3,4 @@ namespace Framework.CodeGeneration.ProjectionGenerator.Configuration; public interface IProjectionGenerationEnvironment : ICodeGenerationEnvironment; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Configuration/IProjectionGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Configuration/IProjectionGeneratorConfiguration.cs index 04f658732..44a61fb73 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Configuration/IProjectionGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Configuration/IProjectionGeneratorConfiguration.cs @@ -34,3 +34,4 @@ public interface IProjectionGeneratorConfiguration : ICodeGeneratorConfiguration /// IEnumerable GetPropertyAttributeDeclarations(PropertyInfo property); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Configuration/ProjectionGeneratorConfigurationBase.cs b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Configuration/ProjectionGeneratorConfigurationBase.cs index 2d3ae8dea..a1f8d151d 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Configuration/ProjectionGeneratorConfigurationBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Configuration/ProjectionGeneratorConfigurationBase.cs @@ -165,3 +165,4 @@ protected override IEnumerable> GetFileFactoryH yield return this.CustomProjectionBaseFileFactoryHeader; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Extensions/CodeDomExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Extensions/CodeDomExtensions.cs index bed8773b5..17c58dbb4 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Extensions/CodeDomExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Extensions/CodeDomExtensions.cs @@ -2,6 +2,7 @@ using System.Reflection; using Anch.Core; +using Anch.SecuritySystem; using Framework.BLL.Domain.Attributes; using Framework.BLL.Domain.DTO; @@ -15,8 +16,6 @@ using Framework.Database.Mapping; using Framework.Projection; -using Anch.SecuritySystem; - namespace Framework.CodeGeneration.ProjectionGenerator.Extensions; internal static class CodeDomExtensions @@ -249,3 +248,4 @@ public static CodeAttributeDeclaration ToAttributeDeclaration(this FetchPathAttr return typeof(FetchPathAttribute).ToTypeReference().ToAttributeDeclaration(arg); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Extensions/DomainMetadataExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Extensions/DomainMetadataExtensions.cs index 7447519e4..0db20baf2 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Extensions/DomainMetadataExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/Extensions/DomainMetadataExtensions.cs @@ -23,7 +23,7 @@ public static IEnumerable GetProjectionProperties(this IProjection foreach (var property in domainType.GetProperties(BindingFlags.Instance | BindingFlags.Public).OrderBy(property => property.Name)) { - var isCustom = property.HasAttribute(attr => attr.Role == ProjectionPropertyRole.Custom); + var isCustom = property.HasAttribute(attr => attr.Role == ProjectionPropertyRole.Custom); if (customPropFilter == null || isCustom == customPropFilter) { @@ -37,3 +37,4 @@ public static IEnumerable GetProjectionProperties(this IProjection } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/FileFactory/CustomProjectionFileFactoryBase.cs b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/FileFactory/CustomProjectionFileFactoryBase.cs index b6a528bce..d80aaa276 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/FileFactory/CustomProjectionFileFactoryBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/FileFactory/CustomProjectionFileFactoryBase.cs @@ -63,25 +63,26 @@ private CodeMemberProperty CreateCustomProperty(PropertyInfo property) if (property == null) throw new ArgumentNullException(nameof(property)); return new CodeMemberProperty - { - Name = property.Name, + { + Name = property.Name, - Type = property.PropertyType.ToTypeReference(), + Type = property.PropertyType.ToTypeReference(), - Attributes = MemberAttributes.Public | MemberAttributes.Abstract, + Attributes = MemberAttributes.Public | MemberAttributes.Abstract, - HasGet = true, + HasGet = true, - HasSet = property.HasSetMethod() - }; + HasSet = property.HasSetMethod() + }; } protected override IEnumerable GetConstructors() { yield return new CodeConstructor - { - Attributes = MemberAttributes.Family - }; + { + Attributes = MemberAttributes.Family + }; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/FileFactory/ProjectionFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/FileFactory/ProjectionFileFactory.cs index 9057693cd..bb6c93184 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/FileFactory/ProjectionFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/FileFactory/ProjectionFileFactory.cs @@ -82,12 +82,12 @@ protected override IEnumerable GetMembers() if (this.Configuration.IsIdentityProperty(property)) { var genProp = new CodeMemberProperty - { - Name = property.Name, - Type = propertyTypeRef, - Attributes = MemberAttributes.Public | MemberAttributes.Override, - GetStatements = { new CodeBaseReferenceExpression().ToPropertyReference(property).ToMethodReturnStatement() } - }; + { + Name = property.Name, + Type = propertyTypeRef, + Attributes = MemberAttributes.Public | MemberAttributes.Override, + GetStatements = { new CodeBaseReferenceExpression().ToPropertyReference(property).ToMethodReturnStatement() } + }; genProp.CustomAttributes.AddRange(attributes); @@ -110,12 +110,12 @@ protected override IEnumerable GetMembers() var genField = new CodeMemberField { Name = property.Name.ToStartLowerCase(), Type = fieldType.ToTypeReference() }; var genProp = new CodeMemberProperty - { - Name = property.Name, - Type = propertyTypeRef, - Attributes = MemberAttributes.Public, - GetStatements = { new CodeThisReferenceExpression().ToFieldReference(genField).ToMethodReturnStatement() } - }; + { + Name = property.Name, + Type = propertyTypeRef, + Attributes = MemberAttributes.Public, + GetStatements = { new CodeThisReferenceExpression().ToFieldReference(genField).ToMethodReturnStatement() } + }; genProp.CustomAttributes.AddRange(attributes); @@ -171,10 +171,10 @@ private CodeMemberProperty CreateExpandProperty(PropertyInfo property, bool with else { return new - { - Expression = (CodeExpression)state.Expression.ToPropertyReference(propNode), - IsRef = propNode.PropertyType.IsNullable() || propNode.PropertyType.IsClass - }; + { + Expression = (CodeExpression)state.Expression.ToPropertyReference(propNode), + IsRef = propNode.PropertyType.IsNullable() || propNode.PropertyType.IsClass + }; } }, state => @@ -192,12 +192,12 @@ private CodeMemberProperty CreateExpandProperty(PropertyInfo property, bool with }); var prop = new CodeMemberProperty - { - Name = property.Name, - Type = property.PropertyType.ToTypeReference(), - Attributes = MemberAttributes.Public, - GetStatements = { getExpr.ToMethodReturnStatement() }, - }; + { + Name = property.Name, + Type = property.PropertyType.ToTypeReference(), + Attributes = MemberAttributes.Public, + GetStatements = { getExpr.ToMethodReturnStatement() }, + }; if (withAttr) { @@ -256,14 +256,14 @@ private IEnumerable GetSourceConstructorStatements(CodeExpression { var lambda = new CodeParameterDeclarationExpression { Name = "v" } .Pipe(param => new CodeLambdaExpression - { - Parameters = { param }, - Statements = + { + Parameters = { param }, + Statements = { elementType.ToTypeReference().ToObjectCreateExpression(param.ToVariableReferenceExpression()) .ToMethodReturnStatement() } - }); + }); yield return typeof(CoreEnumerableExtensions) .ToTypeReferenceExpression() @@ -273,13 +273,13 @@ private IEnumerable GetSourceConstructorStatements(CodeExpression else { yield return new CodeNotNullConditionStatement(sourcePropExpr) - { - TrueStatements = + { + TrueStatements = { targetProp.PropertyType.ToTypeReference().ToObjectCreateExpression(sourcePropExpr) .ToAssignStatement(targetMemberExpr) } - }; + }; } } else @@ -290,3 +290,4 @@ private IEnumerable GetSourceConstructorStatements(CodeExpression } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/ProjectionFileGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/ProjectionFileGenerator.cs index 4b1d4172f..f3eedf485 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/ProjectionFileGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ProjectionGenerator/ProjectionFileGenerator.cs @@ -23,3 +23,4 @@ protected override IEnumerable GetInternalFileGenerators() } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/AutoRequest/ServiceModelFileGeneratorExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/AutoRequest/ServiceModelFileGeneratorExtensions.cs index 37fcfc2ea..62de99b0e 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/AutoRequest/ServiceModelFileGeneratorExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/AutoRequest/ServiceModelFileGeneratorExtensions.cs @@ -76,35 +76,35 @@ private CodeTypeDeclaration GetAutoRequestType(CodeMemberMethod method) if (method == null) throw new ArgumentNullException(nameof(method)); var requestType = new CodeTypeDeclaration(method.Name + "AutoRequest") - { - Attributes = MemberAttributes.Public, - IsPartial = true, - IsClass = true, - CustomAttributes = + { + Attributes = MemberAttributes.Public, + IsPartial = true, + IsClass = true, + CustomAttributes = { typeof(DataContractAttribute).ToTypeReference().ToAttributeDeclaration(), typeof(AutoRequestAttribute).ToTypeReference().ToAttributeDeclaration() } - }; + }; method.Parameters.Cast().Foreach( (parameter, index) => { var fieldMember = new CodeMemberField - { - Type = parameter.Type, - Name = parameter.Name.ToStartLowerCase(), - Attributes = MemberAttributes.Private - }; + { + Type = parameter.Type, + Name = parameter.Name.ToStartLowerCase(), + Attributes = MemberAttributes.Private + }; var fieldRefExpr = new CodeThisReferenceExpression().ToFieldReference(fieldMember); var propertyMember = new CodeMemberProperty - { - Type = parameter.Type, - Name = parameter.Name.ToStartUpperCase(), - Attributes = MemberAttributes.Public, - CustomAttributes = + { + Type = parameter.Type, + Name = parameter.Name.ToStartUpperCase(), + Attributes = MemberAttributes.Public, + CustomAttributes = { typeof(DataMemberAttribute).ToTypeReference().ToAttributeDeclaration(), typeof(AutoRequestPropertyAttribute).ToTypeReference().ToAttributeDeclaration( @@ -112,9 +112,9 @@ private CodeTypeDeclaration GetAutoRequestType(CodeMemberMethod method) nameof(AutoRequestPropertyAttribute.OrderIndex), index.ToPrimitiveExpression())) }, - GetStatements = { fieldRefExpr.ToMethodReturnStatement() }, - SetStatements = { new CodePropertySetValueReferenceExpression().ToAssignStatement(fieldRefExpr) } - }; + GetStatements = { fieldRefExpr.ToMethodReturnStatement() }, + SetStatements = { new CodePropertySetValueReferenceExpression().ToAssignStatement(fieldRefExpr) } + }; requestType.Members.Add(fieldMember); @@ -125,3 +125,4 @@ private CodeTypeDeclaration GetAutoRequestType(CodeMemberMethod method) } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Audit/AuditGeneratorConfigurationBase.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Audit/AuditGeneratorConfigurationBase.cs index e0b5d36a0..c7b6a4b0f 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Audit/AuditGeneratorConfigurationBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Audit/AuditGeneratorConfigurationBase.cs @@ -29,3 +29,4 @@ public override IEnumerable GetMethodGenerators(Type do yield return new GetObjectPropertyRevisionsByDateRangeMethodGenerator>(this, domainType, this.Environment.AuditDTO); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Audit/IAuditGenerationEnvironment.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Audit/IAuditGenerationEnvironment.cs index 7d8675111..9f8b02a47 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Audit/IAuditGenerationEnvironment.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Audit/IAuditGenerationEnvironment.cs @@ -3,3 +3,4 @@ namespace Framework.CodeGeneration.ServiceModelGenerator.Configuration.Audit; public interface IAuditGenerationEnvironment : IServiceModelGenerationEnvironment, IAuditDTOGeneratorConfigurationContainer; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Audit/IAuditGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Audit/IAuditGeneratorConfiguration.cs index 2c1eb803e..e94fdd103 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Audit/IAuditGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Audit/IAuditGeneratorConfiguration.cs @@ -6,3 +6,4 @@ public interface IAuditGeneratorConfiguration : ICodeGeneratorConfiguration; public interface IAuditGeneratorConfiguration : IAuditGeneratorConfiguration, IServiceModelGeneratorConfiguration where TEnvironment : IAuditGenerationEnvironment; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStore/FileStoreGeneratorConfigurationBase.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStore/FileStoreGeneratorConfigurationBase.cs index f58ddf44e..dccb60266 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStore/FileStoreGeneratorConfigurationBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStore/FileStoreGeneratorConfigurationBase.cs @@ -1,9 +1,9 @@ using Anch.Core; +using Anch.SecuritySystem; + using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators; using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.FileStore; -using Anch.SecuritySystem; - namespace Framework.CodeGeneration.ServiceModelGenerator.Configuration.FileStore; public abstract class FileStoreGeneratorConfigurationBase : ServiceModelGeneratorBase, IFileStoreGeneratorConfiguration @@ -56,3 +56,4 @@ protected virtual IEnumerable GetCustomAttributes() public record FileStoreBLLParameter(Type Type, SecurityRule SecurityRule, bool IsEdit); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStore/IFileStoreGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStore/IFileStoreGeneratorConfiguration.cs index 1e6ccb5d9..fe690a1fd 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStore/IFileStoreGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStore/IFileStoreGeneratorConfiguration.cs @@ -1,6 +1,6 @@ -using Framework.CodeGeneration.Configuration; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using Framework.CodeGeneration.Configuration; namespace Framework.CodeGeneration.ServiceModelGenerator.Configuration.FileStore; @@ -24,3 +24,4 @@ public interface IFileStoreGeneratorConfiguration : ICodeGeneratorConfiguration SecurityRule? TryGetSecurityAttribute(Type type, bool isEdit); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStoreAttachment/FileStoreAttachmentGeneratorConfigurationBase.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStoreAttachment/FileStoreAttachmentGeneratorConfigurationBase.cs index 2a91a5143..2a7143c9e 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStoreAttachment/FileStoreAttachmentGeneratorConfigurationBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStoreAttachment/FileStoreAttachmentGeneratorConfigurationBase.cs @@ -1,7 +1,7 @@ -using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators; -using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.FileStore; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators; +using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.FileStore; namespace Framework.CodeGeneration.ServiceModelGenerator.Configuration.FileStoreAttachment; @@ -59,3 +59,4 @@ public override bool Equals(object obj) } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStoreAttachment/IFileStoreAttachmentGenerationEnvironment.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStoreAttachment/IFileStoreAttachmentGenerationEnvironment.cs index 21fda3018..1e42d91c2 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStoreAttachment/IFileStoreAttachmentGenerationEnvironment.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStoreAttachment/IFileStoreAttachmentGenerationEnvironment.cs @@ -6,3 +6,4 @@ public interface IFileStoreAttachmentGenerationEnvironment : IServiceModelGenera { IFileStoreGeneratorConfiguration FileStore { get; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStoreAttachment/IFileStoreAttachmentGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStoreAttachment/IFileStoreAttachmentGeneratorConfiguration.cs index 47bffd014..a4b0bdc49 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStoreAttachment/IFileStoreAttachmentGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/FileStoreAttachment/IFileStoreAttachmentGeneratorConfiguration.cs @@ -1,6 +1,6 @@ -using Framework.CodeGeneration.Configuration; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using Framework.CodeGeneration.Configuration; namespace Framework.CodeGeneration.ServiceModelGenerator.Configuration.FileStoreAttachment; @@ -21,3 +21,4 @@ public interface IFileStoreAttachmentGeneratorConfiguration : ICodeGeneratorConf SecurityRule TryGetSecurityAttribute(Type type, bool forEdit); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/IServiceModelGenerationEnvironment.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/IServiceModelGenerationEnvironment.cs index e36a18838..595197603 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/IServiceModelGenerationEnvironment.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/IServiceModelGenerationEnvironment.cs @@ -7,3 +7,4 @@ public interface IServiceModelGenerationEnvironment : ICodeGenerationEnvironment BLLCoreGenerator.Configuration.IBLLCoreGeneratorConfigurationContainer, DTOGenerator.Server.Configuration.IServerDTOGeneratorConfigurationContainer; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/IServiceModelGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/IServiceModelGeneratorConfiguration.cs index 10fdfe474..3df6ba066 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/IServiceModelGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/IServiceModelGeneratorConfiguration.cs @@ -25,3 +25,4 @@ public interface IServiceModelGeneratorConfiguration : ICodeGeneratorConfigurati public interface IServiceModelGeneratorConfiguration : IServiceModelGeneratorConfiguration, ICodeGeneratorConfiguration where TEnvironment : IServiceModelGenerationEnvironment; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Integration/IIntegrationGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Integration/IIntegrationGeneratorConfiguration.cs index a642ab369..2e59857c7 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Integration/IIntegrationGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Integration/IIntegrationGeneratorConfiguration.cs @@ -15,3 +15,4 @@ public interface IIntegrationGeneratorConfiguration : ICodeGeneratorConfiguratio public interface IIntegrationGeneratorConfiguration : IIntegrationGeneratorConfiguration, IServiceModelGeneratorConfiguration where TEnvironment : IServiceModelGenerationEnvironment; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Integration/IntegrationGeneratorConfigurationBase.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Integration/IntegrationGeneratorConfigurationBase.cs index 0873050b1..800ff205f 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Integration/IntegrationGeneratorConfigurationBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Integration/IntegrationGeneratorConfigurationBase.cs @@ -1,5 +1,7 @@ using System.CodeDom; +using Anch.SecuritySystem; + using Framework.BLL.Domain.DirectMode; using Framework.CodeGeneration.BLLCoreGenerator.Extensions; using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators; @@ -9,8 +11,6 @@ using Framework.FileGeneration.Configuration; using Framework.Projection; -using Anch.SecuritySystem; - namespace Framework.CodeGeneration.ServiceModelGenerator.Configuration.Integration; public abstract class IntegrationGeneratorConfigurationBase(TEnvironment environment) @@ -51,3 +51,4 @@ public override IEnumerable GetMethodGenerators(Type do } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Main/IMainGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Main/IMainGeneratorConfiguration.cs index 3fc2328c9..7c721c9b9 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Main/IMainGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Main/IMainGeneratorConfiguration.cs @@ -9,3 +9,4 @@ public interface IMainGeneratorConfiguration : ICodeGeneratorConfiguration public interface IMainGeneratorConfiguration : IMainGeneratorConfiguration, IServiceModelGeneratorConfiguration where TEnvironment : IServiceModelGenerationEnvironment; + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Main/MainGeneratorConfigurationBase.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Main/MainGeneratorConfigurationBase.cs index eddfc3ebd..34b6b46e6 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Main/MainGeneratorConfigurationBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Main/MainGeneratorConfigurationBase.cs @@ -163,3 +163,4 @@ public override IEnumerable GetMethodGenerators(Type do } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Query/QueryGeneratorConfigurationBase.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Query/QueryGeneratorConfigurationBase.cs index be2169e81..bfbdada3e 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Query/QueryGeneratorConfigurationBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Query/QueryGeneratorConfigurationBase.cs @@ -24,3 +24,4 @@ public override IEnumerable GetMethodGenerators(Type do } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Query/QueryServiceMethodGeneratorCollection.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Query/QueryServiceMethodGeneratorCollection.cs index 079c1b10a..db4c9677d 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Query/QueryServiceMethodGeneratorCollection.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/Query/QueryServiceMethodGeneratorCollection.cs @@ -90,3 +90,4 @@ private IEnumerable GetODataTreeFilterTypes() IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/ServiceModelGeneratorBase.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/ServiceModelGeneratorBase.cs index e7132cfef..ab76480bf 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/ServiceModelGeneratorBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/ServiceModelGeneratorBase.cs @@ -54,3 +54,4 @@ public virtual IEnumerable GetAccumulateMethodGenerator yield break; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/ServiceModelGeneratorConfigurationExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/ServiceModelGeneratorConfigurationExtensions.cs index 575153145..08b8ee6f6 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/ServiceModelGeneratorConfigurationExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Configuration/ServiceModelGeneratorConfigurationExtensions.cs @@ -1,4 +1,5 @@ using System.CodeDom; + using Framework.BLL; using Framework.CodeDom.Extensions; using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators; @@ -83,3 +84,4 @@ public CodeExpression GetByCodeExpr(CodeExpression bllRefExpr, CodeExpression pa } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/DTOGeneratePolicy/DTOServiceGeneratePolicy.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/DTOGeneratePolicy/DTOServiceGeneratePolicy.cs index dbdba50dd..03b5c7f82 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/DTOGeneratePolicy/DTOServiceGeneratePolicy.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/DTOGeneratePolicy/DTOServiceGeneratePolicy.cs @@ -46,3 +46,4 @@ public bool Used(Type domainType, RoleFileType fileType) return this.cache.Contains(new Tuple(domainType, fileType)); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Extensions/CodeExpressionExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Extensions/CodeExpressionExtensions.cs index 6f6afb8b7..7ea39786e 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Extensions/CodeExpressionExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Extensions/CodeExpressionExtensions.cs @@ -20,3 +20,4 @@ public static CodeExpression GetMappingService(this CodeExpression evaluateDataE return evaluateDataExpr.ToPropertyReference("MappingService"); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Extensions/TypeExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Extensions/TypeExtensions.cs index 9e499aa05..cdfae165f 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Extensions/TypeExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/Extensions/TypeExtensions.cs @@ -25,3 +25,4 @@ public static IEnumerable GetViewDTOTypes(this Type type) } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/FileFactory/AccumImplementFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/FileFactory/AccumImplementFileFactory.cs index 79a8192d3..e7f1c0592 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/FileFactory/AccumImplementFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/FileFactory/AccumImplementFileFactory.cs @@ -26,3 +26,4 @@ from method in methodGenerator.GetFacadeMethods() select method; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/FileFactory/FileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/FileFactory/FileFactory.cs index d4e01a7a4..e0fd8f52e 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/FileFactory/FileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/FileFactory/FileFactory.cs @@ -9,3 +9,4 @@ public abstract class FileFactory(TConfiguration configuration, { protected IEnumerable GetMethodGenerators() => this.Configuration.GetActualMethodGenerators(this.DomainType!); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/FileFactory/ImplementFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/FileFactory/ImplementFileFactory.cs index 5ca94640c..6476e4d8a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/FileFactory/ImplementFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/FileFactory/ImplementFileFactory.cs @@ -1,4 +1,5 @@ using System.CodeDom; + using Framework.CodeGeneration.ServiceModelGenerator.Configuration; namespace Framework.CodeGeneration.ServiceModelGenerator.FileFactory; @@ -25,3 +26,4 @@ from method in methodGenerator.GetFacadeMethods() select method; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/GeneratePolicy/DefaultServiceGeneratePolicy.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/GeneratePolicy/DefaultServiceGeneratePolicy.cs index 3c497dac9..ae4b84bd8 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/GeneratePolicy/DefaultServiceGeneratePolicy.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/GeneratePolicy/DefaultServiceGeneratePolicy.cs @@ -205,3 +205,4 @@ public virtual bool Used(Type baseDomainType, MethodIdentity identity) } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/GeneratePolicy/GeneratePolicyExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/GeneratePolicy/GeneratePolicyExtensions.cs index 430dd3bf5..af251cf7b 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/GeneratePolicy/GeneratePolicyExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/GeneratePolicy/GeneratePolicyExtensions.cs @@ -22,3 +22,4 @@ public static IGeneratePolicy Except(this IGeneratePolicy hash.Contains(identity)); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectPropertyRevisionsByDateRangeMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectPropertyRevisionsByDateRangeMethodGenerator.cs index 8b9f86362..9312433d8 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectPropertyRevisionsByDateRangeMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectPropertyRevisionsByDateRangeMethodGenerator.cs @@ -27,3 +27,4 @@ public class GetObjectPropertyRevisionsByDateRangeMethodGenerator GetBLLMethodParameters() => base.GetBLLMethodParameters().Concat([this.PeriodParameter.ToVariableReferenceExpression()]); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectPropertyRevisionsMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectPropertyRevisionsMethodGenerator.cs index 0ad430e71..647bb150f 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectPropertyRevisionsMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectPropertyRevisionsMethodGenerator.cs @@ -14,3 +14,4 @@ public class GetObjectPropertyRevisionsMethodGenerator(TConfigur protected override string GetComment() => $"Get {this.DomainType.Name} Property Revisions"; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectPropertyRevisionsMethodGeneratorBase.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectPropertyRevisionsMethodGeneratorBase.cs index d0d88f531..8e94ee4e1 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectPropertyRevisionsMethodGeneratorBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectPropertyRevisionsMethodGeneratorBase.cs @@ -1,6 +1,7 @@ using System.CodeDom; using Anch.Core; + using Framework.BLL.Domain.DTO; using Framework.BLL.Domain.ServiceRole; using Framework.CodeDom.Extensions; @@ -60,3 +61,4 @@ protected virtual IEnumerable GetBLLMethodParameters() yield return this.PropertyNameParameter.ToVariableReferenceExpression(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectRevisionsMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectRevisionsMethodGenerator.cs index d597af20f..fe8142e19 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectRevisionsMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectRevisionsMethodGenerator.cs @@ -40,3 +40,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectWithRevisionMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectWithRevisionMethodGenerator.cs index 079c874b8..21e0652aa 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectWithRevisionMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Audit/GetObjectWithRevisionMethodGenerator.cs @@ -23,7 +23,7 @@ public GetObjectWithRevisionMethodGenerator(TConfiguration configuration, Type d protected override CodeTypeReference ReturnType => this.Configuration.Environment.ServerDTO.GetCodeTypeReference(this.DomainType, this.DTOType); - private CodeParameterDeclarationExpression RevisionParameter => new(typeof (long), "revision"); + private CodeParameterDeclarationExpression RevisionParameter => new(typeof(long), "revision"); protected override string GetComment() => $"Get {this.DomainType.Name} ({this.DTOType}) by revision"; @@ -49,3 +49,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/AddAttachmentMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/AddAttachmentMethodGenerator.cs index e60206a9c..072648a69 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/AddAttachmentMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/AddAttachmentMethodGenerator.cs @@ -70,3 +70,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/FileStoreMethodGeneratorBase.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/FileStoreMethodGeneratorBase.cs index 3e7fb72dd..a62638ea0 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/FileStoreMethodGeneratorBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/FileStoreMethodGeneratorBase.cs @@ -1,5 +1,7 @@ using System.CodeDom; +using Anch.SecuritySystem; + using Framework.BLL; using Framework.BLL.Domain.ServiceRole; using Framework.CodeDom.Extensions; @@ -7,8 +9,6 @@ using Framework.CodeGeneration.ServiceModelGenerator.Configuration.FileStore; using Framework.CodeGeneration.ServiceModelGenerator.Extensions; -using Anch.SecuritySystem; - namespace Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.FileStore; public abstract class FileStoreMethodGeneratorBase(TConfiguration configuration, Type domainType) @@ -74,3 +74,4 @@ private CodeVariableDeclarationStatement GetTargetBLLVariableDeclaration(CodeExp return bllRef.ToVariableDeclarationStatement("targetBLL", bllCreateExpr); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/GetAttachmentWebGetMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/GetAttachmentWebGetMethodGenerator.cs index fa62b1950..3e075d4f2 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/GetAttachmentWebGetMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/GetAttachmentWebGetMethodGenerator.cs @@ -151,3 +151,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( yield return result; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/GetFileContainerMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/GetFileContainerMethodGenerator.cs index 496e15811..881227fa7 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/GetFileContainerMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/GetFileContainerMethodGenerator.cs @@ -50,3 +50,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( yield return this.ReturnType.ToObjectCreateExpression(evaluateDataExpr.GetMappingService(), resultDecl.ToVariableReferenceExpression()).ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/RemoveAttachmentMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/RemoveAttachmentMethodGenerator.cs index aac8dd52a..05557cf9f 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/RemoveAttachmentMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/FileStore/RemoveAttachmentMethodGenerator.cs @@ -59,3 +59,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/IServiceMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/IServiceMethodGenerator.cs index a9d8d5213..621600aea 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/IServiceMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/IServiceMethodGenerator.cs @@ -10,3 +10,4 @@ public interface IServiceMethodGenerator IEnumerable GetFacadeMethods(); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Remove/IntegrationRemoveMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Remove/IntegrationRemoveMethodGenerator.cs index f4481b1af..e657b756c 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Remove/IntegrationRemoveMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Remove/IntegrationRemoveMethodGenerator.cs @@ -50,3 +50,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( yield return bllRefExpr.ToMethodInvokeExpression("Remove", domainObjectVarDecl.ToVariableReferenceExpression()).ToExpressionStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/Base/IntegrationMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/Base/IntegrationMethodGenerator.cs index df568f3a4..27fd3099a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/Base/IntegrationMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/Base/IntegrationMethodGenerator.cs @@ -1,5 +1,7 @@ using System.CodeDom; +using Anch.SecuritySystem; + using Framework.BLL; using Framework.BLL.Domain.ServiceRole; using Framework.CodeDom.Extensions; @@ -7,8 +9,6 @@ using Framework.CodeGeneration.ServiceModelGenerator.Configuration.Integration; using Framework.CodeGeneration.ServiceModelGenerator.Extensions; -using Anch.SecuritySystem; - namespace Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.Integration.Save.Base; public abstract class IntegrationMethodGenerator(TConfiguration configuration, Type domainType) @@ -30,3 +30,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToExpressionStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/ByModel/IntegrationBaseSaveMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/ByModel/IntegrationBaseSaveMethodGenerator.cs index ab2726ea0..f88e6bad6 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/ByModel/IntegrationBaseSaveMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/ByModel/IntegrationBaseSaveMethodGenerator.cs @@ -1,4 +1,5 @@ using System.CodeDom; + using Framework.BLL.Domain.DTO; using Framework.BLL.Domain.ServiceRole; using Framework.CodeGeneration.ServiceModelGenerator.Configuration; @@ -27,3 +28,4 @@ protected IntegrationBaseSaveMethodGenerator(TConfiguration configuration, Type .GetCodeTypeReference(this.DomainType, DTOGenerator.Server.ServerFileType.RichIntegrationDTO); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/ByModel/IntegrationSaveModelMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/ByModel/IntegrationSaveModelMethodGenerator.cs index d9710aa74..55a36e048 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/ByModel/IntegrationSaveModelMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/ByModel/IntegrationSaveModelMethodGenerator.cs @@ -5,7 +5,6 @@ using Framework.BLL.Domain.DTO; using Framework.BLL.Domain.Models; using Framework.BLL.Domain.ServiceRole; - using Framework.CodeDom.Extensions; using Framework.CodeGeneration.BLLCoreGenerator.Extensions; using Framework.CodeGeneration.DTOGenerator.Server; @@ -76,7 +75,7 @@ protected override IEnumerable GetFacadeMethodInternalStatements( if (null == integrationVersionProperty) { - yield return bllRefExpr.ToMethodInvokeExpression(this.Configuration.Environment.BLLCore.IntegrationSaveMethodName,integrationSaveModelDecl.ToVariableReferenceExpression()) + yield return bllRefExpr.ToMethodInvokeExpression(this.Configuration.Environment.BLLCore.IntegrationSaveMethodName, integrationSaveModelDecl.ToVariableReferenceExpression()) .ToStaticMethodInvokeExpression(this.GetConvertToDTOMethod(DTOType.IdentityDTO)) .ToMethodReturnStatement(); } @@ -100,15 +99,15 @@ protected override IEnumerable GetFacadeMethodInternalStatements( dtoVersion); yield return new CodeConditionStatement(less) - { - TrueStatements = + { + TrueStatements = { savingModelRef.ToPropertyReference(integrationVersionProperty.Name).ToAssignStatement(saveObjectDecl.ToVariableReferenceExpression().ToPropertyReference(integrationVersionProperty.Name)), bllRefExpr.ToMethodInvokeExpression( this.Configuration.Environment.BLLCore.IntegrationSaveMethodName, integrationSaveModelDecl.ToVariableReferenceExpression()) } - }; + }; yield return saveObjectDecl.ToVariableReferenceExpression() .ToStaticMethodInvokeExpression(this.GetConvertToDTOMethod(DTOType.IdentityDTO)) @@ -117,3 +116,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/Extensions.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/Extensions.cs index ecc6c705e..1358eee10 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/Extensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/Extensions.cs @@ -12,3 +12,4 @@ internal static CodeBinaryOperatorType ToCodeBinaryOperator(this PropertyInfo in ? CodeBinaryOperatorType.LessThanOrEqual : CodeBinaryOperatorType.LessThan; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/IntegrationSaveManyMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/IntegrationSaveManyMethodGenerator.cs index 46a7a737f..c924a6f89 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/IntegrationSaveManyMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/IntegrationSaveManyMethodGenerator.cs @@ -70,11 +70,11 @@ protected override IEnumerable GetFacadeMethodInternalStatements( new CodeLambdaExpression { - Parameters = + Parameters = { lambdaParam }, - Statements = + Statements = { new CodeThisReferenceExpression().ToMethodInvokeExpression(this.singleSaveGenerator.InternalName, lambdaParam.ToVariableReferenceExpression(), evaluateDataExpr, bllRefExpr ) } @@ -91,3 +91,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/IntegrationSaveMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/IntegrationSaveMethodGenerator.cs index 39c133641..f1e6a5925 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/IntegrationSaveMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Integration/Save/IntegrationSaveMethodGenerator.cs @@ -61,11 +61,11 @@ protected override IEnumerable GetFacadeMethodInternalStatements( public CodeMemberMethod GetFacadeMethodWithBLL(CodeParameterDeclarationExpression evaluateDataParameterExpr, CodeParameterDeclarationExpression bllParameterExpr) => new CodeMemberMethod - { - Attributes = MemberAttributes.Family, - Name = this.InternalName, - ReturnType = this.ReturnType, - }.WithParameters(this.Parameters.Concat([evaluateDataParameterExpr, bllParameterExpr])) + { + Attributes = MemberAttributes.Family, + Name = this.InternalName, + ReturnType = this.ReturnType, + }.WithParameters(this.Parameters.Concat([evaluateDataParameterExpr, bllParameterExpr])) .WithStatements(this.GetFacadeMethodWithBLLStatements(evaluateDataParameterExpr.ToVariableReferenceExpression(), bllParameterExpr.ToVariableReferenceExpression())); private IEnumerable GetFacadeMethodWithBLLStatements(CodeExpression evaluateDataExpr, CodeExpression bllRefExpr) @@ -97,12 +97,12 @@ private IEnumerable GetFacadeMethodWithBLLStatements(CodeExpressi if (allowCreate) { yield return new CodeNullConditionStatement(saveObjectRefExpr) - { - TrueStatements = + { + TrueStatements = { this.DomainType.ToTypeReference().ToObjectCreateExpression().ToAssignStatement(saveObjectRefExpr) } - }; + }; } foreach (var codeStatement in this.ProcessIntegrationVersion(saveObjectRefExpr, savingObject, [this.GetMappingMethod(evaluateDataExpr, savingObject, saveObjectDecl),this.GetInsertMethod(bllRefExpr, allowCreate, saveObjectDecl, savingObject) @@ -162,3 +162,4 @@ private CodeStatement GetMappingMethod(CodeExpression evaluateDataExpr, CodeVari evaluateDataExpr.GetMappingService(), saveObjectDecl.ToVariableReferenceExpression()) .ToExpressionStatement(); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/ChangeMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/ChangeMethodGenerator.cs index 1631b360d..f0c9a426f 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/ChangeMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/ChangeMethodGenerator.cs @@ -69,3 +69,4 @@ protected override object GetBLLSecurityParameter(CodeExpression evaluateDataExp return modelSecurityAttribute.SecurityRule; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/CheckAccessMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/CheckAccessMethodGenerator.cs index 40a17f459..36c404231 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/CheckAccessMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/CheckAccessMethodGenerator.cs @@ -52,3 +52,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToExpressionStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/CreateMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/CreateMethodGenerator.cs index 37946cc66..6cd76a45f 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/CreateMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/CreateMethodGenerator.cs @@ -34,7 +34,7 @@ public class CreateMethodGenerator(TConfiguration configuration, protected override IEnumerable GetParameters() { yield return this.Configuration.Environment.ServerDTO.GetCodeTypeReference(this.ModelType, DTOType.StrictDTO) - .ToParameterDeclarationExpression (this.DomainType.Name.ToStartLowerCase() + "CreateModel"); + .ToParameterDeclarationExpression(this.DomainType.Name.ToStartLowerCase() + "CreateModel"); } @@ -67,3 +67,4 @@ protected override object GetBLLSecurityParameter(CodeExpression evaluateDataExp : modelSecurityAttribute.SecurityRule; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/FormatMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/FormatMethodGenerator.cs index 8056c366d..5069da31b 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/FormatMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/FormatMethodGenerator.cs @@ -57,3 +57,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/GetChangeModelMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/GetChangeModelMethodGenerator.cs index 5f1950f85..d97923012 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/GetChangeModelMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/GetChangeModelMethodGenerator.cs @@ -70,3 +70,4 @@ protected override object GetBLLSecurityParameter(CodeExpression evaluateDataExp return modelSecurityAttribute.SecurityRule; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/GetExtendedModelMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/GetExtendedModelMethodGenerator.cs index 9b1a86619..224097d3e 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/GetExtendedModelMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/GetExtendedModelMethodGenerator.cs @@ -67,3 +67,4 @@ protected override object GetBLLSecurityParameter(CodeExpression evaluateDataExp return modelSecurityAttribute.SecurityRule; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/GetMassChangeModelMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/GetMassChangeModelMethodGenerator.cs index 6512a35c1..9be7952b3 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/GetMassChangeModelMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/GetMassChangeModelMethodGenerator.cs @@ -72,3 +72,4 @@ protected override object GetBLLSecurityParameter(CodeExpression evaluateDataExp return modelSecurityAttribute.SecurityRule; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/HasAccessMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/HasAccessMethodGenerator.cs index 202e54769..e2fd9f72e 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/HasAccessMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/HasAccessMethodGenerator.cs @@ -52,3 +52,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/MassChangeMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/MassChangeMethodGenerator.cs index b4ebd2f1f..adab7c067 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/MassChangeMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/MassChangeMethodGenerator.cs @@ -50,14 +50,14 @@ protected override IEnumerable GetFacadeMethodInternalStatements( var domainObjectsRef = changeModelDecl.ToVariableReferenceExpression().ToPropertyReference((IDomainObjectMassChangeModel model) => model.ChangingObjects); yield return new CodeParameterDeclarationExpression { Name = "domainObject" }.Pipe(iterator => new CodeForeachStatement - { - Source = domainObjectsRef, - Iterator = iterator, - Statements = + { + Source = domainObjectsRef, + Iterator = iterator, + Statements = { bllRefExpr.ToMethodInvokeExpression("CheckAccess", iterator.ToVariableReferenceExpression()).ToExpressionStatement() } - }); + }); yield return bllRefExpr.ToMethodInvokeExpression(this.DomainType.GetModelMethodName(this.ModelType, ModelRole.MassChange, false), changeModelDecl.ToVariableReferenceExpression()) @@ -78,3 +78,4 @@ protected override object GetBLLSecurityParameter(CodeExpression evaluateDataExp return modelSecurityAttribute.SecurityRule; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Remove/Base/BaseRemoveMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Remove/Base/BaseRemoveMethodGenerator.cs index 6dc0234b8..fb5994302 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Remove/Base/BaseRemoveMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Remove/Base/BaseRemoveMethodGenerator.cs @@ -23,3 +23,4 @@ protected BaseRemoveMethodGenerator(TConfiguration configuration, Type domainTyp protected sealed override bool IsEdit { get; } = true; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Remove/RemoveManyMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Remove/RemoveManyMethodGenerator.cs index 2c9eb3198..2a337bc4b 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Remove/RemoveManyMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Remove/RemoveManyMethodGenerator.cs @@ -60,11 +60,11 @@ protected override IEnumerable GetFacadeMethodInternalStatements( new CodeLambdaExpression { - Parameters = + Parameters = { lambdaParam }, - Statements = + Statements = { new CodeThisReferenceExpression().ToMethodInvokeExpression(this.singleRemoveGenerator.InternalName, lambdaParam.ToVariableReferenceExpression(), evaluateDataExpr, bllRefExpr) } @@ -81,3 +81,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToExpressionStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Remove/RemoveMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Remove/RemoveMethodGenerator.cs index 221ac7129..bf25ed1a2 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Remove/RemoveMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Remove/RemoveMethodGenerator.cs @@ -47,11 +47,11 @@ protected override IEnumerable GetFacadeMethodInternalStatements( public CodeMemberMethod GetFacadeMethodWithBLL(CodeParameterDeclarationExpression evaluateDataParameterExpr, CodeParameterDeclarationExpression bllParameterExpr) => new CodeMemberMethod - { - Attributes = MemberAttributes.Family, - Name = this.InternalName, - ReturnType = this.ReturnType, - }.WithParameters(this.Parameters.Concat([evaluateDataParameterExpr, bllParameterExpr])) + { + Attributes = MemberAttributes.Family, + Name = this.InternalName, + ReturnType = this.ReturnType, + }.WithParameters(this.Parameters.Concat([evaluateDataParameterExpr, bllParameterExpr])) .WithStatements(this.GetFacadeMethodWithBLLStatements(bllParameterExpr.ToVariableReferenceExpression())); private IEnumerable GetFacadeMethodWithBLLStatements(CodeExpression bllRefExpr) @@ -63,3 +63,4 @@ private IEnumerable GetFacadeMethodWithBLLStatements(CodeExpressi yield return bllRefExpr.ToMethodInvokeExpression("Remove", domainObjectVarDecl.ToVariableReferenceExpression()).ToExpressionStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Save/Base/BaseSaveMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Save/Base/BaseSaveMethodGenerator.cs index 261fc4f8b..9a575a28c 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Save/Base/BaseSaveMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Save/Base/BaseSaveMethodGenerator.cs @@ -40,3 +40,4 @@ protected BaseSaveMethodGenerator(TConfiguration configuration, Type domainType) // return new BLLSaveRoleAttribute { AllowCreate = this.DomainType.HasDefaultConstructor() }; //} } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Save/SaveManyMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Save/SaveManyMethodGenerator.cs index 812e2ee92..0e25c45fb 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Save/SaveManyMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Save/SaveManyMethodGenerator.cs @@ -65,8 +65,8 @@ protected override IEnumerable GetFacadeMethodInternalStatements( new CodeLambdaExpression { - Parameters = { lambdaParam }, - Statements = + Parameters = { lambdaParam }, + Statements = { new CodeThisReferenceExpression().ToMethodInvokeExpression(this.singleSaveGenerator.InternalName, lambdaParam.ToVariableReferenceExpression(), evaluateDataExpr, bllRefExpr) } @@ -83,3 +83,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Save/SaveMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Save/SaveMethodGenerator.cs index 25dbb58bd..a7d93d055 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Save/SaveMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/Save/SaveMethodGenerator.cs @@ -75,3 +75,4 @@ private IEnumerable GetFacadeMethodWithBLLStatements(CodeExpressi .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/SaveExtendedMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/SaveExtendedMethodGenerator.cs index f0bc81d21..b743c5538 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/SaveExtendedMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/SaveExtendedMethodGenerator.cs @@ -53,3 +53,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/UpdateMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/UpdateMethodGenerator.cs index 967038e50..642910b13 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/UpdateMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/UpdateMethodGenerator.cs @@ -66,3 +66,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( // return new BLLSaveRoleAttribute { AllowCreate = this.DomainType.HasDefaultConstructor() }; //} } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListByFilterModelMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListByFilterModelMethodGenerator.cs index 86a874a24..a5a159ff4 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListByFilterModelMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListByFilterModelMethodGenerator.cs @@ -70,3 +70,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( return modelSecurityAttribute.SecurityRule; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListByIdentsMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListByIdentsMethodGenerator.cs index 2bcaf4513..8657f5f65 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListByIdentsMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListByIdentsMethodGenerator.cs @@ -40,3 +40,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListByOperationMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListByOperationMethodGenerator.cs index 2780d56ae..40cef4784 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListByOperationMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListByOperationMethodGenerator.cs @@ -39,3 +39,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListMethodGenerator.cs index 1b12289c1..7c79b79be 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetListMethodGenerator.cs @@ -36,3 +36,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByCodeMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByCodeMethodGenerator.cs index 521c218a7..712b40168 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByCodeMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByCodeMethodGenerator.cs @@ -40,3 +40,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByFilterModelMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByFilterModelMethodGenerator.cs index ff9c7ce79..5bb926cd7 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByFilterModelMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByFilterModelMethodGenerator.cs @@ -64,3 +64,4 @@ protected override object GetBLLSecurityParameter(CodeExpression evaluateDataExp return modelSecurityAttribute.SecurityRule; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByIdentityMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByIdentityMethodGenerator.cs index 56663e623..de9f1aae1 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByIdentityMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByIdentityMethodGenerator.cs @@ -41,3 +41,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByNameMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByNameMethodGenerator.cs index 4bc2158b8..307cc0991 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByNameMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetSingleByNameMethodGenerator.cs @@ -39,3 +39,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetTreeByOperationMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetTreeByOperationMethodGenerator.cs index d0b6ba16b..af567556f 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetTreeByOperationMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/GetTreeByOperationMethodGenerator.cs @@ -48,10 +48,10 @@ protected override IEnumerable GetFacadeMethodInternalStatements( var selectMethod = typeof(HierarchicalNodeExtensions).ToTypeReferenceExpression().ToMethodReferenceExpression(nameof(HierarchicalNodeExtensions.ChangeItem)); var selectLambda = new CodeParameterDeclarationExpression { Name = this.DomainType.Name.ToStartLowerCase() }.Pipe(param => new CodeLambdaExpression - { - Parameters = { param }, - Statements = { param.ToVariableReferenceExpression().Pipe(source => this.ConvertToDTO(source, evaluateDataExpr.GetMappingService())) } - }); + { + Parameters = { param }, + Statements = { param.ToVariableReferenceExpression().Pipe(source => this.ConvertToDTO(source, evaluateDataExpr.GetMappingService())) } + }); var treeDecl = new CodeVariableDeclarationStatement("var", "tree", bllRefExpr.ToMethodReferenceExpression("GetTree").ToMethodInvokeExpression(this.GetFetchRule())); @@ -62,3 +62,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/ViewCollectionMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/ViewCollectionMethodGenerator.cs index 8852dfae2..adc54ecfd 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/ViewCollectionMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/ViewCollectionMethodGenerator.cs @@ -1,4 +1,5 @@ using System.CodeDom; + using Framework.BLL.Domain.DTO; using Framework.CodeDom.Extensions; using Framework.CodeGeneration.ServiceModelGenerator.Configuration; @@ -13,3 +14,4 @@ public abstract class ViewCollectionMethodGenerator(TConfigurati .GetCodeTypeReference(this.DomainType, this.DTOType) .ToEnumerableReference(); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/ViewMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/ViewMethodGenerator.cs index 6e3befe9a..dccaf7fb1 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/ViewMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Main/View/ViewMethodGenerator.cs @@ -1,6 +1,8 @@ using System.CodeDom; using Anch.Core; +using Anch.OData; + using Framework.BLL; using Framework.BLL.Domain.DTO; using Framework.BLL.Domain.DTO.Extensions; @@ -10,8 +12,6 @@ using Framework.CodeGeneration.ServiceModelGenerator.Extensions; using Framework.Core; -using Anch.OData; - namespace Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.Main.View; public abstract class ViewMethodGenerator(TConfiguration configuration, Type domainType, ViewDTOType dtoType) @@ -96,3 +96,4 @@ protected CodeVariableDeclarationStatement ToDomainObjectVarDeclByCode(CodeExpre protected CodeExpression ConvertToDTOList(CodeExpression sourceExpr, CodeExpression mappingServiceExpr) => sourceExpr.ToStaticMethodInvokeExpression(this.GetConvertToDTOListMethod(), mappingServiceExpr); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/MethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/MethodGenerator.cs index 191c8f818..d2dbbaf22 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/MethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/MethodGenerator.cs @@ -2,6 +2,7 @@ using System.Collections.ObjectModel; using Anch.Core; +using Anch.SecuritySystem; using Framework.BLL; using Framework.BLL.Domain.ServiceRole; @@ -14,8 +15,6 @@ using Framework.Database; using Framework.FileGeneration.Configuration; -using Anch.SecuritySystem; - namespace Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators; public abstract class MethodGenerator : GeneratorConfigurationContainer, IServiceMethodGenerator @@ -169,9 +168,12 @@ private CodeMemberMethod GetFacadeMethod(CodeParameterDeclarationExpression eval }); return new CodeMemberMethod - { - Attributes = MemberAttributes.Public, Name = this.Name, ReturnType = this.ReturnType, Statements = { evaluateStatement.ToResultStatement(this.ReturnType) } - }.WithParameters(this.Parameters) + { + Attributes = MemberAttributes.Public, + Name = this.Name, + ReturnType = this.ReturnType, + Statements = { evaluateStatement.ToResultStatement(this.ReturnType) } + }.WithParameters(this.Parameters) .WithComment(this.GetComment()); } @@ -214,3 +216,4 @@ protected CodeVariableDeclarationStatement GetDefaultBLLVariableDeclaration( return bllRef.ToVariableDeclarationStatement(varName, bllCreateExpr); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/ModelMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/ModelMethodGenerator.cs index 4a113f29d..2f610d0e9 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/ModelMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/ModelMethodGenerator.cs @@ -36,3 +36,4 @@ protected ModelMethodGenerator(TConfiguration configuration, Type domainType, Ty this.ModelType.GetCustomAttribute().Maybe(attr => attr.SessionMode, () => base.SessionMode); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/Base/GetByODataQueryMethodGeneratorBase.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/Base/GetByODataQueryMethodGeneratorBase.cs index 7cace849c..53d1bf643 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/Base/GetByODataQueryMethodGeneratorBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/Base/GetByODataQueryMethodGeneratorBase.cs @@ -1,13 +1,13 @@ using System.CodeDom; using Anch.Core; +using Anch.OData.Domain; using Framework.BLL.Domain.DTO; using Framework.CodeDom.Extensions; using Framework.CodeGeneration.ServiceModelGenerator.Configuration; using Framework.CodeGeneration.ServiceModelGenerator.Extensions; using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.Main.View; -using Anch.OData.Domain; namespace Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.Query.OData.Base; @@ -47,3 +47,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/Base/GetByODataQueryWithFilterMethodGeneratorBase.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/Base/GetByODataQueryWithFilterMethodGeneratorBase.cs index 939669e86..72a66455d 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/Base/GetByODataQueryWithFilterMethodGeneratorBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/Base/GetByODataQueryWithFilterMethodGeneratorBase.cs @@ -1,6 +1,7 @@ using System.CodeDom; using Anch.Core; +using Anch.OData.Domain; using Framework.BLL.Domain.DTO; using Framework.BLL.Domain.Extensions; @@ -8,7 +9,6 @@ using Framework.CodeGeneration.ServiceModelGenerator.Configuration; using Framework.CodeGeneration.ServiceModelGenerator.Extensions; using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.Main.View; -using Anch.OData.Domain; namespace Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.Query.OData.Base; @@ -71,3 +71,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataListByQueryStringMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataListByQueryStringMethodGenerator.cs index 98394080b..3e0f229e1 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataListByQueryStringMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataListByQueryStringMethodGenerator.cs @@ -27,3 +27,4 @@ protected override IEnumerable GetParameters yield return typeof(string).ToTypeReference().ToParameterDeclarationExpression("odataQueryString"); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataListByQueryStringWithFilterMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataListByQueryStringWithFilterMethodGenerator.cs index c810d9e14..d0ccb914c 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataListByQueryStringWithFilterMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataListByQueryStringWithFilterMethodGenerator.cs @@ -38,3 +38,4 @@ protected override IEnumerable GetParameters .ToParameterDeclarationExpression("filter"); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataListByQueryStringWithOperationMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataListByQueryStringWithOperationMethodGenerator.cs index ad9058542..732349cc1 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataListByQueryStringWithOperationMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataListByQueryStringWithOperationMethodGenerator.cs @@ -1,6 +1,7 @@ using System.CodeDom; using Anch.Core; +using Anch.OData.Domain; using Framework.BLL.Domain.DTO; using Framework.BLL.Domain.DTO.Extensions; @@ -10,8 +11,6 @@ using Framework.CodeGeneration.ServiceModelGenerator.Extensions; using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.Query.OData.Base; -using Anch.OData.Domain; - namespace Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.Query.OData; public class GetODataListByQueryStringWithOperationMethodGenerator : GetByODataQueryMethodGeneratorBase @@ -45,10 +44,10 @@ protected override IEnumerable GetFacadeMethodInternalStatements( var selectMethod = typeof(SelectOperationResultExtensions).ToTypeReferenceExpression().ToMethodReferenceExpression(nameof(SelectOperationResultExtensions.Select)); var selectLambda = new CodeParameterDeclarationExpression { Name = this.DomainType.Name.ToStartLowerCase() }.Pipe(param => new CodeLambdaExpression - { - Parameters = { param }, - Statements = { param.ToVariableReferenceExpression().Pipe(source => this.ConvertToDTO(source, evaluateDataExpr.GetMappingService())) } - }); + { + Parameters = { param }, + Statements = { param.ToVariableReferenceExpression().Pipe(source => this.ConvertToDTO(source, evaluateDataExpr.GetMappingService())) } + }); var selectOperationDecl = typeof(SelectOperation<>).ToTypeReference(this.DomainType).ToVariableDeclarationStatement("selectOperation", this.GetSelectOperationExpression(evaluateDataExpr)); @@ -64,3 +63,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataTreeByQueryStringWithFilterMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataTreeByQueryStringWithFilterMethodGenerator.cs index 09cb5b4ae..656e53430 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataTreeByQueryStringWithFilterMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataTreeByQueryStringWithFilterMethodGenerator.cs @@ -1,6 +1,7 @@ using System.CodeDom; using Anch.Core; +using Anch.OData.Domain; using Framework.BLL.Domain.DTO; using Framework.BLL.Domain.DTO.Extensions; @@ -12,9 +13,6 @@ using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.Main.View; using Framework.Core; using Framework.FileGeneration.Configuration; - -using Anch.OData.Domain; - using SelectOperationResultExtensions = Framework.BLL.OData.SelectOperationResultExtensions; namespace Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.Query.OData; @@ -66,10 +64,10 @@ protected override IEnumerable GetFacadeMethodInternalStatements( var selectMethod = typeof(SelectOperationResultExtensions).ToTypeReferenceExpression().ToMethodReferenceExpression(nameof(SelectOperationResultExtensions.ChangeItem)); var selectLambda = new CodeParameterDeclarationExpression { Name = this.DomainType.Name.ToStartLowerCase() }.Pipe(param => new CodeLambdaExpression - { - Parameters = { param }, - Statements = { param.ToVariableReferenceExpression().Pipe(source => this.ConvertToDTO(source, evaluateDataExpr.GetMappingService())) } - }); + { + Parameters = { param }, + Statements = { param.ToVariableReferenceExpression().Pipe(source => this.ConvertToDTO(source, evaluateDataExpr.GetMappingService())) } + }); var selectOperationDecl = typeof(SelectOperation<>).ToTypeReference(this.DomainType) .ToVariableDeclarationStatement("selectOperation", this.GetSelectOperationExpression(evaluateDataExpr)); @@ -85,3 +83,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataTreeByQueryStringWithOperationMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataTreeByQueryStringWithOperationMethodGenerator.cs index e14c078b9..080bebd92 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataTreeByQueryStringWithOperationMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodGenerators/Query/OData/GetODataTreeByQueryStringWithOperationMethodGenerator.cs @@ -1,6 +1,8 @@ using System.CodeDom; using Anch.Core; +using Anch.OData.Domain; +using Anch.SecuritySystem; using Framework.BLL.Domain.DTO; using Framework.BLL.Domain.DTO.Extensions; @@ -11,11 +13,6 @@ using Framework.CodeGeneration.ServiceModelGenerator.Extensions; using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.Main.View; using Framework.FileGeneration.Configuration; - -using Anch.OData.Domain; - -using Anch.SecuritySystem; - using SelectOperationResultExtensions = Framework.BLL.OData.SelectOperationResultExtensions; namespace Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators.Query.OData; @@ -50,10 +47,10 @@ protected override IEnumerable GetParameters yield return typeof(string).ToTypeReference().ToParameterDeclarationExpression("odataQueryString"); yield return new CodeParameterDeclarationExpression - { - Name = "securityRule", - Type = typeof(DomainSecurityRule.ClientSecurityRule).ToTypeReference() - }; + { + Name = "securityRule", + Type = typeof(DomainSecurityRule.ClientSecurityRule).ToTypeReference() + }; } protected override IEnumerable GetFacadeMethodInternalStatements(CodeExpression evaluateDataExpr, CodeExpression bllRefExpr) @@ -61,10 +58,10 @@ protected override IEnumerable GetFacadeMethodInternalStatements( var selectMethod = typeof(SelectOperationResultExtensions).ToTypeReferenceExpression().ToMethodReferenceExpression(nameof(SelectOperationResultExtensions.ChangeItem)); var selectLambda = new CodeParameterDeclarationExpression { Name = this.DomainType.Name.ToStartLowerCase() }.Pipe(param => new CodeLambdaExpression - { - Parameters = { param }, - Statements = { param.ToVariableReferenceExpression().Pipe(source => this.ConvertToDTO(source, evaluateDataExpr.GetMappingService())) } - }); + { + Parameters = { param }, + Statements = { param.ToVariableReferenceExpression().Pipe(source => this.ConvertToDTO(source, evaluateDataExpr.GetMappingService())) } + }); var selectOperationDecl = typeof(SelectOperation<>).ToTypeReference(this.DomainType) .ToVariableDeclarationStatement("selectOperation", this.GetSelectOperationExpression(evaluateDataExpr)); @@ -80,3 +77,4 @@ protected override IEnumerable GetFacadeMethodInternalStatements( .ToMethodReturnStatement(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodIdentity.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodIdentity.cs index 3747aa482..2820ece0d 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodIdentity.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodIdentity.cs @@ -38,9 +38,10 @@ public MethodIdentity(MethodIdentityType type, Type modelType = null, ViewDTOTyp public static implicit operator MethodIdentity(MethodIdentityType type) => type.Maybe(v => new MethodIdentity(v)); - public static bool operator == (MethodIdentity source, MethodIdentity other) => + public static bool operator ==(MethodIdentity source, MethodIdentity other) => ReferenceEquals(source, other) || (!ReferenceEquals(source, null) && source.Equals(other)); public static bool operator !=(MethodIdentity fileType, MethodIdentity other) => !(fileType == other); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodIdentityType.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodIdentityType.cs index 2dea46ee5..5bfc651bb 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodIdentityType.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/MethodIdentityType.cs @@ -164,3 +164,4 @@ public MethodIdentityType(Expression> expr) public static bool operator !=(MethodIdentityType fileType, MethodIdentityType other) => !(fileType == other); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/ServiceModelFileGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/ServiceModelFileGenerator.cs index 7cd0b8e51..2221f000a 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/ServiceModelFileGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.ServiceModelGenerator/ServiceModelFileGenerator.cs @@ -19,3 +19,4 @@ protected override IEnumerable GetInternalFileGenerators() } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/Extensions.cs b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/Extensions.cs index d4c12eaa1..da5ad1a7c 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/Extensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/Extensions.cs @@ -165,3 +165,4 @@ private IEnumerable GetOrdered(CodeParameter .ThenBy(z => z.Name); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/SingleController/SingleControllerCodeFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/SingleController/SingleControllerCodeFileFactory.cs index 654cfd434..9c111a5a3 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/SingleController/SingleControllerCodeFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/SingleController/SingleControllerCodeFileFactory.cs @@ -49,3 +49,4 @@ protected override IEnumerable GetMembers() } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/SingleController/SingleControllerCodeFileGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/SingleController/SingleControllerCodeFileGenerator.cs index dc5f05690..ca510591f 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/SingleController/SingleControllerCodeFileGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/SingleController/SingleControllerCodeFileGenerator.cs @@ -21,3 +21,4 @@ protected override IEnumerable GetInternalFileGenerators() } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreCompositeGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreCompositeGeneratorConfiguration.cs index 75e4bb711..1e2fea171 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreCompositeGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreCompositeGeneratorConfiguration.cs @@ -64,3 +64,4 @@ public bool HasMethods(Type domainType) => public IEnumerable GetAccumulateMethodGenerators() => throw new NotImplementedException(); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreFileFactory.cs index 1edcb886a..386405aa9 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreFileFactory.cs @@ -5,6 +5,7 @@ using Framework.CodeDom; using Framework.CodeDom.Extensions; using Framework.CodeGeneration.ServiceModelGenerator.Configuration; + using Microsoft.AspNetCore.Mvc; namespace Framework.CodeGeneration.WebApiGenerator; @@ -55,3 +56,4 @@ protected override IEnumerable GetMembers() => .Concat(base.GetMembers()) .OrderBy(z => z.Name); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreFileFactoryBase.cs b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreFileFactoryBase.cs index 41f5c0cd2..bd2f77ee6 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreFileFactoryBase.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreFileFactoryBase.cs @@ -24,14 +24,15 @@ protected sealed override CodeTypeDeclaration GetCodeTypeDeclaration() => protected sealed override IEnumerable GetBaseTypes() { var result = new CodeTypeReference(typeof(ApiControllerBase<,>)) - { - TypeArguments = + { + TypeArguments = { this.Configuration.Environment.BLLCore.BLLContextInterfaceTypeReference, this.Configuration.Environment.ServerDTO.DTOMappingServiceInterfaceTypeReference } - }; + }; yield return result; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreFileGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreFileGenerator.cs index 0e201d83e..06b8d4e87 100644 --- a/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreFileGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration.WebApiGenerator/WebApiNetCoreFileGenerator.cs @@ -1,4 +1,5 @@ using System.CodeDom; + using Framework.CodeGeneration.ServiceModelGenerator.Configuration; using Framework.Projection; @@ -56,3 +57,4 @@ protected override IEnumerable GetInternalFileGenerators() } } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/CodeFileGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration/CodeFileGenerator.cs index 2d50eb7c4..b0ffa63fd 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/CodeFileGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/CodeFileGenerator.cs @@ -18,3 +18,4 @@ public abstract class CodeFileGenerator(TConfiguration configura protected abstract IEnumerable GetInternalFileGenerators(); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/Configuration/CodeGenerationEnvironment.cs b/src/CodeGeneration/Framework.CodeGeneration/Configuration/CodeGenerationEnvironment.cs index 600d50fbb..f8bfd2b35 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/Configuration/CodeGenerationEnvironment.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/Configuration/CodeGenerationEnvironment.cs @@ -2,12 +2,12 @@ using System.Linq.Expressions; using System.Reflection; +using Anch.SecuritySystem; + using Framework.Application.Domain; using Framework.Database; using Framework.FileGeneration.Configuration; -using Anch.SecuritySystem; - namespace Framework.CodeGeneration.Configuration; public abstract class CodeGenerationEnvironment( @@ -22,3 +22,4 @@ public abstract class CodeGenerationEnvironment false; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/Configuration/CodeGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration/Configuration/CodeGeneratorConfiguration.cs index bd26f464e..4d449d170 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/Configuration/CodeGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/Configuration/CodeGeneratorConfiguration.cs @@ -16,7 +16,7 @@ public abstract class CodeGeneratorConfiguration : FileGeneratorCo private readonly Lazy defaultNamespaceLazy; protected CodeGeneratorConfiguration(TEnvironment environment) - :base(environment) => + : base(environment) => this.defaultNamespaceLazy = LazyHelper.Create(() => { var request = from prefix in this.Environment.PersistentDomainObjectBaseType.GetNamespacePrefix().ToMaybe() @@ -63,3 +63,4 @@ protected CodeGeneratorConfiguration(TEnvironment environment) protected abstract IEnumerable> GetFileFactoryHeaders(); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/Configuration/CodeGeneratorConfigurationExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration/Configuration/CodeGeneratorConfigurationExtensions.cs index 9431f19d0..362bca0e5 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/Configuration/CodeGeneratorConfigurationExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/Configuration/CodeGeneratorConfigurationExtensions.cs @@ -14,3 +14,4 @@ public static CodeTypeReference GetIdentityObjectCodeTypeReference(this ICodeGen return typeof(IIdentityObject<>).MakeGenericType(configuration.Environment.IdentityProperty.PropertyType).ToTypeReference(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/Configuration/ICodeGenerationEnvironment.cs b/src/CodeGeneration/Framework.CodeGeneration/Configuration/ICodeGenerationEnvironment.cs index 36a825939..2053fe3c6 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/Configuration/ICodeGenerationEnvironment.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/Configuration/ICodeGenerationEnvironment.cs @@ -8,3 +8,4 @@ public interface ICodeGenerationEnvironment : FileGeneration.Configuration.IFile bool IsHierarchical(Type type); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/Configuration/ICodeGeneratorConfiguration.cs b/src/CodeGeneration/Framework.CodeGeneration/Configuration/ICodeGeneratorConfiguration.cs index da4f2c5b7..943a23b6d 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/Configuration/ICodeGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/Configuration/ICodeGeneratorConfiguration.cs @@ -12,3 +12,4 @@ public interface ICodeGeneratorConfiguration : IFileGeneratorConfiguration public interface ICodeGeneratorConfiguration : IFileGeneratorConfiguration, ICodeGeneratorConfiguration where TEnvironment : IFileGenerationEnvironment; + diff --git a/src/CodeGeneration/Framework.CodeGeneration/Configuration/ICodeTypeReferenceService.cs b/src/CodeGeneration/Framework.CodeGeneration/Configuration/ICodeTypeReferenceService.cs index a8409e8ac..b233cc016 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/Configuration/ICodeTypeReferenceService.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/Configuration/ICodeTypeReferenceService.cs @@ -12,3 +12,4 @@ public interface ICodeTypeReferenceService ICodeFileFactoryHeader? GetFileFactoryHeader(TFileType fileType, bool raiseIfNotFound = true); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/Extensions/CodeFileExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration/Extensions/CodeFileExtensions.cs index f5d9302ea..41a7b3255 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/Extensions/CodeFileExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/Extensions/CodeFileExtensions.cs @@ -37,3 +37,4 @@ public VisitedCodeFile(ICodeFile baseCodeFile, CodeDomVisitor visitor) public CodeNamespace GetRenderData() => this.visitor.VisitNamespace(this.baseCodeFile.GetRenderData()); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/Extensions/CodeTypeDeclarationExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration/Extensions/CodeTypeDeclarationExtensions.cs index e4f80a344..98a01827d 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/Extensions/CodeTypeDeclarationExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/Extensions/CodeTypeDeclarationExtensions.cs @@ -45,7 +45,7 @@ public static string GetIntegrationServiceFacadeFileNameFunc(this CodeTypeDeclar } - public static string GetBLLFileNameFunc(this CodeTypeDeclaration typeDecl, string systemName) + public static string GetBLLFileNameFunc(this CodeTypeDeclaration typeDecl, string systemName) { var suffix = ".BLL"; if (typeDecl.Name.EndsWith("Factory")) @@ -129,3 +129,4 @@ public static string GetDefaultGroupName(this CodeTypeDeclaration typeDecl, stri return systemName + suffix + ".Generated"; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/Extensions/FileGeneratorExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration/Extensions/FileGeneratorExtensions.cs index 541a22710..d0da8c435 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/Extensions/FileGeneratorExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/Extensions/FileGeneratorExtensions.cs @@ -89,3 +89,4 @@ public static IEnumerable GenerateGroup(this IFileGenerator GeneratePair(this IFileGenerator generator, string path, string mainFilename, string interfaceFileName, ICheckOutService? checkOutService = null, bool parallel = true) => generator.GenerateGroup(path, delc => delc.IsInterface ? interfaceFileName : mainFilename, checkOutService, parallel); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/FileFactory/CodeFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration/FileFactory/CodeFileFactory.cs index 2c8c399a4..a112d0014 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/FileFactory/CodeFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/FileFactory/CodeFileFactory.cs @@ -76,3 +76,4 @@ public CodeNamespace GetRenderData() => #endregion } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/FileFactory/ICodeFileFactory.cs b/src/CodeGeneration/Framework.CodeGeneration/FileFactory/ICodeFileFactory.cs index df1ec0ffc..ac794f3b1 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/FileFactory/ICodeFileFactory.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/FileFactory/ICodeFileFactory.cs @@ -18,3 +18,4 @@ public interface IFileTypeSource { TFileType FileType { get; } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/GeneratePolicy/CachedGeneratePolicy.cs b/src/CodeGeneration/Framework.CodeGeneration/GeneratePolicy/CachedGeneratePolicy.cs index 3f9a3a84a..0e7ae6260 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/GeneratePolicy/CachedGeneratePolicy.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/GeneratePolicy/CachedGeneratePolicy.cs @@ -40,3 +40,4 @@ protected virtual bool InternalUsed(Type domainType, TIdent fileType) return this.baseGeneratePolicy.Used(domainType, fileType); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/GeneratePolicy/GeneratePolicyExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration/GeneratePolicy/GeneratePolicyExtensions.cs index a67a4bb0c..46cfcbce5 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/GeneratePolicy/GeneratePolicyExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/GeneratePolicy/GeneratePolicyExtensions.cs @@ -254,7 +254,7 @@ public static IGeneratePolicy Any(this IEnumerable.DisableAll, (pol1, pol2) => pol1.Or(pol2)); + return policies.Aggregate(GeneratePolicy.DisableAll, (pol1, pol2) => pol1.Or(pol2)); } /// diff --git a/src/CodeGeneration/Framework.CodeGeneration/ICodeFile.cs b/src/CodeGeneration/Framework.CodeGeneration/ICodeFile.cs index 09a290b39..dbfdc2d03 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/ICodeFile.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/ICodeFile.cs @@ -5,3 +5,4 @@ namespace Framework.CodeGeneration; public interface ICodeFile : IRenderingFile; + diff --git a/src/CodeGeneration/Framework.CodeGeneration/MethodGenerator/IMethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration/MethodGenerator/IMethodGenerator.cs index 077ecc80c..8b3d97d08 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/MethodGenerator/IMethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/MethodGenerator/IMethodGenerator.cs @@ -6,3 +6,4 @@ public interface IMethodGenerator { CodeMemberMethod GetMethod(); } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/MethodGenerator/IMethodGeneratorInfo.cs b/src/CodeGeneration/Framework.CodeGeneration/MethodGenerator/IMethodGeneratorInfo.cs index 3f674163f..5a74506f4 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/MethodGenerator/IMethodGeneratorInfo.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/MethodGenerator/IMethodGeneratorInfo.cs @@ -21,3 +21,4 @@ public static CodeParameterDeclarationExpression GetParameter(this IMethodGenera return info.Parameters.Single(); } } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/MethodGenerator/MethodGenerator.cs b/src/CodeGeneration/Framework.CodeGeneration/MethodGenerator/MethodGenerator.cs index c8b74fa1d..94f2f246f 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/MethodGenerator/MethodGenerator.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/MethodGenerator/MethodGenerator.cs @@ -32,14 +32,15 @@ public abstract class MethodGenerator : IMethodGenerator, IMethodGeneratorInfo public CodeMemberMethod GetMethod() => new CodeMemberMethod - { - Attributes = this.Attributes, + { + Attributes = this.Attributes, - Name = this.Name, + Name = this.Name, - ReturnType = this.ReturnType, - }.WithParameters(this.Parameters) + ReturnType = this.ReturnType, + }.WithParameters(this.Parameters) .WithStatements(this.GetStatements()); IEnumerable IMethodGeneratorInfo.Parameters => this.Parameters; } + diff --git a/src/CodeGeneration/Framework.CodeGeneration/Rendering/CodeDomRendererExtensions.cs b/src/CodeGeneration/Framework.CodeGeneration/Rendering/CodeDomRendererExtensions.cs index 4617fd132..d61c95218 100644 --- a/src/CodeGeneration/Framework.CodeGeneration/Rendering/CodeDomRendererExtensions.cs +++ b/src/CodeGeneration/Framework.CodeGeneration/Rendering/CodeDomRendererExtensions.cs @@ -24,3 +24,4 @@ public static GeneratedFileInfo RenderFile(this IFileRenderer GetDomainTypes() => this.Environment.GetDefaultDomainTypes(); } + diff --git a/src/CodeGeneration/Framework.FileGeneration/Configuration/FileGeneratorConfigurationExtensions.cs b/src/CodeGeneration/Framework.FileGeneration/Configuration/FileGeneratorConfigurationExtensions.cs index 39fa5414e..982119be5 100644 --- a/src/CodeGeneration/Framework.FileGeneration/Configuration/FileGeneratorConfigurationExtensions.cs +++ b/src/CodeGeneration/Framework.FileGeneration/Configuration/FileGeneratorConfigurationExtensions.cs @@ -25,3 +25,4 @@ public bool IsIdentityProperty(PropertyInfo property) } } } + diff --git a/src/CodeGeneration/Framework.FileGeneration/Configuration/IDomainMetadata.cs b/src/CodeGeneration/Framework.FileGeneration/Configuration/IDomainMetadata.cs index ceacae026..cef7caf89 100644 --- a/src/CodeGeneration/Framework.FileGeneration/Configuration/IDomainMetadata.cs +++ b/src/CodeGeneration/Framework.FileGeneration/Configuration/IDomainMetadata.cs @@ -15,3 +15,4 @@ public interface IDomainMetadata Type AuditPersistentDomainObjectBaseType { get; } } + diff --git a/src/CodeGeneration/Framework.FileGeneration/Configuration/IFileGenerationEnvironment.cs b/src/CodeGeneration/Framework.FileGeneration/Configuration/IFileGenerationEnvironment.cs index a39938e9d..9fa8a45fa 100644 --- a/src/CodeGeneration/Framework.FileGeneration/Configuration/IFileGenerationEnvironment.cs +++ b/src/CodeGeneration/Framework.FileGeneration/Configuration/IFileGenerationEnvironment.cs @@ -15,3 +15,4 @@ public interface IFileGenerationEnvironment : IDomainMetadata, IServiceProviderC IPropertyPathService PropertyPathService { get; } } + diff --git a/src/CodeGeneration/Framework.FileGeneration/Configuration/IFileGeneratorConfiguration.cs b/src/CodeGeneration/Framework.FileGeneration/Configuration/IFileGeneratorConfiguration.cs index 81b58939a..044555819 100644 --- a/src/CodeGeneration/Framework.FileGeneration/Configuration/IFileGeneratorConfiguration.cs +++ b/src/CodeGeneration/Framework.FileGeneration/Configuration/IFileGeneratorConfiguration.cs @@ -12,3 +12,4 @@ public interface IFileGeneratorConfiguration : IFileGeneratorC { TEnvironment Environment { get; } } + diff --git a/src/CodeGeneration/Framework.FileGeneration/Extensions/FileGeneratorExtensions.cs b/src/CodeGeneration/Framework.FileGeneration/Extensions/FileGeneratorExtensions.cs index 31d2b0632..f89afa1c6 100644 --- a/src/CodeGeneration/Framework.FileGeneration/Extensions/FileGeneratorExtensions.cs +++ b/src/CodeGeneration/Framework.FileGeneration/Extensions/FileGeneratorExtensions.cs @@ -14,3 +14,4 @@ public static IEnumerable Generate( .Select(fileInfo => fileInfo.WithSave(path, checkOutService)) .ToList(); } + diff --git a/src/CodeGeneration/Framework.FileGeneration/Extensions/TypeExtensions.cs b/src/CodeGeneration/Framework.FileGeneration/Extensions/TypeExtensions.cs index 5f8d316cc..b2d21f9a8 100644 --- a/src/CodeGeneration/Framework.FileGeneration/Extensions/TypeExtensions.cs +++ b/src/CodeGeneration/Framework.FileGeneration/Extensions/TypeExtensions.cs @@ -14,3 +14,4 @@ public static string GetNamespacePrefix(this Type persistentDomainObjectBaseType return @namespace.SkipLast(postfix, false); } } + diff --git a/src/CodeGeneration/Framework.FileGeneration/FileGenerator.cs b/src/CodeGeneration/Framework.FileGeneration/FileGenerator.cs index 5a1ca495f..1ffba9a73 100644 --- a/src/CodeGeneration/Framework.FileGeneration/FileGenerator.cs +++ b/src/CodeGeneration/Framework.FileGeneration/FileGenerator.cs @@ -10,3 +10,4 @@ public abstract class FileGenerator(T public abstract IEnumerable GetFileGenerators(); } + diff --git a/src/CodeGeneration/Framework.FileGeneration/GeneratedFileInfo.cs b/src/CodeGeneration/Framework.FileGeneration/GeneratedFileInfo.cs index 7e2e89653..a25fc7249 100644 --- a/src/CodeGeneration/Framework.FileGeneration/GeneratedFileInfo.cs +++ b/src/CodeGeneration/Framework.FileGeneration/GeneratedFileInfo.cs @@ -68,3 +68,4 @@ public enum State : byte Modified } } + diff --git a/src/CodeGeneration/Framework.FileGeneration/RendererExtensions.cs b/src/CodeGeneration/Framework.FileGeneration/RendererExtensions.cs index d1c57ab61..15b098ba2 100644 --- a/src/CodeGeneration/Framework.FileGeneration/RendererExtensions.cs +++ b/src/CodeGeneration/Framework.FileGeneration/RendererExtensions.cs @@ -12,3 +12,4 @@ public static TResult Render(this IRenderer return renderer.Render(renderingFile.GetRenderData()); } } + diff --git a/src/Configurator/Framework.Configurator.ApplicationVariable/ConfiguratorApplicationVariableModule.cs b/src/Configurator/Framework.Configurator.ApplicationVariable/ConfiguratorApplicationVariableModule.cs index 935603590..d6da1a354 100644 --- a/src/Configurator/Framework.Configurator.ApplicationVariable/ConfiguratorApplicationVariableModule.cs +++ b/src/Configurator/Framework.Configurator.ApplicationVariable/ConfiguratorApplicationVariableModule.cs @@ -1,11 +1,11 @@ -using Framework.Configurator.Handlers; +using Anch.SecuritySystem.Configurator; + +using Framework.Configurator.Handlers; using Framework.Configurator.Interfaces; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem.Configurator; - namespace Framework.Configurator; public class ConfiguratorApplicationVariableModule : IConfiguratorModule @@ -22,3 +22,4 @@ public void MapApi(IEndpointRouteBuilder endpointsBuilder, string route) => endpointsBuilder.Get($"{route}/api/constants") .Post(route + "/api/constant/{name}"); } + diff --git a/src/Configurator/Framework.Configurator.ApplicationVariable/ConfiguratorSetupExtensions.cs b/src/Configurator/Framework.Configurator.ApplicationVariable/ConfiguratorSetupExtensions.cs index e73c0a1bf..99c40a658 100644 --- a/src/Configurator/Framework.Configurator.ApplicationVariable/ConfiguratorSetupExtensions.cs +++ b/src/Configurator/Framework.Configurator.ApplicationVariable/ConfiguratorSetupExtensions.cs @@ -7,3 +7,4 @@ public static class ConfiguratorSetupExtensions public static IConfiguratorSetup AddApplicationVariables(this IConfiguratorSetup setup) => setup.AddModule(new ConfiguratorApplicationVariableModule()); } + diff --git a/src/Configurator/Framework.Configurator.ApplicationVariable/Handlers/GetSystemConstantsHandler.cs b/src/Configurator/Framework.Configurator.ApplicationVariable/Handlers/GetSystemConstantsHandler.cs index b34051c3b..0f33e6d7e 100644 --- a/src/Configurator/Framework.Configurator.ApplicationVariable/Handlers/GetSystemConstantsHandler.cs +++ b/src/Configurator/Framework.Configurator.ApplicationVariable/Handlers/GetSystemConstantsHandler.cs @@ -1,13 +1,13 @@ -using Framework.Application.ApplicationVariable; +using Anch.SecuritySystem; +using Anch.SecuritySystem.Attributes; +using Anch.SecuritySystem.Configurator.Handlers; + +using Framework.Application.ApplicationVariable; using Framework.Configurator.Interfaces; using Framework.Configurator.Models; using Microsoft.AspNetCore.Http; -using Anch.SecuritySystem; -using Anch.SecuritySystem.Attributes; -using Anch.SecuritySystem.Configurator.Handlers; - namespace Framework.Configurator.Handlers; public class GetSystemConstantsHandler( @@ -30,3 +30,4 @@ protected override async Task GetDataAsync(HttpContext context, Cancella } } } + diff --git a/src/Configurator/Framework.Configurator.ApplicationVariable/Handlers/UpdateSystemConstantHandler.cs b/src/Configurator/Framework.Configurator.ApplicationVariable/Handlers/UpdateSystemConstantHandler.cs index bb973c4a3..b9581620a 100644 --- a/src/Configurator/Framework.Configurator.ApplicationVariable/Handlers/UpdateSystemConstantHandler.cs +++ b/src/Configurator/Framework.Configurator.ApplicationVariable/Handlers/UpdateSystemConstantHandler.cs @@ -1,12 +1,12 @@ -using Framework.Application.ApplicationVariable; +using Anch.SecuritySystem; +using Anch.SecuritySystem.Attributes; +using Anch.SecuritySystem.Configurator.Handlers; + +using Framework.Application.ApplicationVariable; using Framework.Configurator.Interfaces; using Microsoft.AspNetCore.Http; -using Anch.SecuritySystem; -using Anch.SecuritySystem.Attributes; -using Anch.SecuritySystem.Configurator.Handlers; - namespace Framework.Configurator.Handlers; public class UpdateSystemConstantHandler( @@ -24,3 +24,4 @@ public async Task Execute(HttpContext context, CancellationToken cancellationTok await variableStorage.UpdateVariableAsync(variableName, newValue, cancellationToken); } } + diff --git a/src/Configurator/Framework.Configurator.ApplicationVariable/Interfaces/IGetSystemConstantsHandler.cs b/src/Configurator/Framework.Configurator.ApplicationVariable/Interfaces/IGetSystemConstantsHandler.cs index bb8766a06..769d23783 100644 --- a/src/Configurator/Framework.Configurator.ApplicationVariable/Interfaces/IGetSystemConstantsHandler.cs +++ b/src/Configurator/Framework.Configurator.ApplicationVariable/Interfaces/IGetSystemConstantsHandler.cs @@ -3,3 +3,4 @@ namespace Framework.Configurator.Interfaces; public interface IGetSystemConstantsHandler : IHandler; + diff --git a/src/Configurator/Framework.Configurator.ApplicationVariable/Interfaces/IUpdateSystemConstantHandler.cs b/src/Configurator/Framework.Configurator.ApplicationVariable/Interfaces/IUpdateSystemConstantHandler.cs index a69287132..9ed5cd5ca 100644 --- a/src/Configurator/Framework.Configurator.ApplicationVariable/Interfaces/IUpdateSystemConstantHandler.cs +++ b/src/Configurator/Framework.Configurator.ApplicationVariable/Interfaces/IUpdateSystemConstantHandler.cs @@ -3,3 +3,4 @@ namespace Framework.Configurator.Interfaces; public interface IUpdateSystemConstantHandler : IHandler; + diff --git a/src/Configurator/Framework.Configurator.Events/ConfiguratorEventModule.cs b/src/Configurator/Framework.Configurator.Events/ConfiguratorEventModule.cs index 865e6b8e8..7428bb5bd 100644 --- a/src/Configurator/Framework.Configurator.Events/ConfiguratorEventModule.cs +++ b/src/Configurator/Framework.Configurator.Events/ConfiguratorEventModule.cs @@ -1,11 +1,11 @@ -using Framework.Configurator.Handlers; +using Anch.SecuritySystem.Configurator; + +using Framework.Configurator.Handlers; using Framework.Configurator.Interfaces; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem.Configurator; - namespace Framework.Configurator; public class ConfiguratorEventModule : IConfiguratorModule @@ -22,3 +22,4 @@ public void MapApi(IEndpointRouteBuilder endpointsBuilder, string route) => endpointsBuilder.Get($"{route}/api/domainTypes") .Post(route + "/api/domainType/{domainTypeName}"); } + diff --git a/src/Configurator/Framework.Configurator.Events/ConfiguratorSetupExtensions.cs b/src/Configurator/Framework.Configurator.Events/ConfiguratorSetupExtensions.cs index cf5860af6..71f7d672c 100644 --- a/src/Configurator/Framework.Configurator.Events/ConfiguratorSetupExtensions.cs +++ b/src/Configurator/Framework.Configurator.Events/ConfiguratorSetupExtensions.cs @@ -6,3 +6,4 @@ public static class ConfiguratorSetupExtensions { public static IConfiguratorSetup AddEvents(this IConfiguratorSetup setup) => setup.AddModule(new ConfiguratorEventModule()); } + diff --git a/src/Configurator/Framework.Configurator.Events/Handlers/ForcePushEventHandler.cs b/src/Configurator/Framework.Configurator.Events/Handlers/ForcePushEventHandler.cs index 076c418af..89209f412 100644 --- a/src/Configurator/Framework.Configurator.Events/Handlers/ForcePushEventHandler.cs +++ b/src/Configurator/Framework.Configurator.Events/Handlers/ForcePushEventHandler.cs @@ -1,12 +1,12 @@ -using Framework.Application.Events; +using Anch.SecuritySystem; +using Anch.SecuritySystem.Attributes; +using Anch.SecuritySystem.Configurator.Handlers; + +using Framework.Application.Events; using Framework.Configurator.Interfaces; using Microsoft.AspNetCore.Http; -using Anch.SecuritySystem; -using Anch.SecuritySystem.Attributes; -using Anch.SecuritySystem.Configurator.Handlers; - // ReSharper disable UnusedAutoPropertyAccessor.Local namespace Framework.Configurator.Handlers; @@ -40,3 +40,4 @@ private class RequestBodyDto public string Ids { get; set; } = null!; } } + diff --git a/src/Configurator/Framework.Configurator.Events/Handlers/GetDomainTypesHandler.cs b/src/Configurator/Framework.Configurator.Events/Handlers/GetDomainTypesHandler.cs index 2bcf539ca..dab6cc649 100644 --- a/src/Configurator/Framework.Configurator.Events/Handlers/GetDomainTypesHandler.cs +++ b/src/Configurator/Framework.Configurator.Events/Handlers/GetDomainTypesHandler.cs @@ -1,14 +1,13 @@ -using Framework.Application.Events; +using Anch.SecuritySystem; +using Anch.SecuritySystem.Attributes; +using Anch.SecuritySystem.Configurator.Handlers; + +using Framework.Application.Events; using Framework.Configurator.Interfaces; using Framework.Configurator.Models; -using Anch.SecuritySystem; - using Microsoft.AspNetCore.Http; -using Anch.SecuritySystem.Attributes; -using Anch.SecuritySystem.Configurator.Handlers; - namespace Framework.Configurator.Handlers; public class GetDomainTypesHandler([WithoutRunAs] ISecuritySystem securitySystem, IEventSystem eventSystem) @@ -23,13 +22,13 @@ protected override async Task GetDataAsync(HttpContext context, Cancella .OrderBy(t => t.AssemblyQualifiedName) .ThenBy(t => t.Name) .Select(t => new DomainTypeDto - { - Name = t.Name, - FullName = t.FullName!, - Operations = eventSystem.DomainObjectEventMetadata.GetEventOperations(t) + { + Name = t.Name, + FullName = t.FullName!, + Operations = eventSystem.DomainObjectEventMetadata.GetEventOperations(t) .OrderBy(o => o.Name) .ToList() - }) + }) .ToList(); } else @@ -38,3 +37,4 @@ protected override async Task GetDataAsync(HttpContext context, Cancella } } } + diff --git a/src/Configurator/Framework.Configurator.Events/Interfaces/IForcePushEventHandler.cs b/src/Configurator/Framework.Configurator.Events/Interfaces/IForcePushEventHandler.cs index 24439f316..89268a871 100644 --- a/src/Configurator/Framework.Configurator.Events/Interfaces/IForcePushEventHandler.cs +++ b/src/Configurator/Framework.Configurator.Events/Interfaces/IForcePushEventHandler.cs @@ -3,3 +3,4 @@ namespace Framework.Configurator.Interfaces; public interface IForcePushEventHandler : IHandler; + diff --git a/src/Configurator/Framework.Configurator.Events/Interfaces/IGetDomainTypesHandler.cs b/src/Configurator/Framework.Configurator.Events/Interfaces/IGetDomainTypesHandler.cs index a6de65557..bbcaf6016 100644 --- a/src/Configurator/Framework.Configurator.Events/Interfaces/IGetDomainTypesHandler.cs +++ b/src/Configurator/Framework.Configurator.Events/Interfaces/IGetDomainTypesHandler.cs @@ -3,3 +3,4 @@ namespace Framework.Configurator.Interfaces; public interface IGetDomainTypesHandler : IHandler; + diff --git a/src/Configurator/Framework.Configurator.Events/Models/DomainTypeDto.cs b/src/Configurator/Framework.Configurator.Events/Models/DomainTypeDto.cs index 7f6c6d73c..06370b08b 100644 --- a/src/Configurator/Framework.Configurator.Events/Models/DomainTypeDto.cs +++ b/src/Configurator/Framework.Configurator.Events/Models/DomainTypeDto.cs @@ -10,3 +10,4 @@ public class DomainTypeDto public List Operations { get; set; } = null!; } + diff --git a/src/Database/Framework.Database.Abstractions/AuditProperty/AuditProperty.cs b/src/Database/Framework.Database.Abstractions/AuditProperty/AuditProperty.cs index 3ee5401b6..e21fb994c 100644 --- a/src/Database/Framework.Database.Abstractions/AuditProperty/AuditProperty.cs +++ b/src/Database/Framework.Database.Abstractions/AuditProperty/AuditProperty.cs @@ -15,3 +15,4 @@ public class AuditProperty( Delegate IAuditProperty.GetCurrentValue => this.GetCurrentValue; } + diff --git a/src/Database/Framework.Database.Abstractions/AuditProperty/AuditPropertyPair.cs b/src/Database/Framework.Database.Abstractions/AuditProperty/AuditPropertyPair.cs index 35a219032..6e3bbbbec 100644 --- a/src/Database/Framework.Database.Abstractions/AuditProperty/AuditPropertyPair.cs +++ b/src/Database/Framework.Database.Abstractions/AuditProperty/AuditPropertyPair.cs @@ -55,3 +55,4 @@ public static AuditPropertyPair obj => obj.ModifiedBy, obj => obj.ModifyDate); } + diff --git a/src/Database/Framework.Database.Abstractions/AuditProperty/IAuditProperty.cs b/src/Database/Framework.Database.Abstractions/AuditProperty/IAuditProperty.cs index 40e5980b5..3d1b485db 100644 --- a/src/Database/Framework.Database.Abstractions/AuditProperty/IAuditProperty.cs +++ b/src/Database/Framework.Database.Abstractions/AuditProperty/IAuditProperty.cs @@ -15,3 +15,4 @@ public interface IAuditProperty : IAuditProperty new Func GetCurrentValue { get; } } + diff --git a/src/Database/Framework.Database.Abstractions/DALChanges/DALChanges.cs b/src/Database/Framework.Database.Abstractions/DALChanges/DALChanges.cs index 28cf0afbd..e1101500e 100644 --- a/src/Database/Framework.Database.Abstractions/DALChanges/DALChanges.cs +++ b/src/Database/Framework.Database.Abstractions/DALChanges/DALChanges.cs @@ -90,13 +90,13 @@ public DALChanges(IEnumerable createdItems, IEnumerable into typeGroup select new - { - typeGroup.Key, - Value = new DALChanges( + { + typeGroup.Key, + Value = new DALChanges( typeGroup.Where(pair => pair.Value == DALObjectChangeType.Created).Select(pair => pair.Object), typeGroup.Where(pair => pair.Value == DALObjectChangeType.Updated).Select(pair => pair.Object), typeGroup.Where(pair => pair.Value == DALObjectChangeType.Removed).Select(pair => pair.Object)) - }; + }; return request.ToDictionary(pair => pair.Key, pair => pair.Value); }); @@ -108,3 +108,4 @@ into typeGroup public Dictionary> GroupByType() => this.lazyGroupByType.Value; } + diff --git a/src/Database/Framework.Database.Abstractions/DALChanges/DALChangesExtensions.cs b/src/Database/Framework.Database.Abstractions/DALChanges/DALChangesExtensions.cs index 543376a1c..cfe0f363b 100644 --- a/src/Database/Framework.Database.Abstractions/DALChanges/DALChangesExtensions.cs +++ b/src/Database/Framework.Database.Abstractions/DALChanges/DALChangesExtensions.cs @@ -105,3 +105,4 @@ from pair in dalChanges.ToChangeTypeDict() } } } + diff --git a/src/Database/Framework.Database.Abstractions/DALExceptions/DalValidationIdentitySource.cs b/src/Database/Framework.Database.Abstractions/DALExceptions/DalValidationIdentitySource.cs index e7e1f6adf..e416f2f66 100644 --- a/src/Database/Framework.Database.Abstractions/DALExceptions/DalValidationIdentitySource.cs +++ b/src/Database/Framework.Database.Abstractions/DALExceptions/DalValidationIdentitySource.cs @@ -8,3 +8,4 @@ public class DalValidationIdentitySource : IDalValidationIdentitySource public string GetPropertyValidationName(PropertyInfo property) => property.Name; } + diff --git a/src/Database/Framework.Database.Abstractions/DALExceptions/UniqueConstraint.cs b/src/Database/Framework.Database.Abstractions/DALExceptions/UniqueConstraint.cs index 4901cbfe1..258d05e0d 100644 --- a/src/Database/Framework.Database.Abstractions/DALExceptions/UniqueConstraint.cs +++ b/src/Database/Framework.Database.Abstractions/DALExceptions/UniqueConstraint.cs @@ -38,3 +38,4 @@ private static string GetFieldName(string columnName) return match.Success ? match.Groups[1].Value : columnName; } } + diff --git a/src/Database/Framework.Database.Abstractions/DALExceptions/UniqueViolationConstraintDALException.cs b/src/Database/Framework.Database.Abstractions/DALExceptions/UniqueViolationConstraintDALException.cs index c2947a56a..208d818b5 100644 --- a/src/Database/Framework.Database.Abstractions/DALExceptions/UniqueViolationConstraintDALException.cs +++ b/src/Database/Framework.Database.Abstractions/DALExceptions/UniqueViolationConstraintDALException.cs @@ -7,3 +7,4 @@ public class UniqueViolationConstraintDALException(UniqueConstraint args, IDalVa { private static string GetMessage(UniqueConstraint constraint, IDalValidationIdentitySource validationIdentitySource) => $"{validationIdentitySource.GetTypeValidationName(constraint.ObjectInfo.Type)} with same:'{constraint.Properties.Join(",")}' already exists"; } + diff --git a/src/Database/Framework.Database.Abstractions/DBSessionManagerExtensions.cs b/src/Database/Framework.Database.Abstractions/DBSessionManagerExtensions.cs index 4bad931ba..5c16a1a97 100644 --- a/src/Database/Framework.Database.Abstractions/DBSessionManagerExtensions.cs +++ b/src/Database/Framework.Database.Abstractions/DBSessionManagerExtensions.cs @@ -27,3 +27,4 @@ public async Task EvaluateAsync(Func> getResult, CancellationToken } } } + diff --git a/src/Database/Framework.Database.Abstractions/DatabaseName.cs b/src/Database/Framework.Database.Abstractions/DatabaseName.cs index f1bb4a4c1..661278c59 100644 --- a/src/Database/Framework.Database.Abstractions/DatabaseName.cs +++ b/src/Database/Framework.Database.Abstractions/DatabaseName.cs @@ -20,3 +20,4 @@ public sealed override string ToString() [Obsolete("Use constructor", true)] public static implicit operator DatabaseName?(string? name) => name.MaybeString(v => new DatabaseName(v)); } + diff --git a/src/Database/Framework.Database.Abstractions/DatabaseNameExtension.cs b/src/Database/Framework.Database.Abstractions/DatabaseNameExtension.cs index 2ff359d93..18ffbf4e9 100644 --- a/src/Database/Framework.Database.Abstractions/DatabaseNameExtension.cs +++ b/src/Database/Framework.Database.Abstractions/DatabaseNameExtension.cs @@ -6,5 +6,5 @@ public static class DatabaseNameExtension /// Создание дефолтного инстанса /// В котором для хранения аудита испльзуется схема appAudit /// - public static AuditDatabaseName ToDefaultAudit(this DatabaseName source) => new (source.Name, source.Schema + "Audit", "appAudit"); + public static AuditDatabaseName ToDefaultAudit(this DatabaseName source) => new(source.Name, source.Schema + "Audit", "appAudit"); } diff --git a/src/Database/Framework.Database.Abstractions/DatabaseSettings.cs b/src/Database/Framework.Database.Abstractions/DatabaseSettings.cs index 35264af28..13014829d 100644 --- a/src/Database/Framework.Database.Abstractions/DatabaseSettings.cs +++ b/src/Database/Framework.Database.Abstractions/DatabaseSettings.cs @@ -10,3 +10,4 @@ public record DatabaseSettings public int? BatchSize { get; init; } = null; } + diff --git a/src/Database/Framework.Database.Abstractions/ExpressionVisitorAggregator.cs b/src/Database/Framework.Database.Abstractions/ExpressionVisitorAggregator.cs index a5a7da2ce..401ad1265 100644 --- a/src/Database/Framework.Database.Abstractions/ExpressionVisitorAggregator.cs +++ b/src/Database/Framework.Database.Abstractions/ExpressionVisitorAggregator.cs @@ -1,4 +1,5 @@ using System.Linq.Expressions; + using Framework.Core; namespace Framework.Database; @@ -13,3 +14,4 @@ public abstract class ExpressionVisitorAggregator : IExpressionVisitorContainer protected abstract IEnumerable GetVisitors(); } + diff --git a/src/Database/Framework.Database.Abstractions/ExpressionVisitorContainer.cs b/src/Database/Framework.Database.Abstractions/ExpressionVisitorContainer.cs index 92c66dfbe..d56d5d99c 100644 --- a/src/Database/Framework.Database.Abstractions/ExpressionVisitorContainer.cs +++ b/src/Database/Framework.Database.Abstractions/ExpressionVisitorContainer.cs @@ -6,3 +6,4 @@ public class ExpressionVisitorContainer(ExpressionVisitor visitor) : IExpression { public ExpressionVisitor Visitor { get; } = visitor; } + diff --git a/src/Database/Framework.Database.Abstractions/IAuditPropertyFactory.cs b/src/Database/Framework.Database.Abstractions/IAuditPropertyFactory.cs index 162bb0cdd..7c5cfe7b8 100644 --- a/src/Database/Framework.Database.Abstractions/IAuditPropertyFactory.cs +++ b/src/Database/Framework.Database.Abstractions/IAuditPropertyFactory.cs @@ -8,3 +8,4 @@ public interface IAuditPropertyFactory AuditPropertyPair GetModifyAuditProperty(); } + diff --git a/src/Database/Framework.Database.Abstractions/IDBSession.cs b/src/Database/Framework.Database.Abstractions/IDBSession.cs index f5b17bdc7..e51dd63c5 100644 --- a/src/Database/Framework.Database.Abstractions/IDBSession.cs +++ b/src/Database/Framework.Database.Abstractions/IDBSession.cs @@ -42,3 +42,4 @@ public interface IDBSession : ICurrentRevisionService, IAsyncDisposable, IDispos void IDisposable.Dispose() => this.DisposeAsync().GetAwaiter().GetResult(); } + diff --git a/src/Database/Framework.Database.Abstractions/IDalValidationIdentitySource.cs b/src/Database/Framework.Database.Abstractions/IDalValidationIdentitySource.cs index b83aab244..65f07981b 100644 --- a/src/Database/Framework.Database.Abstractions/IDalValidationIdentitySource.cs +++ b/src/Database/Framework.Database.Abstractions/IDalValidationIdentitySource.cs @@ -8,3 +8,4 @@ public interface IDalValidationIdentitySource string GetPropertyValidationName(PropertyInfo property); } + diff --git a/src/Database/Framework.Database.Abstractions/IExpressionVisitorContainer.cs b/src/Database/Framework.Database.Abstractions/IExpressionVisitorContainer.cs index c3b093e02..30eb9bbb7 100644 --- a/src/Database/Framework.Database.Abstractions/IExpressionVisitorContainer.cs +++ b/src/Database/Framework.Database.Abstractions/IExpressionVisitorContainer.cs @@ -8,3 +8,4 @@ public interface IExpressionVisitorContainer ExpressionVisitor Visitor { get; } } + diff --git a/src/Database/Framework.Database.Abstractions/IPersistentInfoService.cs b/src/Database/Framework.Database.Abstractions/IPersistentInfoService.cs index a4951a420..2aa9c7dba 100644 --- a/src/Database/Framework.Database.Abstractions/IPersistentInfoService.cs +++ b/src/Database/Framework.Database.Abstractions/IPersistentInfoService.cs @@ -8,3 +8,4 @@ public interface IPersistentInfoService bool IsPersistent(PropertyInfo propertyInfo); } + diff --git a/src/Database/Framework.Database.EntityFramework/DependencyInjection/BssFrameworkBuilderSetupExtensions.cs b/src/Database/Framework.Database.EntityFramework/DependencyInjection/BssFrameworkBuilderSetupExtensions.cs index 32c528308..c36bf81b4 100644 --- a/src/Database/Framework.Database.EntityFramework/DependencyInjection/BssFrameworkBuilderSetupExtensions.cs +++ b/src/Database/Framework.Database.EntityFramework/DependencyInjection/BssFrameworkBuilderSetupExtensions.cs @@ -9,3 +9,4 @@ public static TSelf AddEntityFramework(this IBssFrameworkSetup set setup.AddExtensions(new BssFrameworkExtension(services => services.AddEntityFramework(setupAction))); } + diff --git a/src/Database/Framework.Database.EntityFramework/DependencyInjection/EntityFrameworkSetup.cs b/src/Database/Framework.Database.EntityFramework/DependencyInjection/EntityFrameworkSetup.cs index c6ce4cc90..3f7c385f0 100644 --- a/src/Database/Framework.Database.EntityFramework/DependencyInjection/EntityFrameworkSetup.cs +++ b/src/Database/Framework.Database.EntityFramework/DependencyInjection/EntityFrameworkSetup.cs @@ -1,12 +1,11 @@ using Anch.DependencyInjection; +using Anch.GenericQueryable.DependencyInjection; +using Anch.GenericQueryable.EntityFramework; using Framework.Core; using Framework.Database.EntityFramework.Sessions; using Framework.DependencyInjection; -using Anch.GenericQueryable.DependencyInjection; -using Anch.GenericQueryable.EntityFramework; - using Microsoft.Extensions.DependencyInjection; namespace Framework.Database.EntityFramework.DependencyInjection; @@ -30,3 +29,4 @@ public void Initialize(IServiceCollection services) //services.AddSingleton(); } } + diff --git a/src/Database/Framework.Database.EntityFramework/DependencyInjection/ServiceCollectionExtensions.cs b/src/Database/Framework.Database.EntityFramework/DependencyInjection/ServiceCollectionExtensions.cs index 030de9b71..f86294b89 100644 --- a/src/Database/Framework.Database.EntityFramework/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Database/Framework.Database.EntityFramework/DependencyInjection/ServiceCollectionExtensions.cs @@ -9,3 +9,4 @@ public static class ServiceCollectionExtensions public static IServiceCollection AddEntityFramework(this IServiceCollection services, Action? setupAction = null) => services.Initialize(setupAction); } + diff --git a/src/Database/Framework.Database.EntityFramework/EfAsyncDal.cs b/src/Database/Framework.Database.EntityFramework/EfAsyncDal.cs index ce3841c10..eece38829 100644 --- a/src/Database/Framework.Database.EntityFramework/EfAsyncDal.cs +++ b/src/Database/Framework.Database.EntityFramework/EfAsyncDal.cs @@ -83,3 +83,4 @@ private void CheckWrite() } } } + diff --git a/src/Database/Framework.Database.EntityFramework/Sessions/EfSession.cs b/src/Database/Framework.Database.EntityFramework/Sessions/EfSession.cs index 38d162528..3e3860824 100644 --- a/src/Database/Framework.Database.EntityFramework/Sessions/EfSession.cs +++ b/src/Database/Framework.Database.EntityFramework/Sessions/EfSession.cs @@ -74,3 +74,4 @@ public async ValueTask DisposeAsync() } } } + diff --git a/src/Database/Framework.Database.EntityFramework/Sessions/EfSessionBase.cs b/src/Database/Framework.Database.EntityFramework/Sessions/EfSessionBase.cs index fd4123a2b..23a6de513 100644 --- a/src/Database/Framework.Database.EntityFramework/Sessions/EfSessionBase.cs +++ b/src/Database/Framework.Database.EntityFramework/Sessions/EfSessionBase.cs @@ -34,3 +34,4 @@ public abstract class EfSessionBase(DbContext nativeSession, DBSessionMode sessi public async ValueTask DisposeAsync() => await this.CloseAsync(); } + diff --git a/src/Database/Framework.Database.EntityFramework/Sessions/IEfSession.cs b/src/Database/Framework.Database.EntityFramework/Sessions/IEfSession.cs index 82c47978f..f44775381 100644 --- a/src/Database/Framework.Database.EntityFramework/Sessions/IEfSession.cs +++ b/src/Database/Framework.Database.EntityFramework/Sessions/IEfSession.cs @@ -6,3 +6,4 @@ public interface IEfSession : IDBSession { DbContext NativeSession { get; } } + diff --git a/src/Database/Framework.Database.EntityFramework/Sessions/ReadOnlyEfSession.cs b/src/Database/Framework.Database.EntityFramework/Sessions/ReadOnlyEfSession.cs index 9a0bbae93..0a8cdf8e4 100644 --- a/src/Database/Framework.Database.EntityFramework/Sessions/ReadOnlyEfSession.cs +++ b/src/Database/Framework.Database.EntityFramework/Sessions/ReadOnlyEfSession.cs @@ -55,3 +55,4 @@ public override async Task CloseAsync(CancellationToken cancellationToken = defa public override async Task FlushAsync(CancellationToken cancellationToken = default) => throw new InvalidOperationException(); } + diff --git a/src/Database/Framework.Database.EntityFramework/Sessions/WriteEfSession.cs b/src/Database/Framework.Database.EntityFramework/Sessions/WriteEfSession.cs index 8f621c9e6..9cacc64f2 100644 --- a/src/Database/Framework.Database.EntityFramework/Sessions/WriteEfSession.cs +++ b/src/Database/Framework.Database.EntityFramework/Sessions/WriteEfSession.cs @@ -152,3 +152,4 @@ private async Task FlushAsync(bool withCompleteTransaction, CancellationToken ca } } } + diff --git a/src/Database/Framework.Database.Legacy.Abstractions/IAuditDAL.cs b/src/Database/Framework.Database.Legacy.Abstractions/IAuditDAL.cs index a0f93879e..d82fd946a 100644 --- a/src/Database/Framework.Database.Legacy.Abstractions/IAuditDAL.cs +++ b/src/Database/Framework.Database.Legacy.Abstractions/IAuditDAL.cs @@ -94,3 +94,4 @@ public interface IAuditDAL /// IEnumerable GetIdentiesWithHistory(Expression> query); } + diff --git a/src/Database/Framework.Database.Legacy.Abstractions/IDAL.cs b/src/Database/Framework.Database.Legacy.Abstractions/IDAL.cs index 419b45dbc..fbd20db77 100644 --- a/src/Database/Framework.Database.Legacy.Abstractions/IDAL.cs +++ b/src/Database/Framework.Database.Legacy.Abstractions/IDAL.cs @@ -29,3 +29,4 @@ public interface IDAL : IAuditDAL void Remove(TDomainObject domainObject); } + diff --git a/src/Database/Framework.Database.Legacy.Domain/DomainObjectRevisionBase.cs b/src/Database/Framework.Database.Legacy.Domain/DomainObjectRevisionBase.cs index b389d2507..bff7ffe3b 100644 --- a/src/Database/Framework.Database.Legacy.Domain/DomainObjectRevisionBase.cs +++ b/src/Database/Framework.Database.Legacy.Domain/DomainObjectRevisionBase.cs @@ -12,3 +12,4 @@ public abstract class DomainObjectRevisionBase(TIdent id public IEnumerable RevisionInfos => this.revisionInfos; } + diff --git a/src/Database/Framework.Database.Legacy.Domain/DomainObjectRevisionInfo.cs b/src/Database/Framework.Database.Legacy.Domain/DomainObjectRevisionInfo.cs index ca775f8ce..ca7df06be 100644 --- a/src/Database/Framework.Database.Legacy.Domain/DomainObjectRevisionInfo.cs +++ b/src/Database/Framework.Database.Legacy.Domain/DomainObjectRevisionInfo.cs @@ -20,3 +20,4 @@ public DomainObjectRevisionInfo( DomainObjectRevision IDetail>.Master => this.master; } + diff --git a/src/Database/Framework.Database.Legacy.Domain/ObjectModificationInfo.cs b/src/Database/Framework.Database.Legacy.Domain/ObjectModificationInfo.cs index 4fdc4c4f9..679d9bfc7 100644 --- a/src/Database/Framework.Database.Legacy.Domain/ObjectModificationInfo.cs +++ b/src/Database/Framework.Database.Legacy.Domain/ObjectModificationInfo.cs @@ -3,3 +3,4 @@ namespace Framework.Database.Domain; public record ObjectModificationInfo(TIdent Identity, TypeNameIdentity TypeInfo, ModificationType ModificationType, long Revision); + diff --git a/src/Database/Framework.Database.Legacy.Domain/PropertyRevision.cs b/src/Database/Framework.Database.Legacy.Domain/PropertyRevision.cs index 46d0b1530..c3e3978b8 100644 --- a/src/Database/Framework.Database.Legacy.Domain/PropertyRevision.cs +++ b/src/Database/Framework.Database.Legacy.Domain/PropertyRevision.cs @@ -20,3 +20,4 @@ public PropertyRevision(DomainObjectPropertyRevisions master, DomainObjectPropertyRevisions IDetail>.Master => this.master; } + diff --git a/src/Database/Framework.Database.Mapping/CompositeFieldAttribute.cs b/src/Database/Framework.Database.Mapping/CompositeFieldAttribute.cs index 7d3329c90..b865f1188 100644 --- a/src/Database/Framework.Database.Mapping/CompositeFieldAttribute.cs +++ b/src/Database/Framework.Database.Mapping/CompositeFieldAttribute.cs @@ -1,6 +1,6 @@ namespace Framework.Database.Mapping; -[AttributeUsage (AttributeTargets.Property, AllowMultiple = true)] +[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)] public class CompositeFieldAttribute : Attribute { public string ClassFieldName; diff --git a/src/Database/Framework.Database.Mapping/Extensions/PropertyInfoExtensions.cs b/src/Database/Framework.Database.Mapping/Extensions/PropertyInfoExtensions.cs index 7d83c8739..bdd5821a6 100644 --- a/src/Database/Framework.Database.Mapping/Extensions/PropertyInfoExtensions.cs +++ b/src/Database/Framework.Database.Mapping/Extensions/PropertyInfoExtensions.cs @@ -20,3 +20,4 @@ public static bool IsPersistent(this PropertyInfo propertyInfo) return propertyInfo.GetPrivateField().Maybe(field => !field.HasAttribute()); } } + diff --git a/src/Database/Framework.Database.Mapping/LengthAndPrecisionAttribute.cs b/src/Database/Framework.Database.Mapping/LengthAndPrecisionAttribute.cs index 3b0dc676f..99c2953eb 100644 --- a/src/Database/Framework.Database.Mapping/LengthAndPrecisionAttribute.cs +++ b/src/Database/Framework.Database.Mapping/LengthAndPrecisionAttribute.cs @@ -7,7 +7,7 @@ [AttributeUsage(AttributeTargets.Property)] public class LengthAndPrecisionAttribute(int length, int precision) : Attribute { - public static readonly LengthAndPrecisionAttribute Default = new(19,4); + public static readonly LengthAndPrecisionAttribute Default = new(19, 4); public int Precision => precision; diff --git a/src/Database/Framework.Database.Mapping/NotPersistentFieldAttribute.cs b/src/Database/Framework.Database.Mapping/NotPersistentFieldAttribute.cs index 07cad3dfc..f0f24429d 100644 --- a/src/Database/Framework.Database.Mapping/NotPersistentFieldAttribute.cs +++ b/src/Database/Framework.Database.Mapping/NotPersistentFieldAttribute.cs @@ -1,4 +1,4 @@ namespace Framework.Database.Mapping; -[AttributeUsage (AttributeTargets.Field)] +[AttributeUsage(AttributeTargets.Field)] public class NotPersistentFieldAttribute : Attribute; diff --git a/src/Database/Framework.Database.Metadata/DomainTypeMetadata.cs b/src/Database/Framework.Database.Metadata/DomainTypeMetadata.cs index 8d654a18f..dab79b706 100644 --- a/src/Database/Framework.Database.Metadata/DomainTypeMetadata.cs +++ b/src/Database/Framework.Database.Metadata/DomainTypeMetadata.cs @@ -109,3 +109,4 @@ private List CreateUniqueIndexMetadata() return grouped.Select(z => z.UniqueIndexMetadataCollection.First()).ToList(); } } + diff --git a/src/Database/Framework.Database.Metadata/Extensions.cs b/src/Database/Framework.Database.Metadata/Extensions.cs index b4e2e1664..e34dbc8d9 100644 --- a/src/Database/Framework.Database.Metadata/Extensions.cs +++ b/src/Database/Framework.Database.Metadata/Extensions.cs @@ -1,5 +1,5 @@ -using System.Runtime.CompilerServices; -using System.Reflection; +using System.Reflection; +using System.Runtime.CompilerServices; using Anch.Core; @@ -194,3 +194,4 @@ private static void ProcessDomainTypes(Type[] allTypes, IEnumerable new Exception($"Property for field {fieldMetadata.Name} not found of type:{fieldMetadata.DomainTypeMetadata.DomainType.Name}")); } } + diff --git a/src/Database/Framework.Database.Metadata/InlineTypeFieldMetadata.cs b/src/Database/Framework.Database.Metadata/InlineTypeFieldMetadata.cs index dadcd369a..d85e70ac6 100644 --- a/src/Database/Framework.Database.Metadata/InlineTypeFieldMetadata.cs +++ b/src/Database/Framework.Database.Metadata/InlineTypeFieldMetadata.cs @@ -2,6 +2,7 @@ using System.Runtime.CompilerServices; using Anch.Core; + using Framework.Core; namespace Framework.Database.Metadata; @@ -64,11 +65,11 @@ public InlineTypeFieldMetadata(string name, Type type, IEnumerable at domainTypeMetadata, this)).ToList(); } - public IEnumerable GetPrimitiveTypeFieldMetadata (Type declarationType) + public IEnumerable GetPrimitiveTypeFieldMetadata(Type declarationType) { var parentPrefix = this.Parent.Maybe(z => z.Name, string.Empty); return this.Type.GetInstanceFieldsDeep() - .Select(z => new PrimitiveTypeFieldMetadata(parentPrefix+z.Name, z.FieldType, z.GetAttributes(declarationType) + .Select(z => new PrimitiveTypeFieldMetadata(parentPrefix + z.Name, z.FieldType, z.GetAttributes(declarationType) .Concat(z.GetAttributes(z.DeclaringType)), this.DomainTypeMetadata, z.Name.ToLower() == "id")); } @@ -85,12 +86,12 @@ public IEnumerable GetPrimitiveTypeFieldMetadata (Ty public static class FieldInfoExtension { - public static IEnumerable GetCollectionAttributes (this FieldInfo field, Type declarationType) + public static IEnumerable GetCollectionAttributes(this FieldInfo field, Type declarationType) { var fieldType = field.FieldType; var property = declarationType.GetProperties(BindingFlags.Public | BindingFlags.Instance).FirstOrDefault( - property_ => string.Equals (property_.Name, field.Name, StringComparison.CurrentCultureIgnoreCase)); + property_ => string.Equals(property_.Name, field.Name, StringComparison.CurrentCultureIgnoreCase)); if (null == property) { @@ -99,7 +100,7 @@ public static IEnumerable GetCollectionAttributes (this FieldInfo fie .Where(z => (z.GetGetMethod(true) ?? z.GetSetMethod(true))!.IsDefined(typeof(CompilerGeneratedAttribute), false)) .Select(z => new { GeneratedName = $"<{z.Name}>k__BackingField", Property = z }) .FirstOrDefault(z => string.Equals(z.GeneratedName, field.Name, StringComparison.InvariantCultureIgnoreCase)) - .Maybe(z=>z.Property); + .Maybe(z => z.Property); } if (property != null && fieldType.IsGenericType) @@ -121,17 +122,17 @@ public static IEnumerable GetCollectionAttributes (this FieldInfo fie public static IEnumerable GetAttributes(this FieldInfo field, Type declarationType) { - var property = declarationType.GetPropertyInfoBy (field); + var property = declarationType.GetPropertyInfoBy(field); return property - .Maybe (z => z.GetCustomAttributes()).EmptyIfNull (); + .Maybe(z => z.GetCustomAttributes()).EmptyIfNull(); } private static PropertyInfo? GetPropertyInfoBy(this Type type, FieldInfo fieldInfo) { var result = type.GetProperties().FirstOrDefault( z => fieldInfo.FieldType == z.PropertyType - && string.Equals (z.Name, fieldInfo.Name, StringComparison.CurrentCultureIgnoreCase)); + && string.Equals(z.Name, fieldInfo.Name, StringComparison.CurrentCultureIgnoreCase)); if (null == result) { @@ -139,8 +140,9 @@ public static IEnumerable GetAttributes(this FieldInfo field, Type de { return null; } - return type.BaseType.GetPropertyInfoBy (fieldInfo); + return type.BaseType.GetPropertyInfoBy(fieldInfo); } return result; } } + diff --git a/src/Database/Framework.Database.Metadata/ListTypeFieldMetadata.cs b/src/Database/Framework.Database.Metadata/ListTypeFieldMetadata.cs index 7827de0aa..ae24fd92f 100644 --- a/src/Database/Framework.Database.Metadata/ListTypeFieldMetadata.cs +++ b/src/Database/Framework.Database.Metadata/ListTypeFieldMetadata.cs @@ -63,3 +63,4 @@ public bool Immutable public bool IsCompilerGenerated => this._isCompilerGenerated; } + diff --git a/src/Database/Framework.Database.Metadata/ReferenceTypeFieldMetadata.cs b/src/Database/Framework.Database.Metadata/ReferenceTypeFieldMetadata.cs index 5c946dc5f..a31410ded 100644 --- a/src/Database/Framework.Database.Metadata/ReferenceTypeFieldMetadata.cs +++ b/src/Database/Framework.Database.Metadata/ReferenceTypeFieldMetadata.cs @@ -25,3 +25,4 @@ public CascadeMode CascadeMode } } + diff --git a/src/Database/Framework.Database.Metadata/TypeExtensions.cs b/src/Database/Framework.Database.Metadata/TypeExtensions.cs index c70d4cac3..21bf00b09 100644 --- a/src/Database/Framework.Database.Metadata/TypeExtensions.cs +++ b/src/Database/Framework.Database.Metadata/TypeExtensions.cs @@ -42,3 +42,4 @@ public static bool IsDomainTypeList(this Type type, Type baseDomainType) => public static bool IsDomainType(this Type type, Type baseDomainType) => baseDomainType.IsAssignableFrom(type); } + diff --git a/src/Database/Framework.Database.Metadata/UniqueIndexMetadata.cs b/src/Database/Framework.Database.Metadata/UniqueIndexMetadata.cs index 1aa8eb856..a3d78d5c9 100644 --- a/src/Database/Framework.Database.Metadata/UniqueIndexMetadata.cs +++ b/src/Database/Framework.Database.Metadata/UniqueIndexMetadata.cs @@ -1,4 +1,5 @@ using Anch.Core; + using Framework.Core; namespace Framework.Database.Metadata; @@ -48,3 +49,4 @@ public override bool Equals(object obj) return this.Equals((UniqueIndexMetadata)obj); } } + diff --git a/src/Database/Framework.Database.Metadata/UniqueIndexMetadataReader.cs b/src/Database/Framework.Database.Metadata/UniqueIndexMetadataReader.cs index 6aa71f799..fc41fcd87 100644 --- a/src/Database/Framework.Database.Metadata/UniqueIndexMetadataReader.cs +++ b/src/Database/Framework.Database.Metadata/UniqueIndexMetadataReader.cs @@ -30,10 +30,10 @@ private IEnumerable GetFromTypeAttribute(DomainTypeMetadata z => new { - Source = z, - UniqueGroupLowKeys = z.DomainType.GetCustomAttributes().Select(w => w.Key.MaybeString(e => e.ToLower())).ToList(), - UniqueElementFields = z.GetExpandedUpFields().Where(w => w.GetExpandedAttributes(z.DomainType).OfType().Any()).ToList(), - UniqueElementsLowKeys = z.GetExpandedUpFields().SelectMany(w => w.GetExpandedAttributes(z.DomainType).OfType().Select(e => e.Key.MaybeString(r => r.ToLower()))).Distinct().ToList() + Source = z, + UniqueGroupLowKeys = z.DomainType.GetCustomAttributes().Select(w => w.Key.MaybeString(e => e.ToLower())).ToList(), + UniqueElementFields = z.GetExpandedUpFields().Where(w => w.GetExpandedAttributes(z.DomainType).OfType().Any()).ToList(), + UniqueElementsLowKeys = z.GetExpandedUpFields().SelectMany(w => w.GetExpandedAttributes(z.DomainType).OfType().Select(e => e.Key.MaybeString(r => r.ToLower()))).Distinct().ToList() }) .Where(z => z.UniqueGroupLowKeys.Any() && z.UniqueElementFields.Any() && z.UniqueGroupLowKeys.Intersect(z.UniqueElementsLowKeys).Any()) @@ -41,14 +41,14 @@ private IEnumerable GetFromTypeAttribute(DomainTypeMetadata var keyToUniqueProperties = info.SelectMany(z => z.UniqueGroupLowKeys .Select(w => new - { - Source = z.Source, - LowGroupedKey = w, - UniqueElementFields = z + { + Source = z.Source, + LowGroupedKey = w, + UniqueElementFields = z .UniqueElementFields .Where(u => u.GetExpandedAttributes(z.Source.DomainType).OfType() .Any(q => string.Equals(q.Key, w, StringComparison.InvariantCultureIgnoreCase))), - })) + })) .GroupBy(z => z.LowGroupedKey) .ToList(); @@ -119,3 +119,4 @@ private ReferenceTypeFieldMetadata GetMasterRefMetadata( } } + diff --git a/src/Database/Framework.Database.NHibernate.DALGenerator/Configuration/DALGeneratorConfigurationBase.cs b/src/Database/Framework.Database.NHibernate.DALGenerator/Configuration/DALGeneratorConfigurationBase.cs index e871fc2b7..dc666239b 100644 --- a/src/Database/Framework.Database.NHibernate.DALGenerator/Configuration/DALGeneratorConfigurationBase.cs +++ b/src/Database/Framework.Database.NHibernate.DALGenerator/Configuration/DALGeneratorConfigurationBase.cs @@ -53,3 +53,4 @@ private IMappingGenerator GetMappingGenerator(Assembly assembly) return this.CreateMappingGenerator(assembly, metadata); } } + diff --git a/src/Database/Framework.Database.NHibernate.DALGenerator/Configuration/IDALGenerationEnvironment.cs b/src/Database/Framework.Database.NHibernate.DALGenerator/Configuration/IDALGenerationEnvironment.cs index 31d93cef4..aa52463a4 100644 --- a/src/Database/Framework.Database.NHibernate.DALGenerator/Configuration/IDALGenerationEnvironment.cs +++ b/src/Database/Framework.Database.NHibernate.DALGenerator/Configuration/IDALGenerationEnvironment.cs @@ -3,3 +3,4 @@ namespace Framework.Database.NHibernate.DALGenerator.Configuration; public interface IDALGenerationEnvironment : IFileGenerationEnvironment; + diff --git a/src/Database/Framework.Database.NHibernate.DALGenerator/Configuration/IDALGeneratorConfiguration.cs b/src/Database/Framework.Database.NHibernate.DALGenerator/Configuration/IDALGeneratorConfiguration.cs index 2b77490fa..96a4494f1 100644 --- a/src/Database/Framework.Database.NHibernate.DALGenerator/Configuration/IDALGeneratorConfiguration.cs +++ b/src/Database/Framework.Database.NHibernate.DALGenerator/Configuration/IDALGeneratorConfiguration.cs @@ -10,3 +10,4 @@ public interface IDALGeneratorConfiguration : IFileGeneratorConfiguration { IEnumerable GetMappingGenerators(); } + diff --git a/src/Database/Framework.Database.NHibernate.DALGenerator/DALFileGenerator.cs b/src/Database/Framework.Database.NHibernate.DALGenerator/DALFileGenerator.cs index 98dab4f9f..bf690774d 100644 --- a/src/Database/Framework.Database.NHibernate.DALGenerator/DALFileGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.DALGenerator/DALFileGenerator.cs @@ -24,3 +24,4 @@ public override IEnumerable> GetFileGenerators() } } } + diff --git a/src/Database/Framework.Database.NHibernate.DALGenerator/FileFactory/DALFileFactory.cs b/src/Database/Framework.Database.NHibernate.DALGenerator/FileFactory/DALFileFactory.cs index 5a9a7fd2d..4763cf2a9 100644 --- a/src/Database/Framework.Database.NHibernate.DALGenerator/FileFactory/DALFileFactory.cs +++ b/src/Database/Framework.Database.NHibernate.DALGenerator/FileFactory/DALFileFactory.cs @@ -16,3 +16,4 @@ public class DALFileFactory(TConfiguration configuration, IMappi public XDocument GetRenderData() => mappingGenerator.Generate(); } + diff --git a/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/DomainTypeMetadataExtension.cs b/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/DomainTypeMetadataExtension.cs index 8042158a1..e00998c11 100644 --- a/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/DomainTypeMetadataExtension.cs +++ b/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/DomainTypeMetadataExtension.cs @@ -9,7 +9,7 @@ internal static class DomainTypeMetadataExtension { public static IEnumerable GetManyToOneReference(this DomainTypeMetadata domainTypeMetadata) => domainTypeMetadata.ReferenceFields.Except(domainTypeMetadata.GetOneToOneReference()); - public static IEnumerable GetOneToOneReference( this DomainTypeMetadata domainTypeMetadata) + public static IEnumerable GetOneToOneReference(this DomainTypeMetadata domainTypeMetadata) { var referencies = domainTypeMetadata.ReferenceFields; var toTypes = referencies.Select(z => z.ToType).Distinct(); @@ -21,15 +21,15 @@ public static IEnumerable GetOneToOneReference( this public static FieldMetadata GetIdentityField(this DomainTypeMetadata source) { - var request = from typeMetadata in source.GetAllElements (m => m.Parent) + var request = from typeMetadata in source.GetAllElements(m => m.Parent) from fieldMetaData in typeMetadata.Fields - where string.Equals (fieldMetaData.Name, "Id", StringComparison.InvariantCultureIgnoreCase) + where string.Equals(fieldMetaData.Name, "Id", StringComparison.InvariantCultureIgnoreCase) select fieldMetaData; - return request.Single(() => new ArgumentException ( + return request.Single(() => new ArgumentException( $"Domain type {source.DomainType.Name} has no identity field")); @@ -47,5 +47,6 @@ where string.Equals (fieldMetaData.Name, "Id", StringComparison.InvariantCulture //return identityField; } - public static string GetIdentityFieldName(this DomainTypeMetadata source, Func getIdentityFieldInBdFunc) => source.GetIdentityField ().ToColumnName (z => getIdentityFieldInBdFunc (source)); + public static string GetIdentityFieldName(this DomainTypeMetadata source, Func getIdentityFieldInBdFunc) => source.GetIdentityField().ToColumnName(z => getIdentityFieldInBdFunc(source)); } + diff --git a/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/IMappingGenerator.cs b/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/IMappingGenerator.cs index 530b837fc..a2429cd63 100644 --- a/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/IMappingGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/IMappingGenerator.cs @@ -9,3 +9,4 @@ public interface IMappingGenerator XDocument Generate(); } + diff --git a/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/MappingGenerator.cs b/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/MappingGenerator.cs index 9f945b4bb..656233117 100644 --- a/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/MappingGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/MappingGenerator.cs @@ -39,7 +39,7 @@ public XDocument Generate() this.assemblyGroup .Where(z => !z.DomainType.GetCustomAttributes().Any()) .Where(z => !z.DomainType.GetCustomAttributes().Any()) - .Concat(this.assemblyGroup.SelectMany(z=>z.NotAbstractChildrenDomainTypes.GetAllElements(q=>q.NotAbstractChildrenDomainTypes)).Where(z=>z.IsInlineBaseType)) + .Concat(this.assemblyGroup.SelectMany(z => z.NotAbstractChildrenDomainTypes.GetAllElements(q => q.NotAbstractChildrenDomainTypes)).Where(z => z.IsInlineBaseType)) .OrderBy(meta => meta.DomainType.FullName) .Foreach(z => this.GenerateClassMapping(z, root, null)); @@ -101,7 +101,7 @@ protected virtual void GenerateMappingInlineFields(DomainTypeMetadata domainType protected virtual void GenerateMappingForChildrenTypes(DomainTypeMetadata domainTypeMetadata, XElement rootElement) => domainTypeMetadata.NotAbstractChildrenDomainTypes - .Where(z=>!z.IsInlineBaseType) + .Where(z => !z.IsInlineBaseType) .OrderBy(x => x.DomainType.FullName) .Foreach(z => this.GenerateMappingForChildType(z, rootElement)); @@ -565,3 +565,4 @@ protected virtual void GenerateOneToManyPropertyMapping(ListTypeFieldMetadata li .WithClassAttribute(listTypeFieldMetadata.ElementType.FullName); } } + diff --git a/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/XElementExtensions.cs b/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/XElementExtensions.cs index 37eaa5eab..424caf902 100644 --- a/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/XElementExtensions.cs +++ b/src/Database/Framework.Database.NHibernate.DALGenerator/Internal/XElementExtensions.cs @@ -134,3 +134,4 @@ public static string GetUniqueKeys(this FieldMetadata fieldMetadata) internal static XElement CreateElementWithRootNamespaceHandled(this XElement source, string name) => source.CreateElement(name); } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator.Tests/ChangeDefaultInitializedValueStrategyTest.cs b/src/Database/Framework.Database.NHibernate.DBGenerator.Tests/ChangeDefaultInitializedValueStrategyTest.cs index 896c5d3f7..9d528c604 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator.Tests/ChangeDefaultInitializedValueStrategyTest.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator.Tests/ChangeDefaultInitializedValueStrategyTest.cs @@ -90,3 +90,4 @@ private DatabaseScriptGeneratorStrategyInfo CreateDatabaseScriptGeneratorStrateg private static IEnumerable SkipDefaultTemplate(IEnumerable script) => script.Where(x => x != "GO" && !x.StartsWith("-------------") && x != "use []" + Environment.NewLine && x != Environment.NewLine); } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator.Tests/Support/DatabaseScriptGeneratorContextMockBuilder.cs b/src/Database/Framework.Database.NHibernate.DBGenerator.Tests/Support/DatabaseScriptGeneratorContextMockBuilder.cs index d86208459..a57a84998 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator.Tests/Support/DatabaseScriptGeneratorContextMockBuilder.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator.Tests/Support/DatabaseScriptGeneratorContextMockBuilder.cs @@ -35,3 +35,4 @@ public DatabaseScriptGeneratorContextMockBuilder() public Server MainServer { get; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditDatabaseScriptGenerator.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditDatabaseScriptGenerator.cs index 3b37a43a5..5f8127167 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditDatabaseScriptGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditDatabaseScriptGenerator.cs @@ -19,7 +19,6 @@ using NHibernate.Mapping; using NHibernate.Tool.hbm2ddl; using NHibernate.Util; - using Environment = NHibernate.Cfg.Environment; namespace Framework.Database.NHibernate.DBGenerator.AuditDBGenerator; @@ -392,3 +391,4 @@ private IEnumerable IterateGenerators(Configurat return generators.Values; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditGenerateContext.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditGenerateContext.cs index 60f8deb7d..5c95cd8ea 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditGenerateContext.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditGenerateContext.cs @@ -77,3 +77,4 @@ public AuditGenerateContext( this.OriginalDatabaseMetadata = new DatabaseMetadata(this.OriginalConnection, dialect); } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditSqlScriptGenerator.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditSqlScriptGenerator.cs index 3886c1159..bf2e1baa1 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditSqlScriptGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditSqlScriptGenerator.cs @@ -305,3 +305,4 @@ public string[] GenerateUpdateScripts(AuditTableGenerateContext context) return results.ToArray(); } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditTableGenerateContext.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditTableGenerateContext.cs index 3e1dcb778..1068abea2 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditTableGenerateContext.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/AuditTableGenerateContext.cs @@ -53,3 +53,4 @@ public string GetQualifiedTableName() private string GetQuotedName(string value) => this.Table.IsQuoted ? this.Dialect.QuoteForTableName(value) : value; } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/IColumnMetadataExtended.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/IColumnMetadataExtended.cs index 9df4fd6c6..1833606ac 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/IColumnMetadataExtended.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/IColumnMetadataExtended.cs @@ -6,3 +6,4 @@ internal interface IColumnMetadataExtended : IColumnMetadata { int NumericalScale { get; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/MsSqlDataBaseSchemaExtended.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/MsSqlDataBaseSchemaExtended.cs index 32ad6764c..87f78a986 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/MsSqlDataBaseSchemaExtended.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/AuditDBGenerator/MsSqlDataBaseSchemaExtended.cs @@ -64,3 +64,4 @@ protected void SetNumericalScale(object numericalScaleValue) } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/DatabaseScriptResultDecorator.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/DatabaseScriptResultDecorator.cs index a441d3411..e6d14a482 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/DatabaseScriptResultDecorator.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/DatabaseScriptResultDecorator.cs @@ -37,3 +37,4 @@ public IEnumerable> GetResults() public IDatabaseScriptResult Evaluate() => this.source.Evaluate(); } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/IDatabaseScriptGeneratorContext.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/IDatabaseScriptGeneratorContext.cs index 01c053a66..b03488336 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/IDatabaseScriptGeneratorContext.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/IDatabaseScriptGeneratorContext.cs @@ -23,3 +23,4 @@ public interface IDatabaseScriptGeneratorContext /// AssemblyMetadata AssemblyMetadata { get; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/IDatabaseScriptResult.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/IDatabaseScriptResult.cs index 14f301371..a78c23cb6 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/IDatabaseScriptResult.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/IDatabaseScriptResult.cs @@ -12,3 +12,4 @@ public interface IDatabaseScriptResult IDatabaseScriptResult Evaluate(); } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/IMigrationScriptReader.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/IMigrationScriptReader.cs index 9f4d4b9ce..8e47e7c56 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/IMigrationScriptReader.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/Contracts/IMigrationScriptReader.cs @@ -6,3 +6,4 @@ public interface IMigrationScriptReader { IEnumerable Read(); } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/DBGenerator.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/DBGenerator.cs index fc9c173c0..f5258bfa3 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/DBGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/DBGenerator.cs @@ -139,3 +139,4 @@ protected virtual void FilterMetadata(AssemblyMetadata metadata) { } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/DataTypeComparer.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/DataTypeComparer.cs index 69b57fae0..6e0d030cf 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/DataTypeComparer.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/DataTypeComparer.cs @@ -76,3 +76,4 @@ protected static EqualMode GetEqualMode(DataType dataType) } } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/DatabaseScriptResultFactory.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/DatabaseScriptResultFactory.cs index ad2b6a269..785cd786a 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/DatabaseScriptResultFactory.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/DatabaseScriptResultFactory.cs @@ -98,3 +98,4 @@ public static IDatabaseScriptResult CreateEvaluated(IDatabaseScriptResult genera return generateScript; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/DbGeneratorExtensions.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/DbGeneratorExtensions.cs index 5e22b1597..2655d2714 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/DbGeneratorExtensions.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/DbGeneratorExtensions.cs @@ -19,3 +19,4 @@ public static void ClearIndexies(this Table source) public static IEnumerable GetPersistentReferenceFields(this DomainTypeMetadata source) => source.ReferenceFields.Where(z => !(z.Attributes.OfType().Any(q => q.IsOneToOne))); } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/IDBGenerator.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/IDBGenerator.cs index 60af45664..1962e2531 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/IDBGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/IDBGenerator.cs @@ -12,3 +12,4 @@ void Generate(AssemblyMetadata metadata, DBGeneratorParameters parameters, Modif MergeColumnMode mergeColumnMode); } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/IDataTypeComparer.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/IDataTypeComparer.cs index 7ebf7a220..a51d5cda7 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/IDataTypeComparer.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/IDataTypeComparer.cs @@ -6,3 +6,4 @@ public interface IDataTypeComparer { bool Equals(DataType x, DataType y); } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/SMOObjectExtension.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/SMOObjectExtension.cs index 53c3865ff..e20a0c0cb 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/SMOObjectExtension.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/SMOObjectExtension.cs @@ -6,7 +6,7 @@ public static class SmoObjectExtension { public static void CreateOrAlter(this Table source) { - if(source.State == SqlSmoState.Creating) + if (source.State == SqlSmoState.Creating) { source.Create(); return; @@ -18,3 +18,4 @@ public static void CreateOrAlter(this Table source) } } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/BuilderExtensions.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/BuilderExtensions.cs index ba69b146d..816e5f678 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/BuilderExtensions.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/BuilderExtensions.cs @@ -31,3 +31,4 @@ public static void ValidateConfigurate(this IConfigurable source) } } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Contracts/IAuditDBScriptGeneratorBuilder.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Contracts/IAuditDBScriptGeneratorBuilder.cs index 7c757e394..751835e70 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Contracts/IAuditDBScriptGeneratorBuilder.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Contracts/IAuditDBScriptGeneratorBuilder.cs @@ -18,3 +18,4 @@ public interface IAuditDBScriptGeneratorBuilder : IConfigurable IMigrationScriptGeneratorBuilder MigrationBuilder { get; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Contracts/IConfigurable.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Contracts/IConfigurable.cs index 62051c59e..1deda942d 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Contracts/IConfigurable.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Contracts/IConfigurable.cs @@ -17,3 +17,4 @@ public interface IMigrationScriptGeneratorBuilder : IConfigurable IMigrationScriptGeneratorBuilder WithFolder(string directoryPath); } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Contracts/IMainDBScriptGeneratorBuilder.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Contracts/IMainDBScriptGeneratorBuilder.cs index 3076d74ff..013249cf9 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Contracts/IMainDBScriptGeneratorBuilder.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Contracts/IMainDBScriptGeneratorBuilder.cs @@ -33,3 +33,4 @@ IMainDBScriptGeneratorBuilder WithMain( IMigrationScriptGeneratorBuilder MigrationBuilder { get; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/DatabaseScriptGeneratorContainer.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/DatabaseScriptGeneratorContainer.cs index ab435e645..d27d8bb85 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/DatabaseScriptGeneratorContainer.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/DatabaseScriptGeneratorContainer.cs @@ -33,3 +33,4 @@ private void ValidateAddOperation() } } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/DatascriptGeneratorBuilder.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/DatascriptGeneratorBuilder.cs index 4b6b3602e..d8331a035 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/DatascriptGeneratorBuilder.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/DatascriptGeneratorBuilder.cs @@ -97,3 +97,4 @@ private void ValidateConfiguration() } } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/EmptyDatabaseScriptGenerator.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/EmptyDatabaseScriptGenerator.cs index 04a2be517..bda6b366e 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/EmptyDatabaseScriptGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/EmptyDatabaseScriptGenerator.cs @@ -12,3 +12,4 @@ private EmptyDatabaseScriptGenerator() } public IDatabaseScriptResult GenerateScript(IDatabaseScriptGeneratorContext context) => DatabaseScriptResultFactory.Create(new Dictionary>>()); } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Impl/AuditDBScriptGeneratorBuilder.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Impl/AuditDBScriptGeneratorBuilder.cs index c645f2536..435c310b2 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Impl/AuditDBScriptGeneratorBuilder.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Impl/AuditDBScriptGeneratorBuilder.cs @@ -72,25 +72,25 @@ public IDatabaseScriptGenerator Build(DBGenerateScriptMode mode) var auditDatabaseScriptGenerator = new AuditDatabaseScriptGenerator(nextMappingSettings, this.auditPostfix); var migrationBuilder = this.migrationBuilder.Build(mode); - var combined = new[] {auditDatabaseScriptGenerator, migrationBuilder}.Combine(); + var combined = new[] { auditDatabaseScriptGenerator, migrationBuilder }.Combine(); switch (mode) { case DBGenerateScriptMode.AppliedOnCopySchemeDatabase: - { - result = combined.Unsafe(false, this.removeSchemaDatabase); - break; - } + { + result = combined.Unsafe(false, this.removeSchemaDatabase); + break; + } case DBGenerateScriptMode.AppliedOnCopySchemeAndDataDatabase: - { - result = combined.Unsafe(false, this.removeSchemaDatabase); - break; - } + { + result = combined.Unsafe(false, this.removeSchemaDatabase); + break; + } default: - { - result = new []{ auditDatabaseScriptGenerator.ToTryCreateDatabase(), migrationBuilder}.Combine(); - break; - } + { + result = new[] { auditDatabaseScriptGenerator.ToTryCreateDatabase(), migrationBuilder }.Combine(); + break; + } } return new ReplaceDatabaseNameDecorator(context => nextMappingSettings.First().AuditDatabase, result); @@ -98,3 +98,4 @@ public IDatabaseScriptGenerator Build(DBGenerateScriptMode mode) public bool IsFrozen { get; set; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Impl/MainDBScriptGeneratorBuilder.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Impl/MainDBScriptGeneratorBuilder.cs index 37f9877b3..8e2853fd9 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Impl/MainDBScriptGeneratorBuilder.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Impl/MainDBScriptGeneratorBuilder.cs @@ -62,21 +62,22 @@ public override IDatabaseScriptGenerator Build(DBGenerateScriptMode mode) switch (mode) { case DBGenerateScriptMode.AppliedOnCopySchemeDatabase: - { - return combined.Unsafe(false, this.removeSchemaDatabase, [this.MigrationDbScriptGeneratorBuilder.TableName]); - } + { + return combined.Unsafe(false, this.removeSchemaDatabase, [this.MigrationDbScriptGeneratorBuilder.TableName]); + } case DBGenerateScriptMode.AppliedOnCopySchemeAndDataDatabase: - { - return combined.Unsafe(true, this.removeSchemaDatabase, [this.MigrationDbScriptGeneratorBuilder.TableName]); - } + { + return combined.Unsafe(true, this.removeSchemaDatabase, [this.MigrationDbScriptGeneratorBuilder.TableName]); + } default: - { - return combined; - } + { + return combined; + } } } public bool IsFrozen { get; internal set; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Impl/MigrationDBScriptGeneratorBuilder.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Impl/MigrationDBScriptGeneratorBuilder.cs index 5ba45430d..cd28704a6 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Impl/MigrationDBScriptGeneratorBuilder.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/Impl/MigrationDBScriptGeneratorBuilder.cs @@ -229,3 +229,4 @@ private List GetExecutedMigrationScripts(IDatabaseScrip } } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/ReplaceDatabaseNameDecorator.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/ReplaceDatabaseNameDecorator.cs index b75fbfecb..92a9add9f 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/ReplaceDatabaseNameDecorator.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGeneratorBuilder/ReplaceDatabaseNameDecorator.cs @@ -34,3 +34,4 @@ public ReplaceDatabaseNameDecorator(FuncСкрипт модификации public IDatabaseScriptResult GenerateScript(IDatabaseScriptGeneratorContext context) => this.source.GenerateScript(new DatabaseScriptGeneratorContext(this.nextDatabaseNameFunc(context), context.SqlDatabaseFactory, context.AssemblyMetadata)); } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/DatabaseScriptGenerator.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/DatabaseScriptGenerator.cs index 3df1c057d..df8fe03e0 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/DatabaseScriptGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/DatabaseScriptGenerator.cs @@ -62,3 +62,4 @@ private static IEnumerable GetScriptGeneratorStrate yield return new ChangeDefaultInitializedValueStrategy(parameter); } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/PostDatabaseScriptGeneratorBase.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/PostDatabaseScriptGeneratorBase.cs index 7e15ea3a8..b0a1f8383 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/PostDatabaseScriptGeneratorBase.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/PostDatabaseScriptGeneratorBase.cs @@ -75,3 +75,4 @@ protected static ReferenceTypeFieldMetadata GetMasterRefMetadata(DomainTypeMetad protected abstract void Apply(IDatabaseScriptGeneratorContext context); } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/RequiredRefDatabaseScriptGenerator.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/RequiredRefDatabaseScriptGenerator.cs index a034b7812..8548a7871 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/RequiredRefDatabaseScriptGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/RequiredRefDatabaseScriptGenerator.cs @@ -7,7 +7,6 @@ using Framework.Restriction; using Microsoft.SqlServer.Management.Smo; - using Index = Microsoft.SqlServer.Management.Smo.Index; namespace Framework.Database.NHibernate.DBGenerator.ScriptGenerators; @@ -68,11 +67,11 @@ protected override void Apply(IDatabaseScriptGeneratorContext context) z => { var newView = new View(z.Database, z.Name, z.Schema) - { - TextHeader = z.TextHeader, - TextBody = z.TextBody, - TextMode = z.TextMode - }; + { + TextHeader = z.TextHeader, + TextBody = z.TextBody, + TextMode = z.TextMode + }; newView.Create(); }); @@ -179,8 +178,8 @@ private void ProcessRequeredAttribute(RequiredRefContext refContext) .Select(z => new { - DomainTypeMetadata = z, - RequeredFields = z.Fields.Where(q => !(q is ListTypeFieldMetadata)) + DomainTypeMetadata = z, + RequeredFields = z.Fields.Where(q => !(q is ListTypeFieldMetadata)) .Where(q => q.Attributes.OfType().Any()).ToList() }) .SelectMany(z => z.RequeredFields.Select(q => new { DomainTypeMetadata = z.DomainTypeMetadata, RequeredField = q })) @@ -310,3 +309,4 @@ private class RequiredRefContext(IDatabaseScriptGeneratorContext contex) public void Add(View view) => this.Add([view]); } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/AddOrUpdateStrategy.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/AddOrUpdateStrategy.cs index d117a986d..49b998f58 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/AddOrUpdateStrategy.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/AddOrUpdateStrategy.cs @@ -157,3 +157,4 @@ private Column CreateColumn(Table table, string fieldName, DataType dataType, bo return result; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/ChangeDefaultInitializedValueStrategy.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/ChangeDefaultInitializedValueStrategy.cs index 046a4012f..88bb3dafe 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/ChangeDefaultInitializedValueStrategy.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/ChangeDefaultInitializedValueStrategy.cs @@ -52,3 +52,4 @@ private void ChangeInitializedValueVersionColumns( this.Server.ConnectionContext.CapturedSql.Add(ScriptsHelper.KeywordGo); } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/ChangeIndexesStrategy.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/ChangeIndexesStrategy.cs index 9ef6602ea..8fea6f326 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/ChangeIndexesStrategy.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/ChangeIndexesStrategy.cs @@ -6,7 +6,6 @@ using Framework.Database.SqlMapper; using Microsoft.SqlServer.Management.Smo; - using Index = Microsoft.SqlServer.Management.Smo.Index; namespace Framework.Database.NHibernate.DBGenerator.ScriptGenerators.ScriptGeneratorStrategy; @@ -40,9 +39,9 @@ private static IOrderedEnumerable GetExistingIndexColumns(Index index) = private static void CreateNewIndex(Table table, string indexName, IndexKeyType indexKeyType, IEnumerable columnNames) { var index = new Index(table, indexName) - { - IndexKeyType = indexKeyType - }; + { + IndexKeyType = indexKeyType + }; columnNames.Foreach(z => index.IndexedColumns.Add(new IndexedColumn(index, z))); @@ -305,3 +304,4 @@ private bool GenerateForeignKeys(DomainTypeMetadata domainTypeMetadata, Table ta return result; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/DatabaseScriptGeneratorStrategyInfo.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/DatabaseScriptGeneratorStrategyInfo.cs index 989da179a..30221169b 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/DatabaseScriptGeneratorStrategyInfo.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/DatabaseScriptGeneratorStrategyInfo.cs @@ -50,3 +50,4 @@ public DatabaseScriptGeneratorStrategyInfo( this.TypeToDomainTypeMetadataDictionary = context.AssemblyMetadata.DomainTypes.ToDictionary(z => z.DomainType, z => z); } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/RemoveStrategy.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/RemoveStrategy.cs index 715156e33..b7705751c 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/RemoveStrategy.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/RemoveStrategy.cs @@ -88,3 +88,4 @@ private void TryRemoveNotExistColumns(DomainTypeMetadata typeDescription) this.RemoveColumns(table, removableColums); } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/ScriptGeneratorStrategyBase.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/ScriptGeneratorStrategyBase.cs index dbcb04450..6276b17bd 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/ScriptGeneratorStrategyBase.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/ScriptGeneratorStrategy/ScriptGeneratorStrategyBase.cs @@ -65,3 +65,4 @@ private IEnumerable ExecuteEnd() return result; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/DatabaseScriptGeneratorContext.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/DatabaseScriptGeneratorContext.cs index 0ba439f14..83af8a5f0 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/DatabaseScriptGeneratorContext.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/DatabaseScriptGeneratorContext.cs @@ -45,3 +45,4 @@ public DatabaseScriptGeneratorContext(DatabaseName databaseName, ISqlDatabaseFac /// public AssemblyMetadata AssemblyMetadata { get; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/DatabaseScriptGeneratorContextExtension.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/DatabaseScriptGeneratorContextExtension.cs index 17fbbee08..f3dcd8a95 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/DatabaseScriptGeneratorContextExtension.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/DatabaseScriptGeneratorContextExtension.cs @@ -57,3 +57,4 @@ private static Table GetOrCreateTable(this IDatabaseScriptGeneratorContext conte return result; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/ISqlDatabaseFactory.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/ISqlDatabaseFactory.cs index a803a95b5..f4ae7a7ad 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/ISqlDatabaseFactory.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/ISqlDatabaseFactory.cs @@ -27,3 +27,4 @@ public interface ISqlDatabaseFactory /// База данных Microsoft.SqlServer.Management.Smo.Database GetOrCreateDatabase(DatabaseName databaseName); } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/IgnoreLink.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/IgnoreLink.cs index c7a5f83eb..fb35973f4 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/IgnoreLink.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/IgnoreLink.cs @@ -30,7 +30,7 @@ public static IgnoreLink CreateMany(Expression>> throw new ArgumentException("Expected PropertyExpression, actual expression:{0}", collectionExpression.ToString()); } - var memberExpression = (MemberExpression) collectionExpression.Body; + var memberExpression = (MemberExpression)collectionExpression.Body; var member = memberExpression.Member; @@ -46,7 +46,8 @@ private IgnoreLink(PropertyInfo propertyInfo) : this(propertyInfo.DeclaringType) private IgnoreLink(Type fromType) => this.FromType = fromType; - public Type FromType { get; private set;} + public Type FromType { get; private set; } public PropertyInfo MemberInfo { get; private set; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/SqlDatabaseFactory.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/SqlDatabaseFactory.cs index 0f0abe14a..e32683520 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/SqlDatabaseFactory.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/Support/SqlDatabaseFactory.cs @@ -114,3 +114,4 @@ private static void TryCreateSchema(Microsoft.SqlServer.Management.Smo.Database } } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/TryCreateDatabaseScriptGenerator.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/TryCreateDatabaseScriptGenerator.cs index 6f14f0db5..d048df4af 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/TryCreateDatabaseScriptGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/TryCreateDatabaseScriptGenerator.cs @@ -188,9 +188,9 @@ private void TransferSchema(Microsoft.SqlServer.Management.Smo.Database? databas } var transfer = new Transfer(database) - { - CopyAllObjects = false, - Options = + { + CopyAllObjects = false, + Options = { WithDependencies = true, Default = true, @@ -203,24 +203,24 @@ private void TransferSchema(Microsoft.SqlServer.Management.Smo.Database? databas DriUniqueKeys = true, ContinueScriptingOnError = true }, - DestinationDatabase = target.Name, - DestinationServer = target.Parent.Name, - DestinationLoginSecure = database.Parent.ConnectionContext.LoginSecure, - CreateTargetDatabase = false, - CopySchema = true, - CopyAllTables = true, - CopyAllPartitionFunctions = true, - CopyAllStoredProcedures = true, - CopyAllUserDefinedDataTypes = true, - CopyAllUserDefinedTableTypes = true, - CopyAllUserDefinedFunctions = true, - CopyAllViews = true, - CopyData = this.copyData, - CopyAllLogins = false, - CopyAllUsers = false, - CopyAllRules = false, - CopyAllRoles = false, - }; + DestinationDatabase = target.Name, + DestinationServer = target.Parent.Name, + DestinationLoginSecure = database.Parent.ConnectionContext.LoginSecure, + CreateTargetDatabase = false, + CopySchema = true, + CopyAllTables = true, + CopyAllPartitionFunctions = true, + CopyAllStoredProcedures = true, + CopyAllUserDefinedDataTypes = true, + CopyAllUserDefinedTableTypes = true, + CopyAllUserDefinedFunctions = true, + CopyAllViews = true, + CopyData = this.copyData, + CopyAllLogins = false, + CopyAllUsers = false, + CopyAllRules = false, + CopyAllRoles = false, + }; transfer.CreateTargetDatabase = false; @@ -230,9 +230,9 @@ private void TransferSchema(Microsoft.SqlServer.Management.Smo.Database? databas if (null != this.copyDataForTables) { var transfer2 = new Transfer(database) - { - CopyAllObjects = false, - Options = + { + CopyAllObjects = false, + Options = { WithDependencies = true, Default = true, @@ -244,18 +244,18 @@ private void TransferSchema(Microsoft.SqlServer.Management.Smo.Database? databas DriPrimaryKey = true, DriUniqueKeys = true, }, - DestinationDatabase = target.Name, - DestinationServer = target.Parent.Name, - DestinationLoginSecure = database.Parent.ConnectionContext.LoginSecure, - CreateTargetDatabase = false, - CopySchema = false, - CopyAllTables = false, - CopyData = true, - CopyAllLogins = false, - CopyAllUsers = false, - CopyAllRules = false, - CopyAllRoles = false, - }; + DestinationDatabase = target.Name, + DestinationServer = target.Parent.Name, + DestinationLoginSecure = database.Parent.ConnectionContext.LoginSecure, + CreateTargetDatabase = false, + CopySchema = false, + CopyAllTables = false, + CopyData = true, + CopyAllLogins = false, + CopyAllUsers = false, + CopyAllRules = false, + CopyAllRoles = false, + }; var copyTables = (from schema in database.Schemas.OfType() from tableName in this.copyDataForTables @@ -300,3 +300,4 @@ public DatabaseScriptGeneratorContextWrapper(IDatabaseScriptGeneratorContext sou public AssemblyMetadata AssemblyMetadata => this.source.AssemblyMetadata; } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/UniqueGroupDatabaseScriptGenerator.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/UniqueGroupDatabaseScriptGenerator.cs index 8bb5bd9a4..67931e797 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/UniqueGroupDatabaseScriptGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptGenerators/UniqueGroupDatabaseScriptGenerator.cs @@ -7,7 +7,6 @@ using Framework.Restriction; using Microsoft.SqlServer.Management.Smo; - using Index = Microsoft.SqlServer.Management.Smo.Index; namespace Framework.Database.NHibernate.DBGenerator.ScriptGenerators; @@ -122,3 +121,4 @@ private void CreateOrUpdateUniqueIndex(IDatabaseScriptGeneratorContext context, } } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptsHelper.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptsHelper.cs index ff783e569..7000be8fb 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptsHelper.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/ScriptsHelper.cs @@ -63,3 +63,4 @@ private static void TryClearCapturedSql(CapturedSql capturedSql, bool clear) } } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/Team/DatabaseScriptGeneratorExtension.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/Team/DatabaseScriptGeneratorExtension.cs index 0e654fb8c..02ca02dc6 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/Team/DatabaseScriptGeneratorExtension.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/Team/DatabaseScriptGeneratorExtension.cs @@ -32,3 +32,4 @@ public IDatabaseScriptResult GenerateScript(IDatabaseScriptGeneratorContext cont } } } + diff --git a/src/Database/Framework.Database.NHibernate.DBGenerator/Team/FileScriptReader.cs b/src/Database/Framework.Database.NHibernate.DBGenerator/Team/FileScriptReader.cs index 456ef36b0..9f462ccaf 100644 --- a/src/Database/Framework.Database.NHibernate.DBGenerator/Team/FileScriptReader.cs +++ b/src/Database/Framework.Database.NHibernate.DBGenerator/Team/FileScriptReader.cs @@ -91,3 +91,4 @@ private T GetValue(IEnumerable commands, string param, Func obj.ModifiedBy).ToPath(); } + diff --git a/src/Database/Framework.Database.NHibernate.Legacy/DependencyInjection/ServiceCollectionExtensions.cs b/src/Database/Framework.Database.NHibernate.Legacy/DependencyInjection/ServiceCollectionExtensions.cs index 5f97140ba..57c6999bf 100644 --- a/src/Database/Framework.Database.NHibernate.Legacy/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Database/Framework.Database.NHibernate.Legacy/DependencyInjection/ServiceCollectionExtensions.cs @@ -16,3 +16,4 @@ public static IServiceCollection AddLegacyNHibernateSettings(this IServiceCollec return services.ReplaceSingleton(); } } + diff --git a/src/Database/Framework.Database.NHibernate.Legacy/LegacyDalValidationIdentitySource.cs b/src/Database/Framework.Database.NHibernate.Legacy/LegacyDalValidationIdentitySource.cs index b8ba50132..ead59de10 100644 --- a/src/Database/Framework.Database.NHibernate.Legacy/LegacyDalValidationIdentitySource.cs +++ b/src/Database/Framework.Database.NHibernate.Legacy/LegacyDalValidationIdentitySource.cs @@ -10,3 +10,4 @@ public class LegacyDalValidationIdentitySource : IDalValidationIdentitySource public string GetPropertyValidationName(PropertyInfo property) => property.GetValidationName(); } + diff --git a/src/Database/Framework.Database.NHibernate.Legacy/NHibDal.cs b/src/Database/Framework.Database.NHibernate.Legacy/NHibDal.cs index 5b5e2013a..bedb56888 100644 --- a/src/Database/Framework.Database.NHibernate.Legacy/NHibDal.cs +++ b/src/Database/Framework.Database.NHibernate.Legacy/NHibDal.cs @@ -2,6 +2,8 @@ using Anch.Core; using Anch.Core.ExpressionEvaluate; +using Anch.GenericQueryable; +using Anch.GenericQueryable.Fetching; using Framework.Core; using Framework.Database.Domain; @@ -10,9 +12,6 @@ using Framework.Database.NHibernate.Envers.LinqVisitors; using Framework.Database.NHibernate.Sessions; -using Anch.GenericQueryable; -using Anch.GenericQueryable.Fetching; - using NHibernate; using NHibernate.Envers.Query; using NHibernate.Envers.Query.Criteria; @@ -280,3 +279,4 @@ private void CheckWrite() } + diff --git a/src/Database/Framework.Database.NHibernate.Legacy/NHibObjectStatesService.cs b/src/Database/Framework.Database.NHibernate.Legacy/NHibObjectStatesService.cs index dc4f2cd7c..a7778116e 100644 --- a/src/Database/Framework.Database.NHibernate.Legacy/NHibObjectStatesService.cs +++ b/src/Database/Framework.Database.NHibernate.Legacy/NHibObjectStatesService.cs @@ -140,3 +140,4 @@ public bool IsRemoving(object entity) return entityEntry.Status == Status.Deleted; } } + diff --git a/src/Database/Framework.Database.NHibernate.Legacy/NHibernateSetupObjectExtensions.cs b/src/Database/Framework.Database.NHibernate.Legacy/NHibernateSetupObjectExtensions.cs index da279d410..dc90affa8 100644 --- a/src/Database/Framework.Database.NHibernate.Legacy/NHibernateSetupObjectExtensions.cs +++ b/src/Database/Framework.Database.NHibernate.Legacy/NHibernateSetupObjectExtensions.cs @@ -6,3 +6,4 @@ public static class NHibernateSetupObjectExtensions { public static INHibernateSetup AddLegacyDatabaseSettings(this INHibernateSetup setupObject) => setupObject.AddExtension(new NHibernateSetupExtension(services => services.AddLegacyNHibernateSettings())); } + diff --git a/src/Database/Framework.Database.NHibernate.Legacy/RevisionTypeExtension.cs b/src/Database/Framework.Database.NHibernate.Legacy/RevisionTypeExtension.cs index a656b5679..494c3b2f0 100644 --- a/src/Database/Framework.Database.NHibernate.Legacy/RevisionTypeExtension.cs +++ b/src/Database/Framework.Database.NHibernate.Legacy/RevisionTypeExtension.cs @@ -1,4 +1,5 @@ using Framework.Database.Domain; + using NHibernate.Envers; namespace Framework.Database.NHibernate; @@ -21,3 +22,4 @@ public static AuditRevisionType ToAuditRevisionType(this RevisionType source) } } } + diff --git a/src/Database/Framework.Database.NHibernate.Legacy/SessionExtensions.cs b/src/Database/Framework.Database.NHibernate.Legacy/SessionExtensions.cs index 5c6c9b09f..5797b5fc3 100644 --- a/src/Database/Framework.Database.NHibernate.Legacy/SessionExtensions.cs +++ b/src/Database/Framework.Database.NHibernate.Legacy/SessionExtensions.cs @@ -43,3 +43,4 @@ public static object TryUnProxy(this ISessionImplementor sessionImpl, object ent return entity; } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditEntityService.cs b/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditEntityService.cs index 3c504f88d..9396eb7f1 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditEntityService.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditEntityService.cs @@ -64,3 +64,4 @@ public string GetAuditTableSchemaOrDefault(Type type) return result; } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditEventListenerBase.cs b/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditEventListenerBase.cs index 91ccea27e..32788fcd3 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditEventListenerBase.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditEventListenerBase.cs @@ -73,7 +73,7 @@ private Action GetSetAuditAction { - var domainObject = (TDomainObject) operationEvent.Entity; + var domainObject = (TDomainObject)operationEvent.Entity; var auditValue = getAuditValue(); @@ -83,3 +83,4 @@ private Action GetSetAuditAction dicToFill, IAudi var tableName = type.GetTableName(string.Empty).tableName; var auditTableAttribute = new AuditTableAttribute(tableName + this.auditTableSuffix) - { - Schema = auditService.GetAuditTableSchemaOrDefault(type) ?? this.auditEntityRevisionSchema - }; + { + Schema = auditService.GetAuditTableSchemaOrDefault(type) ?? this.auditEntityRevisionSchema + }; ((EntityMeta)dicToFill[type]).AddClassMeta(auditTableAttribute); } @@ -247,3 +247,4 @@ private void FillClass(Type type, Dictionary dicToFill, IAudi } } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditPropertiesSetter.DomainObjectDescription.cs b/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditPropertiesSetter.DomainObjectDescription.cs index 2b19563be..01d0f8f79 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditPropertiesSetter.DomainObjectDescription.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditPropertiesSetter.DomainObjectDescription.cs @@ -50,3 +50,4 @@ public override bool Equals(object obj) public override string ToString() => this.Type.ToString(); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditPropertiesSetter.cs b/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditPropertiesSetter.cs index b80635bef..8aa96d958 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditPropertiesSetter.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Audit/AuditPropertiesSetter.cs @@ -104,3 +104,4 @@ private static Func GetSetAuditAction revisionEntity.Author = defaultCurrentUser.Name; } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Audit/EmptyAuditMetadataProvider.cs b/src/Database/Framework.Database.NHibernate.Runtime/Audit/EmptyAuditMetadataProvider.cs index 1919b578d..555dd03e5 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Audit/EmptyAuditMetadataProvider.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Audit/EmptyAuditMetadataProvider.cs @@ -60,3 +60,4 @@ private HbmMapping CreateRevisionInfoMappingDocument() return result; } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Audit/Extensions.cs b/src/Database/Framework.Database.NHibernate.Runtime/Audit/Extensions.cs index 3edf3181d..c00cb0b36 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Audit/Extensions.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Audit/Extensions.cs @@ -59,3 +59,4 @@ public static IAuditAttributeService GetAuditAttributeService(this IReadOnlyList return auditService; } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Audit/IAuditAttributeService.cs b/src/Database/Framework.Database.NHibernate.Runtime/Audit/IAuditAttributeService.cs index 448a54143..1a0c1908d 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Audit/IAuditAttributeService.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Audit/IAuditAttributeService.cs @@ -11,3 +11,4 @@ public interface IAuditAttributeService string GetAuditTableSchemaOrDefault(Type type); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Audit/RevisionEntityListener.cs b/src/Database/Framework.Database.NHibernate.Runtime/Audit/RevisionEntityListener.cs index 940ed71f4..671195ff3 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Audit/RevisionEntityListener.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Audit/RevisionEntityListener.cs @@ -19,3 +19,4 @@ public void EntityChanged(Type entityClass, string entityName, object entityId, protected abstract void ProcessEntityChanged(Type entityClass, object entityId, RevisionType revisionType, T revisionEntity); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/AuditedExtension.cs b/src/Database/Framework.Database.NHibernate.Runtime/AuditedExtension.cs index e01dee51e..9f8a8a574 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/AuditedExtension.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/AuditedExtension.cs @@ -53,3 +53,4 @@ private static IMetaDataProvider GetProvider( return new AuditMetadataProvider(assemblies, auditSchema, tablePostfix, new AuditRevisionEntityListener(defaultCurrentUser)); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/CollectChangesEventListener.cs b/src/Database/Framework.Database.NHibernate.Runtime/CollectChangesEventListener.cs index 1f316b955..f531d21dd 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/CollectChangesEventListener.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/CollectChangesEventListener.cs @@ -67,3 +67,4 @@ public void OnPostUpdate(PostUpdateEvent @event) this.updatedObjects.Add(@event.ToDALObjects(this.counter++)); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/ConfigurationExtensions.cs b/src/Database/Framework.Database.NHibernate.Runtime/ConfigurationExtensions.cs index 47036e20d..702275ccb 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/ConfigurationExtensions.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/ConfigurationExtensions.cs @@ -26,3 +26,4 @@ public static void AddDocuments(this Configuration configuration, IEnumerable treeBuilder.MethodCall("AddDays", visitor.Visit(targetObject).AsExpression(), visitor.Visit(arguments[0]).AsExpression()); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/AddHoursGenerator.cs b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/AddHoursGenerator.cs index f8a9a48b4..c95c60533 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/AddHoursGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/AddHoursGenerator.cs @@ -30,3 +30,4 @@ public override HqlTreeNode BuildHql( IHqlExpressionVisitor visitor) => treeBuilder.MethodCall("AddHours", visitor.Visit(targetObject).AsExpression(), visitor.Visit(arguments[0]).AsExpression()); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/AddMonthsGenerator.cs b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/AddMonthsGenerator.cs index b4cb106f0..5209e8150 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/AddMonthsGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/AddMonthsGenerator.cs @@ -30,3 +30,4 @@ public override HqlTreeNode BuildHql( IHqlExpressionVisitor visitor) => treeBuilder.MethodCall("AddMonths", visitor.Visit(targetObject).AsExpression(), visitor.Visit(arguments[0]).AsExpression()); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/AddYearsGenerator.cs b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/AddYearsGenerator.cs index 809b04900..b81ed877e 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/AddYearsGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/AddYearsGenerator.cs @@ -34,3 +34,4 @@ public override HqlTreeNode BuildHql( visitor.Visit(targetObject).AsExpression(), visitor.Visit(arguments[0]).AsExpression()); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/DiffDaysHqlGenerator.cs b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/DiffDaysHqlGenerator.cs index 1704b67a7..b756ad6a5 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/DiffDaysHqlGenerator.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/DiffDaysHqlGenerator.cs @@ -30,3 +30,4 @@ public override HqlTreeNode BuildHql( visitor.Visit(arguments[0]).AsExpression(), visitor.Visit(arguments[1]).AsExpression()); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/EnhancedLinqToHqlGeneratorsRegistry.cs b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/EnhancedLinqToHqlGeneratorsRegistry.cs index 193cca840..cba4b0248 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/EnhancedLinqToHqlGeneratorsRegistry.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/EnhancedLinqToHqlGeneratorsRegistry.cs @@ -20,3 +20,4 @@ public EnhancedLinqToHqlGeneratorsRegistry() this.Merge(new DiffDaysHqlGenerator()); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/EnhancedMsSql2008Dialect.cs b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/EnhancedMsSql2008Dialect.cs index 7f0488cec..911622ad8 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/EnhancedMsSql2008Dialect.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/EnhancedMsSql2008Dialect.cs @@ -13,3 +13,4 @@ public class EnhancedMsSql2008Dialect : MsSql2008Dialect /// protected override void RegisterFunctions() => throw new NotImplementedException(); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/EnhancedMsSql2012Dialect.cs b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/EnhancedMsSql2012Dialect.cs index f679c78d4..c26ec46a1 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Dialect/EnhancedMsSql2012Dialect.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Dialect/EnhancedMsSql2012Dialect.cs @@ -33,3 +33,4 @@ protected override void RegisterCharacterTypeMappings() this.RegisterColumnType(DbType.String, MaxSizeForBlob, "NVARCHAR(MAX)"); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/EntityActionHeaderExtensions.cs b/src/Database/Framework.Database.NHibernate.Runtime/EntityActionHeaderExtensions.cs index 3a36d3715..920517e16 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/EntityActionHeaderExtensions.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/EntityActionHeaderExtensions.cs @@ -8,3 +8,4 @@ internal static IDALObject ToDALObjects(this T source, long applyIndex) where T : AbstractPostDatabaseOperationEvent => new DALObject(source.Entity, source.Persister.EntityMetamodel.Type, applyIndex); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/AuditQueryCreatorPatched.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/AuditQueryCreatorPatched.cs index cb7ff1f79..aa3ccaa96 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/AuditQueryCreatorPatched.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/AuditQueryCreatorPatched.cs @@ -19,3 +19,4 @@ public class AuditQueryCreatorPatched(AuditConfiguration auditCfg, IAuditReaderI public RevisionsOfEntityQuery CreateRevisionEntityQuery() => new(this.auditCfg, this.auditReaderImplementor, this.auditCfg.AuditEntCfg.RevisionInfoEntityFullClassName(), true, false); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/AuditReaderFactoryPatched.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/AuditReaderFactoryPatched.cs index 6780ac123..47752efb9 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/AuditReaderFactoryPatched.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/AuditReaderFactoryPatched.cs @@ -38,3 +38,4 @@ internal static async Task SafeInitCurrentRevisionAsync(this IAuditReaderPatched await auditReader.GetCurrentRevisionAsync(true, cancellationToken); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/AuditReaderPatched.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/AuditReaderPatched.cs index 4e68127c4..eaa22ef66 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/AuditReaderPatched.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/AuditReaderPatched.cs @@ -144,3 +144,4 @@ private PropertyData GetIdPropertyData(IIdMapper mapper) return (PropertyData)idFileInfo.GetValue(mapper); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/EmptyAuditEventListener.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/EmptyAuditEventListener.cs index 21fd89b8c..d0300d250 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/EmptyAuditEventListener.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/EmptyAuditEventListener.cs @@ -69,3 +69,4 @@ public void Initialize(global::NHibernate.Cfg.Configuration cfg) // Empty } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/Forke/AddWorkUnitForke.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/Forke/AddWorkUnitForke.cs index 3ea9d6037..e88e107f3 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/Forke/AddWorkUnitForke.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/Forke/AddWorkUnitForke.cs @@ -75,3 +75,4 @@ private IDictionary MergeModifiedFlags(IDictionary> GetDomainObjectRevisions(object primaryKey, int /// System.Int64. long GetMaxRevision(); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/IIdentityRevisionEntityInfo.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/IIdentityRevisionEntityInfo.cs index ceca0e664..2a50b7ad4 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/IIdentityRevisionEntityInfo.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/IIdentityRevisionEntityInfo.cs @@ -10,3 +10,4 @@ public interface IIdentityRevisionEntityInfo RevisionType Operation { get; } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/IdentityRevisionEntityInfo.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/IdentityRevisionEntityInfo.cs index 655c18b0e..559cc8b92 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/IdentityRevisionEntityInfo.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/IdentityRevisionEntityInfo.cs @@ -11,3 +11,4 @@ public class IdentityRevisionEntityInfo(TRevisionEnt public RevisionType Operation { get; } = operation; } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/EvaluateExtension.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/EvaluateExtension.cs index f954c618f..f96db64bd 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/EvaluateExtension.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/EvaluateExtension.cs @@ -29,3 +29,4 @@ internal static string ToValue(this Expression expression) return visitor.EvaluatedValue; } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/AuditPropertyEvalutor.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/AuditPropertyEvalutor.cs index 4ab96bfe1..31dbcf81f 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/AuditPropertyEvalutor.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/AuditPropertyEvalutor.cs @@ -12,7 +12,8 @@ internal class AuditPropertyEvalutor : ExpressionVisitor protected override Expression VisitMember(MemberExpression node) { - this.result.Value = AuditEntity.Property(node.Member.Name); + this.result.Value = AuditEntity.Property(node.Member.Name); return base.VisitMember(node); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/CriterionVisitor.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/CriterionVisitor.cs index 6edb5d875..3163abc0e 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/CriterionVisitor.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/CriterionVisitor.cs @@ -71,3 +71,4 @@ protected override Expression VisitBinary(BinaryExpression node) protected override Expression VisitUnary(UnaryExpression node) => node; } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/EqualEvaluator.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/EqualEvaluator.cs index c0366d526..23022d2db 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/EqualEvaluator.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/EqualEvaluator.cs @@ -33,3 +33,4 @@ protected override Expression VisitMember(MemberExpression node) return base.VisitMember(node); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/ValueEvaluatorVisitor.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/ValueEvaluatorVisitor.cs index 0aeaaa8a8..b222c0235 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/ValueEvaluatorVisitor.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/LinqVisitors/Visitors/ValueEvaluatorVisitor.cs @@ -29,3 +29,4 @@ protected override Expression VisitMember(MemberExpression node) return node; } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/RevisionNumberFieldPropertyName.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/RevisionNumberFieldPropertyName.cs index ff90e6a61..1fa6ae3cb 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/RevisionNumberFieldPropertyName.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/RevisionNumberFieldPropertyName.cs @@ -7,3 +7,4 @@ public class RevisionNumberFieldPropertyName : IPropertyNameGetter { public string Get(AuditConfiguration auditCfg) => "id"; } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Envers/RevisionsOfEntityProjectionQuery.cs b/src/Database/Framework.Database.NHibernate.Runtime/Envers/RevisionsOfEntityProjectionQuery.cs index 55f524251..005cb3943 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Envers/RevisionsOfEntityProjectionQuery.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Envers/RevisionsOfEntityProjectionQuery.cs @@ -116,3 +116,4 @@ ORDER BY e.revision ASC (unless another order or projection is specified) } } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Fix2100/Fix2100SqlClientDriver.cs b/src/Database/Framework.Database.NHibernate.Runtime/Fix2100/Fix2100SqlClientDriver.cs index 8bbdc5db8..e477af140 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Fix2100/Fix2100SqlClientDriver.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Fix2100/Fix2100SqlClientDriver.cs @@ -47,3 +47,4 @@ private static void InlineIds(DbCommand sqlCommand, IReadOnlyList guidParameters.Foreach(x => sqlCommand.Parameters.Remove(x)); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/HandledGenericADOException.cs b/src/Database/Framework.Database.NHibernate.Runtime/HandledGenericADOException.cs index 25dad400a..a344d37bd 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/HandledGenericADOException.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/HandledGenericADOException.cs @@ -26,5 +26,6 @@ public HandledGenericAdoException(string message, Exception innerException, Valu this.EntityId = unTypeObjectInfo.Item2; } - public Microsoft.Data.SqlClient.SqlException SqlException => (Microsoft.Data.SqlClient.SqlException) this.InnerException; + public Microsoft.Data.SqlClient.SqlException SqlException => (Microsoft.Data.SqlClient.SqlException)this.InnerException; } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/IDomainObjectSaveStrategy.cs b/src/Database/Framework.Database.NHibernate.Runtime/IDomainObjectSaveStrategy.cs index 0aa21d62f..4a3ac64e6 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/IDomainObjectSaveStrategy.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/IDomainObjectSaveStrategy.cs @@ -6,3 +6,4 @@ public interface IDomainObjectSaveStrategy { Task SaveAsync(ISession session, TDomainObject domainObject, CancellationToken cancellationToken); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/LockRoleExtensions.cs b/src/Database/Framework.Database.NHibernate.Runtime/LockRoleExtensions.cs index d5941d88a..4e1e9b3d7 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/LockRoleExtensions.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/LockRoleExtensions.cs @@ -16,3 +16,4 @@ public static LockMode ToLockMode(this LockRole source) } } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/ComponentConvention.cs b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/ComponentConvention.cs index a2a8136fb..cfd6def7c 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/ComponentConvention.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/ComponentConvention.cs @@ -17,3 +17,4 @@ public void Apply(IComponentInstance instance) public void Accept(IAcceptanceCriteria criteria) => criteria.Expect(_ => true); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/ConfigurationInitializer.cs b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/ConfigurationInitializer.cs index 53d4a74b0..b30fc07af 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/ConfigurationInitializer.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/ConfigurationInitializer.cs @@ -8,3 +8,4 @@ public class ConfigurationInitializer(Action initAction) : IConfi public static IConfigurationInitializer Empty { get; } = new ConfigurationInitializer(_ => { }); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/DefaultAuditTypeFilter.cs b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/DefaultAuditTypeFilter.cs index 4d0088172..ead9d58bf 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/DefaultAuditTypeFilter.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/DefaultAuditTypeFilter.cs @@ -63,3 +63,4 @@ public bool IsAuditedProperty(Type type, PropertyInfo propertyInfo) } } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/DefaultConfigurationInitializer.cs b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/DefaultConfigurationInitializer.cs index 203ad68ed..2278de5c2 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/DefaultConfigurationInitializer.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/DefaultConfigurationInitializer.cs @@ -8,7 +8,6 @@ using Framework.Database.NHibernate.Fix2100; using NHibernate.Cfg; - using Environment = NHibernate.Cfg.Environment; namespace Framework.Database.NHibernate.Mapping; @@ -59,3 +58,4 @@ public void Initialize(Configuration cfg) => }) .BuildConfiguration(); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/EnumConvention.cs b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/EnumConvention.cs index 766891b74..76e0beea0 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/EnumConvention.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/EnumConvention.cs @@ -16,3 +16,4 @@ public void Accept(IAcceptanceCriteria criteria) => public void Apply(IPropertyInstance instance) => instance.CustomType(instance.Property.PropertyType); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/IAuditTypeFilter.cs b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/IAuditTypeFilter.cs index cc15f2b40..5d8aa1a16 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/IAuditTypeFilter.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/IAuditTypeFilter.cs @@ -8,3 +8,4 @@ public interface IAuditTypeFilter bool IsAuditedProperty(Type type, PropertyInfo propertyInfo); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/IConfigurationInitializer.cs b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/IConfigurationInitializer.cs index fa7fb9d05..e7e483e77 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/IConfigurationInitializer.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/IConfigurationInitializer.cs @@ -6,3 +6,4 @@ public interface IConfigurationInitializer { void Initialize(Configuration cfg); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/MappingSettings.cs b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/MappingSettings.cs index e2a0bdacb..cebfe42f8 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/MappingSettings.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/MappingSettings.cs @@ -40,3 +40,4 @@ private static IReadOnlyList GetDefaultTypes() => .Where(typeof(TPersistentDomainObjectBase).IsAssignableFrom) .ToList(); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/MappingSettingsExtensions.cs b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/MappingSettingsExtensions.cs index 41012cb3a..b8d5855a5 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/MappingSettingsExtensions.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/MappingSettingsExtensions.cs @@ -27,3 +27,4 @@ public static bool IsAuditInMainDatabase(this MappingSettings mappingSettings) return string.Equals(mappingSettings.Database.Name, mappingSettings.AuditDatabase?.Name); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/MappingSettingsInitializer.cs b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/MappingSettingsInitializer.cs index e86ffb7f9..d94a90c7b 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/MappingSettingsInitializer.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/MappingSettingsInitializer.cs @@ -35,3 +35,4 @@ private static Action GetInitAction(DatabaseName database, Action }; } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/NHibernateSettings.cs b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/NHibernateSettings.cs index 733cb3754..01603c86a 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Mapping/NHibernateSettings.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Mapping/NHibernateSettings.cs @@ -17,3 +17,4 @@ public record NHibernateSettings public Action RawDatabaseAction { get; init; } = _ => { }; } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/MetaDataProviderExtension.cs b/src/Database/Framework.Database.NHibernate.Runtime/MetaDataProviderExtension.cs index 898a1e0c3..2a34394b9 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/MetaDataProviderExtension.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/MetaDataProviderExtension.cs @@ -42,3 +42,4 @@ public IDictionary CreateMetaData(Configuration nhibConfigura } } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/NHibAsyncDal.cs b/src/Database/Framework.Database.NHibernate.Runtime/NHibAsyncDal.cs index 9382e3896..4533f932f 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/NHibAsyncDal.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/NHibAsyncDal.cs @@ -1,11 +1,11 @@ using Anch.Core; +using Anch.GenericQueryable.NHibernate; +using Anch.GenericQueryable.Services; using Anch.IdentitySource; + using Framework.Core; using Framework.Database.NHibernate.Sessions; -using Anch.GenericQueryable.NHibernate; -using Anch.GenericQueryable.Services; - using NHibernate; namespace Framework.Database.NHibernate; @@ -111,3 +111,4 @@ private void CheckWrite() } } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/NHibConnectionInitializer.cs b/src/Database/Framework.Database.NHibernate.Runtime/NHibConnectionInitializer.cs index 4c59c3ccb..42286e04f 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/NHibConnectionInitializer.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/NHibConnectionInitializer.cs @@ -12,3 +12,4 @@ public void Initialize(Configuration cfg) cfg.Properties["connection.connection_string"] = $"{serverAddress};Initial Catalog={database}"; } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/NHibSessionEnvironment.cs b/src/Database/Framework.Database.NHibernate.Runtime/NHibSessionEnvironment.cs index 0dce8f6a9..bfdb7721f 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/NHibSessionEnvironment.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/NHibSessionEnvironment.cs @@ -1,10 +1,10 @@ using Anch.Core.Auth; +using Anch.GenericQueryable.NHibernate; + using Framework.Core; using Framework.Database.NHibernate.Mapping; using Framework.Database.NHibernate.SqlExceptionProcessors; -using Anch.GenericQueryable.NHibernate; - using Microsoft.Extensions.DependencyInjection; using NHibernate; @@ -21,7 +21,7 @@ public class NHibSessionEnvironment : IDisposable public NHibSessionEnvironment( IEnumerable mappingSettings, IEnumerable initializers, - [FromKeyedServices(ICurrentUser.DefaultKey)]ICurrentUser defaultCurrentUser, + [FromKeyedServices(ICurrentUser.DefaultKey)] ICurrentUser defaultCurrentUser, INHibSessionEnvironmentSettings settings, IDalValidationIdentitySource dalValidationIdentitySource) { @@ -75,3 +75,4 @@ public void Dispose() } } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/EventListenersExtensions.cs b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/EventListenersExtensions.cs index f6787064a..9935fc351 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/EventListenersExtensions.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/EventListenersExtensions.cs @@ -53,3 +53,4 @@ internal static EventListeners Clone(this EventListeners eventListeners) }; } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/INHibSession.cs b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/INHibSession.cs index 54c67bd66..88ab09945 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/INHibSession.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/INHibSession.cs @@ -10,3 +10,4 @@ public interface INHibSession : IDBSession ISession NativeSession { get; } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/NHibSession.cs b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/NHibSession.cs index b0aef6c2c..90bd0c0fb 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/NHibSession.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/NHibSession.cs @@ -82,3 +82,4 @@ public async ValueTask DisposeAsync() } } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/NHibSessionBase.cs b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/NHibSessionBase.cs index 9aec44de6..79b2ce282 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/NHibSessionBase.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/NHibSessionBase.cs @@ -53,3 +53,4 @@ internal NHibSessionBase(NHibSessionEnvironment environment, DBSessionMode sessi public async ValueTask DisposeAsync() => await this.CloseAsync(); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/NhibSessionImplExtensions.cs b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/NhibSessionImplExtensions.cs index 1724bf7d2..e774da5f2 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/NhibSessionImplExtensions.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/NhibSessionImplExtensions.cs @@ -25,3 +25,4 @@ internal static class NhibSessionImplExtensions internal static void OverrideInterceptor(this SessionImpl source, IInterceptor interceptor) => SetInterceptorAction(source, interceptor); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/ReadOnlyNHibSession.cs b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/ReadOnlyNHibSession.cs index 1ddd50bbe..48285ed87 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/ReadOnlyNHibSession.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/ReadOnlyNHibSession.cs @@ -56,3 +56,4 @@ public override async Task CloseAsync(CancellationToken cancellationToken = defa public override async Task FlushAsync(CancellationToken cancellationToken = default) => throw new InvalidOperationException(); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/WriteNHibSession.cs b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/WriteNHibSession.cs index 4988b386e..575c83421 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Sessions/WriteNHibSession.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Sessions/WriteNHibSession.cs @@ -209,3 +209,4 @@ await this.NativeSession.FlushAsync( } } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionConverter.cs b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionConverter.cs index 58ff1ef67..b686b8446 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionConverter.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionConverter.cs @@ -33,3 +33,4 @@ public static ADOException HandledNonSpecificException(Exception sqlException, s ValueTuple unTypedObjectInfo) => new HandledGenericAdoException(message, sqlException, sql, unTypedObjectInfo); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/ArithmeticOverflowSqlProcessor.cs b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/ArithmeticOverflowSqlProcessor.cs index ea3aa17e7..e67c3e18c 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/ArithmeticOverflowSqlProcessor.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/ArithmeticOverflowSqlProcessor.cs @@ -12,3 +12,4 @@ public Exception Process(HandledGenericAdoException genericAdoException, Excepti return new ArithmeticOverflowDALException(sqlException.Message, sqlException.Message); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/DefaultSqlException.cs b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/DefaultSqlException.cs index 419e72b39..00fc8aaff 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/DefaultSqlException.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/DefaultSqlException.cs @@ -2,7 +2,7 @@ internal class DefaultSqlException : ISqlExceptionProcessor { - private static readonly Lazy InstanceLazy = new(()=> new DefaultSqlException(), true); + private static readonly Lazy InstanceLazy = new(() => new DefaultSqlException(), true); public static DefaultSqlException Value => InstanceLazy.Value; private DefaultSqlException() diff --git a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/ExceptionProcessingContext.cs b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/ExceptionProcessingContext.cs index 1be9d4d52..05c23c7ee 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/ExceptionProcessingContext.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/ExceptionProcessingContext.cs @@ -73,7 +73,7 @@ public TableDescription CreateTableDescription(string initialCatalog, string sch public IEnumerable GetPersistentClass(TableDescription tableDescription) { IReadOnlyList result; - if(!this.tableNameToPersistentClass.TryGetValue(tableDescription, out result)) + if (!this.tableNameToPersistentClass.TryGetValue(tableDescription, out result)) { //костыль var results = this.tableNameToPersistentClass.Where(z => string.Equals(z.Key.Name, tableDescription.Name, StringComparison.InvariantCultureIgnoreCase)).ToList(); @@ -133,10 +133,11 @@ public bool Equals(TableDescription other) string.Equals(propertyFunc(localThis), propertyFunc(other), StringComparison.InvariantCultureIgnoreCase)); } - public override string ToString() => string.Join(".", new[]{this.Catalog, this.Schema, this.Name}.Where(z=>null != z)); + public override string ToString() => string.Join(".", new[] { this.Catalog, this.Schema, this.Name }.Where(z => null != z)); public override bool Equals(object obj) => string.Equals(this.ToString(), obj.ToString()); public override int GetHashCode() => this.ToString().GetHashCode(); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/RemoveLinkedObjectSqlProcessor.cs b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/RemoveLinkedObjectSqlProcessor.cs index 5af360506..698e4d638 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/RemoveLinkedObjectSqlProcessor.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/RemoveLinkedObjectSqlProcessor.cs @@ -1,7 +1,7 @@ using System.Text.RegularExpressions; -using Framework.Database.DALExceptions; using Framework.Core; +using Framework.Database.DALExceptions; using Framework.Database.Mapping; namespace Framework.Database.NHibernate.SqlExceptionProcessors; @@ -74,3 +74,4 @@ public Exception Process(HandledGenericAdoException genericAdoException, Excepti } } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/RequiredFieldSqlProcessor.cs b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/RequiredFieldSqlProcessor.cs index 81bc2a593..7d78bb007 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/RequiredFieldSqlProcessor.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/RequiredFieldSqlProcessor.cs @@ -45,3 +45,4 @@ private static bool CompareEntity(PersistentClass z, string tableValue) return classParts.Last().Equals(tableParts.Last(), StringComparison.InvariantCultureIgnoreCase); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/SqlExceptionProcessorInterceptor.cs b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/SqlExceptionProcessorInterceptor.cs index e8e394c10..81024cc7b 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/SqlExceptionProcessorInterceptor.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/SqlExceptionProcessorInterceptor.cs @@ -75,3 +75,4 @@ private Exception InternalProcess(GenericADOException exception) => private Exception InternalProcess(StaleObjectStateException exception) => new StaleDomainObjectStateException(this.cfg.GetClassMapping(exception.EntityName).MappedClass, exception.Identifier, exception); } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/UniqueIndexSqlProcessor.cs b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/UniqueIndexSqlProcessor.cs index cb7f3af2b..d44a8f9fe 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/UniqueIndexSqlProcessor.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/SqlExceptionProcessors/UniqueIndexSqlProcessor.cs @@ -57,3 +57,4 @@ public Exception Process(HandledGenericAdoException genericAdoException, Excepti return sqlException; } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Visitors/FixNHibArrayContainsVisitor.cs b/src/Database/Framework.Database.NHibernate.Runtime/Visitors/FixNHibArrayContainsVisitor.cs index d80268101..3beccad5c 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Visitors/FixNHibArrayContainsVisitor.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Visitors/FixNHibArrayContainsVisitor.cs @@ -31,3 +31,4 @@ public class FixNHibArrayContainsVisitor : ExpressionVisitor return base.Visit(node); } } + diff --git a/src/Database/Framework.Database.NHibernate.Runtime/Visitors/MathExpressionVisitorContainer.cs b/src/Database/Framework.Database.NHibernate.Runtime/Visitors/MathExpressionVisitorContainer.cs index 98e0a64b4..0e65e86bb 100644 --- a/src/Database/Framework.Database.NHibernate.Runtime/Visitors/MathExpressionVisitorContainer.cs +++ b/src/Database/Framework.Database.NHibernate.Runtime/Visitors/MathExpressionVisitorContainer.cs @@ -17,3 +17,4 @@ protected override IEnumerable GetVisitors() (v1, v2) => v1 < v2 ? v1 : v2); } } + diff --git a/src/Database/Framework.Database.NHibernate/DependencyInjection/BssFrameworkSetupExtensions.cs b/src/Database/Framework.Database.NHibernate/DependencyInjection/BssFrameworkSetupExtensions.cs index 3fbd6e958..a12fe9e1b 100644 --- a/src/Database/Framework.Database.NHibernate/DependencyInjection/BssFrameworkSetupExtensions.cs +++ b/src/Database/Framework.Database.NHibernate/DependencyInjection/BssFrameworkSetupExtensions.cs @@ -11,3 +11,4 @@ public static TSelf AddNHibernate( settings.AddExtensions(new BssFrameworkExtension(services => services.AddNHibernate(setupAction))); } + diff --git a/src/Database/Framework.Database.NHibernate/DependencyInjection/INHibernateSetup.cs b/src/Database/Framework.Database.NHibernate/DependencyInjection/INHibernateSetup.cs index 28fd0560f..58edd7082 100644 --- a/src/Database/Framework.Database.NHibernate/DependencyInjection/INHibernateSetup.cs +++ b/src/Database/Framework.Database.NHibernate/DependencyInjection/INHibernateSetup.cs @@ -33,3 +33,4 @@ INHibernateSetup AddInitializer() INHibernateSetup AddExtension(INHibernateSetupExtension extension); } + diff --git a/src/Database/Framework.Database.NHibernate/DependencyInjection/INHibernateSetupExtension.cs b/src/Database/Framework.Database.NHibernate/DependencyInjection/INHibernateSetupExtension.cs index c97ae627a..3d4ba5dc2 100644 --- a/src/Database/Framework.Database.NHibernate/DependencyInjection/INHibernateSetupExtension.cs +++ b/src/Database/Framework.Database.NHibernate/DependencyInjection/INHibernateSetupExtension.cs @@ -6,3 +6,4 @@ public interface INHibernateSetupExtension { public void AddServices(IServiceCollection services); } + diff --git a/src/Database/Framework.Database.NHibernate/DependencyInjection/NHibernateSetup.cs b/src/Database/Framework.Database.NHibernate/DependencyInjection/NHibernateSetup.cs index 8173e11db..5569f9368 100644 --- a/src/Database/Framework.Database.NHibernate/DependencyInjection/NHibernateSetup.cs +++ b/src/Database/Framework.Database.NHibernate/DependencyInjection/NHibernateSetup.cs @@ -1,6 +1,7 @@ using System.Reflection; using Anch.DependencyInjection; +using Anch.GenericQueryable.NHibernate; using FluentNHibernate.Cfg; using FluentNHibernate.Cfg.Db; @@ -11,8 +12,6 @@ using Framework.Database.NHibernate.Visitors; using Framework.DependencyInjection; -using Anch.GenericQueryable.NHibernate; - using Microsoft.Extensions.DependencyInjection; using NHibernate; @@ -72,13 +71,13 @@ public INHibernateSetup WithRawMapping(Action initAction) var prevAction = this.settings.RawMappingAction; this.settings = this.settings with - { - RawMappingAction = v => - { - prevAction(v); - initAction(v); - } - }; + { + RawMappingAction = v => + { + prevAction(v); + initAction(v); + } + }; return this; } @@ -88,13 +87,13 @@ public INHibernateSetup WithRawDatabase(Action initAction) var prevAction = this.settings.RawDatabaseAction; this.settings = this.settings with - { - RawDatabaseAction = v => - { - prevAction(v); - initAction(v); - } - }; + { + RawDatabaseAction = v => + { + prevAction(v); + initAction(v); + } + }; return this; } @@ -161,3 +160,4 @@ public void Initialize(IServiceCollection services) this.extensions.ForEach(ex => ex.AddServices(services)); } } + diff --git a/src/Database/Framework.Database.NHibernate/DependencyInjection/NHibernateSetupExtension.cs b/src/Database/Framework.Database.NHibernate/DependencyInjection/NHibernateSetupExtension.cs index f4f739ebd..faaff71b0 100644 --- a/src/Database/Framework.Database.NHibernate/DependencyInjection/NHibernateSetupExtension.cs +++ b/src/Database/Framework.Database.NHibernate/DependencyInjection/NHibernateSetupExtension.cs @@ -6,3 +6,4 @@ public class NHibernateSetupExtension(Action setupAction) : { public void AddServices(IServiceCollection services) => setupAction(services); } + diff --git a/src/Database/Framework.Database.NHibernate/DependencyInjection/ServiceCollectionExtensions.cs b/src/Database/Framework.Database.NHibernate/DependencyInjection/ServiceCollectionExtensions.cs index 3cfe754d6..3fcf4c5b7 100644 --- a/src/Database/Framework.Database.NHibernate/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Database/Framework.Database.NHibernate/DependencyInjection/ServiceCollectionExtensions.cs @@ -9,3 +9,4 @@ public static class ServiceCollectionExtensions public static IServiceCollection AddNHibernate(this IServiceCollection services, Action setupAction) => services.Initialize(setupAction); } + diff --git a/src/Database/Framework.Database.Runtime/AuditPropertyFactory.cs b/src/Database/Framework.Database.Runtime/AuditPropertyFactory.cs index 6e8acdb9f..5dd7b38f7 100644 --- a/src/Database/Framework.Database.Runtime/AuditPropertyFactory.cs +++ b/src/Database/Framework.Database.Runtime/AuditPropertyFactory.cs @@ -12,3 +12,4 @@ public class AuditPropertyFactory( public AuditPropertyPair GetModifyAuditProperty() => AuditPropertyPair.GetModifyAuditProperty(currentUser, timeProvider); } + diff --git a/src/Database/Framework.Database.Runtime/ConnectionStringSource/ConnectionStringSource.cs b/src/Database/Framework.Database.Runtime/ConnectionStringSource/ConnectionStringSource.cs index 54694422e..ab72f1278 100644 --- a/src/Database/Framework.Database.Runtime/ConnectionStringSource/ConnectionStringSource.cs +++ b/src/Database/Framework.Database.Runtime/ConnectionStringSource/ConnectionStringSource.cs @@ -7,3 +7,4 @@ public class ConnectionStringSource(IConfiguration configuration, string name) public string ConnectionString => configuration.GetConnectionString(name) ?? throw new InvalidOperationException($"{name} connection string is not configured."); } + diff --git a/src/Database/Framework.Database.Runtime/ConnectionStringSource/DefaultConnectionStringSource.cs b/src/Database/Framework.Database.Runtime/ConnectionStringSource/DefaultConnectionStringSource.cs index 20925d9b4..e4a9fdc0c 100644 --- a/src/Database/Framework.Database.Runtime/ConnectionStringSource/DefaultConnectionStringSource.cs +++ b/src/Database/Framework.Database.Runtime/ConnectionStringSource/DefaultConnectionStringSource.cs @@ -4,3 +4,4 @@ namespace Framework.Database.ConnectionStringSource; public class DefaultConnectionStringSource(IConfiguration configuration, DefaultConnectionStringSettings settings) : ConnectionStringSource(configuration, settings.Name), IDefaultConnectionStringSource; + diff --git a/src/Database/Framework.Database.Runtime/DBSessionEvaluatorExtensions.cs b/src/Database/Framework.Database.Runtime/DBSessionEvaluatorExtensions.cs index a06f9b499..e4c768625 100644 --- a/src/Database/Framework.Database.Runtime/DBSessionEvaluatorExtensions.cs +++ b/src/Database/Framework.Database.Runtime/DBSessionEvaluatorExtensions.cs @@ -7,3 +7,4 @@ public static class DbSessionEvaluatorExtensions public static Task EvaluateAsync(this IDBSessionEvaluator evaluator, DBSessionMode sessionMode, Func action) => evaluator.EvaluateAsync(sessionMode, action.ToDefaultTask()); } + diff --git a/src/Database/Framework.Database.Runtime/DefaultDBSessionEventListener.cs b/src/Database/Framework.Database.Runtime/DefaultDBSessionEventListener.cs index 3b0ec1d4c..69dd765ac 100644 --- a/src/Database/Framework.Database.Runtime/DefaultDBSessionEventListener.cs +++ b/src/Database/Framework.Database.Runtime/DefaultDBSessionEventListener.cs @@ -54,3 +54,4 @@ public async Task OnAfterTransactionCompleted(DALChangesEventArgs eventArgs, Can } } } + diff --git a/src/Database/Framework.Database.Runtime/PersistentInfoService.cs b/src/Database/Framework.Database.Runtime/PersistentInfoService.cs index b8b1827e1..3275efe75 100644 --- a/src/Database/Framework.Database.Runtime/PersistentInfoService.cs +++ b/src/Database/Framework.Database.Runtime/PersistentInfoService.cs @@ -12,3 +12,4 @@ public class PersistentInfoService : IPersistentInfoService public bool IsPersistent(PropertyInfo propertyInfo) => propertyInfo.IsPersistent(); } + diff --git a/src/Database/Framework.Database.Runtime/RootExpressionVisitorContainer.cs b/src/Database/Framework.Database.Runtime/RootExpressionVisitorContainer.cs index 6efc7e347..9dfb34fac 100644 --- a/src/Database/Framework.Database.Runtime/RootExpressionVisitorContainer.cs +++ b/src/Database/Framework.Database.Runtime/RootExpressionVisitorContainer.cs @@ -9,3 +9,4 @@ public class RootExpressionVisitorContainer([FromKeyedServices(IExpressionVisito { protected override IEnumerable GetVisitors() => items.Select(item => item.Visitor); } + diff --git a/src/Database/Framework.Database.Runtime/Visitors/Containers/DefaultExpressionVisitorContainer.cs b/src/Database/Framework.Database.Runtime/Visitors/Containers/DefaultExpressionVisitorContainer.cs index 01dbdf06b..4efeff8dc 100644 --- a/src/Database/Framework.Database.Runtime/Visitors/Containers/DefaultExpressionVisitorContainer.cs +++ b/src/Database/Framework.Database.Runtime/Visitors/Containers/DefaultExpressionVisitorContainer.cs @@ -17,3 +17,4 @@ protected override IEnumerable GetVisitors() yield return EscapeUnderscoreVisitor.Value; } } + diff --git a/src/Database/Framework.Database.Runtime/Visitors/Containers/OverrideEqualsDomainObjectVisitorContainer.cs b/src/Database/Framework.Database.Runtime/Visitors/Containers/OverrideEqualsDomainObjectVisitorContainer.cs index 3c8e26a16..4efe8f1ad 100644 --- a/src/Database/Framework.Database.Runtime/Visitors/Containers/OverrideEqualsDomainObjectVisitorContainer.cs +++ b/src/Database/Framework.Database.Runtime/Visitors/Containers/OverrideEqualsDomainObjectVisitorContainer.cs @@ -9,3 +9,4 @@ public class OverrideEqualsDomainObjectVisitorContainer(IServiceProxyFactory ser { public ExpressionVisitor Visitor { get; } = new OverrideEqualsDomainObjectVisitor(serviceProxyFactory, identityInfoSource); } + diff --git a/src/Database/Framework.Database.Runtime/Visitors/Containers/PeriodExpressionVisitorContainer.cs b/src/Database/Framework.Database.Runtime/Visitors/Containers/PeriodExpressionVisitorContainer.cs index 778dab1b5..9f7735fc3 100644 --- a/src/Database/Framework.Database.Runtime/Visitors/Containers/PeriodExpressionVisitorContainer.cs +++ b/src/Database/Framework.Database.Runtime/Visitors/Containers/PeriodExpressionVisitorContainer.cs @@ -74,3 +74,4 @@ protected override IEnumerable GetVisitors() period.StartDate != otherPeriod.StartDate || period.EndDate != otherPeriod.EndDate)); } } + diff --git a/src/Database/Framework.Database.Runtime/Visitors/EscapeUnderscoreVisitor.cs b/src/Database/Framework.Database.Runtime/Visitors/EscapeUnderscoreVisitor.cs index 52c20031f..ba434ff82 100644 --- a/src/Database/Framework.Database.Runtime/Visitors/EscapeUnderscoreVisitor.cs +++ b/src/Database/Framework.Database.Runtime/Visitors/EscapeUnderscoreVisitor.cs @@ -37,3 +37,4 @@ from value in node.Arguments.Single().GetConstantValue() public static readonly EscapeUnderscoreVisitor Value = new(); } + diff --git a/src/Database/Framework.Database.Runtime/Visitors/IOverrideEqualsDomainObjectMapper.cs b/src/Database/Framework.Database.Runtime/Visitors/IOverrideEqualsDomainObjectMapper.cs index ea1ecad33..cdf4bf8ba 100644 --- a/src/Database/Framework.Database.Runtime/Visitors/IOverrideEqualsDomainObjectMapper.cs +++ b/src/Database/Framework.Database.Runtime/Visitors/IOverrideEqualsDomainObjectMapper.cs @@ -9,3 +9,4 @@ public interface IOverrideEqualsDomainObjectMapper Maybe TryReplace(BinaryExpression node); } + diff --git a/src/Database/Framework.Database.Runtime/Visitors/OverrideEqualsDomainObjectMapper.cs b/src/Database/Framework.Database.Runtime/Visitors/OverrideEqualsDomainObjectMapper.cs index bd951c76c..418122665 100644 --- a/src/Database/Framework.Database.Runtime/Visitors/OverrideEqualsDomainObjectMapper.cs +++ b/src/Database/Framework.Database.Runtime/Visitors/OverrideEqualsDomainObjectMapper.cs @@ -26,3 +26,4 @@ select Expression.MakeBinary(node.NodeType, Expression.Constant(identityInfo.Id. select Expression.MakeBinary(node.NodeType, this.applyId(node.Left), Expression.Constant(identityInfo.Id.Getter(rightVal)))); } + diff --git a/src/Database/Framework.Database.Runtime/Visitors/OverrideEqualsDomainObjectVisitor.cs b/src/Database/Framework.Database.Runtime/Visitors/OverrideEqualsDomainObjectVisitor.cs index 73b03a1d4..7cc0615f3 100644 --- a/src/Database/Framework.Database.Runtime/Visitors/OverrideEqualsDomainObjectVisitor.cs +++ b/src/Database/Framework.Database.Runtime/Visitors/OverrideEqualsDomainObjectVisitor.cs @@ -47,3 +47,4 @@ from res in mapper.TryReplace(node) } }); } + diff --git a/src/Database/Framework.Database.Runtime/Visitors/OverrideHasFlagVisitor.cs b/src/Database/Framework.Database.Runtime/Visitors/OverrideHasFlagVisitor.cs index 6f7c91bee..280e1c01c 100644 --- a/src/Database/Framework.Database.Runtime/Visitors/OverrideHasFlagVisitor.cs +++ b/src/Database/Framework.Database.Runtime/Visitors/OverrideHasFlagVisitor.cs @@ -39,3 +39,4 @@ from argEnumConstValue in node.Arguments.Single().ExtractBoxingValue().GetConsta public readonly static OverrideHasFlagVisitor Value = new(); } + diff --git a/src/Database/Framework.Database.Runtime/Visitors/OverrideHashSetVisitor.cs b/src/Database/Framework.Database.Runtime/Visitors/OverrideHashSetVisitor.cs index de4097324..e559e92ae 100644 --- a/src/Database/Framework.Database.Runtime/Visitors/OverrideHashSetVisitor.cs +++ b/src/Database/Framework.Database.Runtime/Visitors/OverrideHashSetVisitor.cs @@ -35,3 +35,4 @@ from hashSet in node.GetConstantValue>() public static readonly OverrideHashSetVisitor Value = new(); } + diff --git a/src/Database/Framework.Database.Runtime/Visitors/OverrideIdEqualsMethodVisitor.cs b/src/Database/Framework.Database.Runtime/Visitors/OverrideIdEqualsMethodVisitor.cs index b7b0fb3ca..68c3d960c 100644 --- a/src/Database/Framework.Database.Runtime/Visitors/OverrideIdEqualsMethodVisitor.cs +++ b/src/Database/Framework.Database.Runtime/Visitors/OverrideIdEqualsMethodVisitor.cs @@ -43,3 +43,4 @@ protected override Expression VisitMethodCall(MethodCallExpression node) return result; } } + diff --git a/src/Database/Framework.Database.Runtime/Visitors/OverrideInstanceContainsIdentMethodVisitor.cs b/src/Database/Framework.Database.Runtime/Visitors/OverrideInstanceContainsIdentMethodVisitor.cs index 57db8f425..16e8e562e 100644 --- a/src/Database/Framework.Database.Runtime/Visitors/OverrideInstanceContainsIdentMethodVisitor.cs +++ b/src/Database/Framework.Database.Runtime/Visitors/OverrideInstanceContainsIdentMethodVisitor.cs @@ -49,3 +49,4 @@ from hashSet in obj.GetConstantValue>() public static readonly OverrideInstanceContainsIdentMethodVisitor HashSet = new(new Func(new HashSet().Contains).Method); } + diff --git a/src/Database/Framework.Database.Runtime/Visitors/RestoreQueryableCallsVisitor.cs b/src/Database/Framework.Database.Runtime/Visitors/RestoreQueryableCallsVisitor.cs index 98321dfe0..2173a926c 100644 --- a/src/Database/Framework.Database.Runtime/Visitors/RestoreQueryableCallsVisitor.cs +++ b/src/Database/Framework.Database.Runtime/Visitors/RestoreQueryableCallsVisitor.cs @@ -104,3 +104,4 @@ from newSource in node.Arguments[0].GetConstantValue() public static readonly RestoreQueryableCallsVisitor Value = new(); } + diff --git a/src/Database/Framework.Database.Runtime/Visitors/SquashWhereQueryableVisitor.cs b/src/Database/Framework.Database.Runtime/Visitors/SquashWhereQueryableVisitor.cs index b91c3020d..8d9ded623 100644 --- a/src/Database/Framework.Database.Runtime/Visitors/SquashWhereQueryableVisitor.cs +++ b/src/Database/Framework.Database.Runtime/Visitors/SquashWhereQueryableVisitor.cs @@ -118,3 +118,4 @@ from v2 in expr2 select v1 && !v2; } } + diff --git a/src/Database/Framework.Database.SqlMapper/FieldMetadataExtension.cs b/src/Database/Framework.Database.SqlMapper/FieldMetadataExtension.cs index 3b8138b4f..def6fb4a4 100644 --- a/src/Database/Framework.Database.SqlMapper/FieldMetadataExtension.cs +++ b/src/Database/Framework.Database.SqlMapper/FieldMetadataExtension.cs @@ -8,22 +8,22 @@ namespace Framework.Database.SqlMapper; public static class FieldMetadataExtension { - public static string ToColumnName (this TFieldMetadata source, Func getDefaultColumnNameFunc) + public static string ToColumnName(this TFieldMetadata source, Func getDefaultColumnNameFunc) where TFieldMetadata : FieldMetadata { var mappingAttribute = source .Attributes - .OfType () - .SingleOrDefault (() => new Exception ( + .OfType() + .SingleOrDefault(() => new Exception( $"Field {source.Name} of {source.DomainTypeMetadata.DomainType.Name} has no one {typeof(MappingAttribute).Name}")); - return mappingAttribute.Maybe (z => z.ColumnName).IfDefaultString(getDefaultColumnNameFunc (source)); + return mappingAttribute.Maybe(z => z.ColumnName).IfDefaultString(getDefaultColumnNameFunc(source)); } - public static string ToColumnName (this TFieldMetadata source) + public static string ToColumnName(this TFieldMetadata source) where TFieldMetadata : FieldMetadata => - source.ToColumnName (z => + source.ToColumnName(z => z.Name); } public static class ReferenceTypeFieldMetadataExtension @@ -50,9 +50,10 @@ public static string GetForeignKeyName(this ListTypeFieldMetadata source) public static string GetSqlReferenceColumnName(this ReferenceTypeFieldMetadata source) { var fi = (FieldMetadata)source; - return fi.ToColumnName (z => z.Name + "Id"); + return fi.ToColumnName(z => z.Name + "Id"); } public static string ToSqlColumnName(this FieldMetadata source) => source.GetMappingName() ?? source.Name; private static string GetMappingName(this FieldMetadata source) => source.Attributes.OfType().SingleOrDefault().Maybe(z => z.ColumnName); } + diff --git a/src/Database/Framework.Database.SqlMapper/IMapper.cs b/src/Database/Framework.Database.SqlMapper/IMapper.cs index 1742115ab..bb0a478d9 100644 --- a/src/Database/Framework.Database.SqlMapper/IMapper.cs +++ b/src/Database/Framework.Database.SqlMapper/IMapper.cs @@ -4,5 +4,6 @@ namespace Framework.Database.SqlMapper; public interface IMapper { - IEnumerable GetMapping (FieldMetadata field); + IEnumerable GetMapping(FieldMetadata field); } + diff --git a/src/Database/Framework.Database.SqlMapper/InlineTypeFieldMapper.cs b/src/Database/Framework.Database.SqlMapper/InlineTypeFieldMapper.cs index 10667f64f..2b2d5d6e7 100644 --- a/src/Database/Framework.Database.SqlMapper/InlineTypeFieldMapper.cs +++ b/src/Database/Framework.Database.SqlMapper/InlineTypeFieldMapper.cs @@ -16,14 +16,14 @@ private static IEnumerable GetMappingWithPrimitives(FieldMe .GetAllElements(z => z.Children) .Select( z => new - { - Name = string.Join( + { + Name = string.Join( string.Empty, z.GetAllElements(q => q.Parent) .Select(q => q.Name) .Reverse()), - PrimitiveCollection = z.PrimitiveMetadataCollection, - }) + PrimitiveCollection = z.PrimitiveMetadataCollection, + }) .ToList(); var mapper = new PrimitiveTypeFieldMapper(); @@ -39,14 +39,14 @@ private static IEnumerable GetMappingWithRefType(FieldMetad .GetAllElements(z => z.Children) .Select( z => new - { - Name = string.Join( + { + Name = string.Join( string.Empty, z.GetAllElements(q => q.Parent) .Select(q => q.Name) .Reverse()), - z.ReferenceTypes, - }) + z.ReferenceTypes, + }) .ToList(); var mapper = new ReferenceTypeFieldMapper(); @@ -54,3 +54,4 @@ private static IEnumerable GetMappingWithRefType(FieldMetad return pairs.SelectMany(z => z.ReferenceTypes.SelectMany(q => mapper.GetMapping(q, z.Name))); } } + diff --git a/src/Database/Framework.Database.SqlMapper/ListTypeFieldMapper.cs b/src/Database/Framework.Database.SqlMapper/ListTypeFieldMapper.cs index 7cea141cb..43b5ae318 100644 --- a/src/Database/Framework.Database.SqlMapper/ListTypeFieldMapper.cs +++ b/src/Database/Framework.Database.SqlMapper/ListTypeFieldMapper.cs @@ -9,3 +9,4 @@ protected override IEnumerable GetMapping(ListTypeFieldMeta yield break; } } + diff --git a/src/Database/Framework.Database.SqlMapper/Mapper.cs b/src/Database/Framework.Database.SqlMapper/Mapper.cs index f77990116..05e172c04 100644 --- a/src/Database/Framework.Database.SqlMapper/Mapper.cs +++ b/src/Database/Framework.Database.SqlMapper/Mapper.cs @@ -17,3 +17,4 @@ protected virtual bool GetIsNullable(FieldMetadata field) return nullableAttributes.Any() || field.Type.IsClass; } } + diff --git a/src/Database/Framework.Database.SqlMapper/MapperFactory.cs b/src/Database/Framework.Database.SqlMapper/MapperFactory.cs index c4b40682b..162166152 100644 --- a/src/Database/Framework.Database.SqlMapper/MapperFactory.cs +++ b/src/Database/Framework.Database.SqlMapper/MapperFactory.cs @@ -19,3 +19,4 @@ public static class MapperFactory public static IEnumerable GetMapping(FieldMetadata fieldMetadata) => GetMapper(fieldMetadata).GetMapping(fieldMetadata); } + diff --git a/src/Database/Framework.Database.SqlMapper/PrimitiveTypeFieldMapper.cs b/src/Database/Framework.Database.SqlMapper/PrimitiveTypeFieldMapper.cs index b4611cabc..ff5d6909f 100644 --- a/src/Database/Framework.Database.SqlMapper/PrimitiveTypeFieldMapper.cs +++ b/src/Database/Framework.Database.SqlMapper/PrimitiveTypeFieldMapper.cs @@ -30,3 +30,4 @@ public IEnumerable GetMapping(PrimitiveTypeFieldMetadata fi } } + diff --git a/src/Database/Framework.Database.SqlMapper/ReferenceTypeFieldMapper.cs b/src/Database/Framework.Database.SqlMapper/ReferenceTypeFieldMapper.cs index a8c6c3616..81e2b31a9 100644 --- a/src/Database/Framework.Database.SqlMapper/ReferenceTypeFieldMapper.cs +++ b/src/Database/Framework.Database.SqlMapper/ReferenceTypeFieldMapper.cs @@ -18,6 +18,7 @@ public IEnumerable GetMapping(ReferenceTypeFieldMetadata fi false, field, null, - field.Attributes.OfType().Any(z=>z.IsUnique)); + field.Attributes.OfType().Any(z => z.IsUnique)); } } + diff --git a/src/Database/Framework.Database.SqlMapper/SqlFieldMappingInfo.cs b/src/Database/Framework.Database.SqlMapper/SqlFieldMappingInfo.cs index 3704ab292..6a31abf72 100644 --- a/src/Database/Framework.Database.SqlMapper/SqlFieldMappingInfo.cs +++ b/src/Database/Framework.Database.SqlMapper/SqlFieldMappingInfo.cs @@ -27,3 +27,4 @@ public class SqlFieldMappingInfo( public string DefaultConstraint => defaultConstraint; } + diff --git a/src/Database/Framework.Database.SqlMapper/TypeExtensions.cs b/src/Database/Framework.Database.SqlMapper/TypeExtensions.cs index 90f420750..b37e97aa7 100644 --- a/src/Database/Framework.Database.SqlMapper/TypeExtensions.cs +++ b/src/Database/Framework.Database.SqlMapper/TypeExtensions.cs @@ -17,7 +17,7 @@ public static DataType ToDataType(this Type type, IEnumerable propert { return type.GetGenericArguments()[0].ToDataType(propertyAttributies); } - if (type.IsArray && type.GetElementType() == typeof(byte) && propertyAttributies.All(z=>z.GetType() != typeof(VersionAttribute))) + if (type.IsArray && type.GetElementType() == typeof(byte) && propertyAttributies.All(z => z.GetType() != typeof(VersionAttribute))) { return DataType.Image; } @@ -108,8 +108,9 @@ public static DataType ToDataType(this Type type, IEnumerable propert private static TValue GetValueByAttribute(IEnumerable attributes, Func getValueFunc, TValue defaultValue) { var attribute = attributes.OfType() - .Concat(attributes.OfType>().Select(z=>z.Convert())).FirstOrDefault(); + .Concat(attributes.OfType>().Select(z => z.Convert())).FirstOrDefault(); return null != attribute ? getValueFunc(attribute) : defaultValue; } } + diff --git a/src/Database/Framework.Database/DependencyInjection/DatabaseSetup.cs b/src/Database/Framework.Database/DependencyInjection/DatabaseSetup.cs index 30d77d701..6323fdfd9 100644 --- a/src/Database/Framework.Database/DependencyInjection/DatabaseSetup.cs +++ b/src/Database/Framework.Database/DependencyInjection/DatabaseSetup.cs @@ -77,7 +77,7 @@ public IDatabaseSetup SetDefaultConnectionString(string connectionString) public IDatabaseSetup SetDefaultConnectionStringName(string connectionStringName) { - this.defaultConnectionStringSettings = new (connectionStringName); + this.defaultConnectionStringSettings = new(connectionStringName); return this; } @@ -140,3 +140,4 @@ private static IServiceCollection RegistryGenericDatabaseVisitors(IServiceCollec return services; } } + diff --git a/src/Database/Framework.Database/DependencyInjection/IDatabaseSetup.cs b/src/Database/Framework.Database/DependencyInjection/IDatabaseSetup.cs index baf605402..b5593f64b 100644 --- a/src/Database/Framework.Database/DependencyInjection/IDatabaseSetup.cs +++ b/src/Database/Framework.Database/DependencyInjection/IDatabaseSetup.cs @@ -25,3 +25,4 @@ IDatabaseSetup AddVisitorContainer() IDatabaseSetup SetDefaultConnectionStringName(string connectionStringName); } + diff --git a/src/Database/Framework.Database/DependencyInjection/ServiceCollectionExtensions.cs b/src/Database/Framework.Database/DependencyInjection/ServiceCollectionExtensions.cs index 8b18c6699..38b7e3f98 100644 --- a/src/Database/Framework.Database/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Database/Framework.Database/DependencyInjection/ServiceCollectionExtensions.cs @@ -9,3 +9,4 @@ public static class ServiceCollectionExtensions public static IServiceCollection AddGeneralDatabase(this IServiceCollection services, Action? setupAction = null) => services.Initialize(setupAction); } + diff --git a/src/Database/Framework.Tracking.Abstractions/ITrackingService`1.cs b/src/Database/Framework.Tracking.Abstractions/ITrackingService`1.cs index 5c6587aac..d30b09cff 100644 --- a/src/Database/Framework.Tracking.Abstractions/ITrackingService`1.cs +++ b/src/Database/Framework.Tracking.Abstractions/ITrackingService`1.cs @@ -60,3 +60,4 @@ TProperty GetPrevOrCurrentValue(TDomainObject domainOb TProperty GetPrevValue(TDomainObject domainObject, Expression> propertyExpression, TProperty defaultValue) where TDomainObject : class, TPersistentDomainObjectBase; } + diff --git a/src/Database/Framework.Tracking.Abstractions/ObjectState.cs b/src/Database/Framework.Tracking.Abstractions/ObjectState.cs index 4053be873..91740e252 100644 --- a/src/Database/Framework.Tracking.Abstractions/ObjectState.cs +++ b/src/Database/Framework.Tracking.Abstractions/ObjectState.cs @@ -12,3 +12,4 @@ public static ObjectState Create(Expression> propertyExpressi return new ObjectState(path, currentValue, previousValue, true); } } + diff --git a/src/Database/Framework.Tracking.Abstractions/TrackingProperty.cs b/src/Database/Framework.Tracking.Abstractions/TrackingProperty.cs index 213e3ab63..fcfd4c5c7 100644 --- a/src/Database/Framework.Tracking.Abstractions/TrackingProperty.cs +++ b/src/Database/Framework.Tracking.Abstractions/TrackingProperty.cs @@ -23,3 +23,4 @@ public static TrackingProperty Create(string propertyName, object? previou } } } + diff --git a/src/Database/Framework.Tracking.Abstractions/TrackingProperty`1.cs b/src/Database/Framework.Tracking.Abstractions/TrackingProperty`1.cs index 5923e87a9..8b79ae6dc 100644 --- a/src/Database/Framework.Tracking.Abstractions/TrackingProperty`1.cs +++ b/src/Database/Framework.Tracking.Abstractions/TrackingProperty`1.cs @@ -12,3 +12,4 @@ public readonly record struct TrackingProperty(string PropertyName, Maybe { public string LowPropertyName { get; } = PropertyName.ToLower(CultureInfo.InvariantCulture); } + diff --git a/src/Database/Framework.Tracking.Abstractions/TrackingResult`1.cs b/src/Database/Framework.Tracking.Abstractions/TrackingResult`1.cs index a995449f0..4999e8c9d 100644 --- a/src/Database/Framework.Tracking.Abstractions/TrackingResult`1.cs +++ b/src/Database/Framework.Tracking.Abstractions/TrackingResult`1.cs @@ -148,3 +148,4 @@ public IEnumerable GetUnexpectedChangedProprties( /// IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); } + diff --git a/src/Database/Framework.Tracking.Tests/TrackingServiceTests.cs b/src/Database/Framework.Tracking.Tests/TrackingServiceTests.cs index c8497828d..d57509926 100644 --- a/src/Database/Framework.Tracking.Tests/TrackingServiceTests.cs +++ b/src/Database/Framework.Tracking.Tests/TrackingServiceTests.cs @@ -1,4 +1,5 @@ using Framework.Database; + using NSubstitute; namespace Framework.Tracking.Tests; @@ -733,3 +734,4 @@ public void HasChange_ObjectVersionRealNotChangedArrayPropertyDefaultMode_Result Assert.True(result); } } + diff --git a/src/Database/Framework.Tracking.Validation/FixedPropertyValidator.cs b/src/Database/Framework.Tracking.Validation/FixedPropertyValidator.cs index 8feee79d8..fca1dd326 100644 --- a/src/Database/Framework.Tracking.Validation/FixedPropertyValidator.cs +++ b/src/Database/Framework.Tracking.Validation/FixedPropertyValidator.cs @@ -45,3 +45,4 @@ public ValidationResult GetValidationResult(IPropertyValidationContext $"{validationContext.GetPropertyName()} field in {validationContext.GetSourceTypeName()} can't be changed"); } } + diff --git a/src/Database/Framework.Tracking.Validation/FixedPropertyValidatorAttribute.cs b/src/Database/Framework.Tracking.Validation/FixedPropertyValidatorAttribute.cs index 1ee0cc3cf..47d7fd1b1 100644 --- a/src/Database/Framework.Tracking.Validation/FixedPropertyValidatorAttribute.cs +++ b/src/Database/Framework.Tracking.Validation/FixedPropertyValidatorAttribute.cs @@ -11,3 +11,4 @@ public class FixedPropertyValidatorAttribute : PropertyValidatorAttribute { public override IPropertyValidator CreateValidator() => new FixedPropertyValidator(); } + diff --git a/src/Database/Framework.Tracking.Validation/IPersistentDomainObjectBaseTypeResolver.cs b/src/Database/Framework.Tracking.Validation/IPersistentDomainObjectBaseTypeResolver.cs index daf0b82da..da0f2c7a2 100644 --- a/src/Database/Framework.Tracking.Validation/IPersistentDomainObjectBaseTypeResolver.cs +++ b/src/Database/Framework.Tracking.Validation/IPersistentDomainObjectBaseTypeResolver.cs @@ -3,3 +3,4 @@ namespace Framework.Tracking.Validation; public interface IPersistentDomainObjectBaseTypeResolver : ITypeResolver; + diff --git a/src/Database/Framework.Tracking/TrackingPropertyExtensions.cs b/src/Database/Framework.Tracking/TrackingPropertyExtensions.cs index ee12b0c96..5529e5e04 100644 --- a/src/Database/Framework.Tracking/TrackingPropertyExtensions.cs +++ b/src/Database/Framework.Tracking/TrackingPropertyExtensions.cs @@ -11,16 +11,17 @@ public static MergeResult ToMergeResult(this TrackingProperty - { - AddingItems = currentValue.Except(previousValue).ToList(), + { + AddingItems = currentValue.Except(previousValue).ToList(), - RemovingItems = previousValue.Except(currentValue).ToList(), + RemovingItems = previousValue.Except(currentValue).ToList(), - CombineItems = (from prev in previousValue - join next in currentValue on prev equals next - select ValueTuple.Create(prev, next)).ToList() - }; + CombineItems = (from prev in previousValue + join next in currentValue on prev equals next + select ValueTuple.Create(prev, next)).ToList() + }; return request.GetValueOrDefault(MergeResult.Empty); } } + diff --git a/src/Database/Framework.Tracking/TrackingResult.cs b/src/Database/Framework.Tracking/TrackingResult.cs index 1ed1f74ed..b953f302d 100644 --- a/src/Database/Framework.Tracking/TrackingResult.cs +++ b/src/Database/Framework.Tracking/TrackingResult.cs @@ -36,3 +36,4 @@ private static Func ThreadsafeMemoize(this Func cache.GetOrAdd(argument, func); } } + diff --git a/src/Database/Framework.Tracking/TrackingServiceExtensions.cs b/src/Database/Framework.Tracking/TrackingServiceExtensions.cs index a7d202b7e..7224a3a40 100644 --- a/src/Database/Framework.Tracking/TrackingServiceExtensions.cs +++ b/src/Database/Framework.Tracking/TrackingServiceExtensions.cs @@ -178,3 +178,4 @@ internal static Func, IEnumerable> GetAllElements } } } + diff --git a/src/Database/Framework.Tracking/TrackingService`1.cs b/src/Database/Framework.Tracking/TrackingService`1.cs index 73d5cc150..d0dd5a1c4 100644 --- a/src/Database/Framework.Tracking/TrackingService`1.cs +++ b/src/Database/Framework.Tracking/TrackingService`1.cs @@ -68,3 +68,4 @@ private IEnumerable GetModifiedObjectStates(TDomainO where TDomainObject : class, TPersistentDomainObjectBase => objectStatesService.GetModifiedObjectStates(value); } + diff --git a/src/Domain/Framework.Relations/AddRemoveDetailHelper.cs b/src/Domain/Framework.Relations/AddRemoveDetailHelper.cs index ab3355576..2a8b21f78 100644 --- a/src/Domain/Framework.Relations/AddRemoveDetailHelper.cs +++ b/src/Domain/Framework.Relations/AddRemoveDetailHelper.cs @@ -100,3 +100,4 @@ public static void ClearDetails(this TMaster master) master.Details.ToList().Foreach(master.RemoveDetail); } } + diff --git a/src/Domain/Framework.Relations/DetailRoleExtensions.cs b/src/Domain/Framework.Relations/DetailRoleExtensions.cs index 738b71051..63cb70b52 100644 --- a/src/Domain/Framework.Relations/DetailRoleExtensions.cs +++ b/src/Domain/Framework.Relations/DetailRoleExtensions.cs @@ -23,3 +23,4 @@ public static bool IsMaster(this PropertyInfo propertyInfo) return propertyInfo.HasAttribute(); } } + diff --git a/src/Domain/Framework.Relations/TypeExtensions.cs b/src/Domain/Framework.Relations/TypeExtensions.cs index dbd3fe619..a58c6aa0f 100644 --- a/src/Domain/Framework.Relations/TypeExtensions.cs +++ b/src/Domain/Framework.Relations/TypeExtensions.cs @@ -23,3 +23,4 @@ join property in type.GetProperties(BindingFlags.Instance | BindingFlags.NonPubl select propertyGroup.Count() == 1 ? propertyGroup.Single() : propertyGroup.Single(property => property.HasPrivateField()); } + diff --git a/src/Domain/Framework.Restriction/RequiredModeExtensions.cs b/src/Domain/Framework.Restriction/RequiredModeExtensions.cs index 39aaed948..f356b685b 100644 --- a/src/Domain/Framework.Restriction/RequiredModeExtensions.cs +++ b/src/Domain/Framework.Restriction/RequiredModeExtensions.cs @@ -23,7 +23,7 @@ public static bool IsValidAppliedType(this RequiredMode requiredMode, Type appli { case RequiredMode.AllowEmptyString: - return typeof (string) == appliedType; + return typeof(string) == appliedType; case RequiredMode.ClosedPeriodEndDate: @@ -37,3 +37,4 @@ public static bool IsValidAppliedType(this RequiredMode requiredMode, Type appli } } } + diff --git a/src/Domain/Framework.Restriction/TypeExtensions2.cs b/src/Domain/Framework.Restriction/TypeExtensions2.cs index 9903b761d..71f4ae885 100644 --- a/src/Domain/Framework.Restriction/TypeExtensions2.cs +++ b/src/Domain/Framework.Restriction/TypeExtensions2.cs @@ -53,3 +53,4 @@ public static PropertyInfo[] GetUniqueElementProperties(this PropertyInfo proper } } + diff --git a/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/ExtendedAttributeSource.cs b/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/ExtendedAttributeSource.cs index 7217d1725..226848851 100644 --- a/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/ExtendedAttributeSource.cs +++ b/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/ExtendedAttributeSource.cs @@ -13,3 +13,4 @@ public ExtendedAttributeSource(IEnumerable list) { } } + diff --git a/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/IMetadataProxyProvider.cs b/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/IMetadataProxyProvider.cs index abd7f4228..6489f52a5 100644 --- a/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/IMetadataProxyProvider.cs +++ b/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/IMetadataProxyProvider.cs @@ -10,3 +10,4 @@ T Wrap(T value) T? TryWrap(T value) where T : class, ICustomAttributeProvider; } + diff --git a/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/IWrappingObject.cs b/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/IWrappingObject.cs index 43e3c39e1..346197f18 100644 --- a/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/IWrappingObject.cs +++ b/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/IWrappingObject.cs @@ -6,3 +6,4 @@ public interface IWrappingObject : ICustomAttributeProvider { bool CanWrap { get; } } + diff --git a/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/PropertyInfoExtensions.cs b/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/PropertyInfoExtensions.cs index 280cd3133..9be478413 100644 --- a/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/PropertyInfoExtensions.cs +++ b/src/ExtendedMetadata/Framework.ExtendedMetadata.Abstractions/PropertyInfoExtensions.cs @@ -14,3 +14,4 @@ public static PropertyInfo GetUnderlyingSystemProperty(this PropertyInfo propert ?? throw new Exception("Base property not found"); } } + diff --git a/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/Builder/DomainTypeMetadataBuilder.cs b/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/Builder/DomainTypeMetadataBuilder.cs index bfd0d9b02..56d7c954c 100644 --- a/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/Builder/DomainTypeMetadataBuilder.cs +++ b/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/Builder/DomainTypeMetadataBuilder.cs @@ -33,3 +33,4 @@ public IDomainTypeMetadataBuilder AddProperty(Expression return this; } } + diff --git a/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/Builder/ExtendedAttributeSourceBuilder.cs b/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/Builder/ExtendedAttributeSourceBuilder.cs index 902bff000..76c40ed09 100644 --- a/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/Builder/ExtendedAttributeSourceBuilder.cs +++ b/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/Builder/ExtendedAttributeSourceBuilder.cs @@ -26,7 +26,7 @@ public IExtendedAttributeSourceBuilder Add(Action(Action AddProperty( Expression> propertySelector, Action setupAction); } + diff --git a/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/Builder/PropertyMetadataBuilder.cs b/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/Builder/PropertyMetadataBuilder.cs index 10b9c3581..1026135a2 100644 --- a/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/Builder/PropertyMetadataBuilder.cs +++ b/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/Builder/PropertyMetadataBuilder.cs @@ -16,3 +16,4 @@ public IPropertyMetadataBuilder AddAttribute(Attribute attribute) return this; } } + diff --git a/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/MetadataProxyProvider.cs b/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/MetadataProxyProvider.cs index add38d431..2a5922278 100644 --- a/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/MetadataProxyProvider.cs +++ b/src/ExtendedMetadata/Framework.ExtendedMetadata.Runtime/MetadataProxyProvider.cs @@ -110,3 +110,4 @@ private ImmutableArray GetCustomAttributes(PropertyInfo prop) => }); } + diff --git a/src/Framework.Core/ActionExtensions.cs b/src/Framework.Core/ActionExtensions.cs index e54cbbea8..c5ceb80e2 100644 --- a/src/Framework.Core/ActionExtensions.cs +++ b/src/Framework.Core/ActionExtensions.cs @@ -21,3 +21,4 @@ public static Action Composite(this IEnumerable WithLock(this IAnonymousTypeBuil return new FuncAnonymousTypeBuilder(map => { - lock(locker) + lock (locker) { return anonymousTypeBuilder.GetAnonymousType(map); } @@ -86,3 +86,4 @@ public FuncAnonymousTypeBuilder(Func func) public Type GetAnonymousType(TMap typeMap) => this.func(typeMap); } } + diff --git a/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeBuilderStorage.cs b/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeBuilderStorage.cs index 7d11fc62a..87f9351e1 100644 --- a/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeBuilderStorage.cs +++ b/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeBuilderStorage.cs @@ -24,3 +24,4 @@ public AnonymousTypeBuilderStorage(string assemblyBuilderName, AssemblyBuilderAc public ModuleBuilder ModuleBuilder { get; } } + diff --git a/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeBuilderStorageFactory.cs b/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeBuilderStorageFactory.cs index 6fe40fe5a..1f9293bc3 100644 --- a/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeBuilderStorageFactory.cs +++ b/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeBuilderStorageFactory.cs @@ -14,3 +14,4 @@ public IAnonymousTypeBuilderStorage Create(string assemblyBuilderName) => assemblyBuilderName, builderName => new AnonymousTypeBuilderStorage(builderName)); } + diff --git a/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByFieldBuilder.cs b/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByFieldBuilder.cs index 998eb4977..a816c80de 100644 --- a/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByFieldBuilder.cs +++ b/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByFieldBuilder.cs @@ -17,3 +17,4 @@ public class AnonymousTypeByFieldBuilder(IAnonymousTypeBuilder public static AnonymousTypeByFieldBuilder Default => LazyDefault.Value; } + diff --git a/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByMemberBuilder.cs b/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByMemberBuilder.cs index 2f0f1bf93..983a1b0a8 100644 --- a/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByMemberBuilder.cs +++ b/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByMemberBuilder.cs @@ -7,7 +7,7 @@ namespace Framework.Core.AnonymousTypeBuilder; public abstract class AnonymousTypeByMemberBuilder : IAnonymousTypeBuilder where TMap : class, ITypeMap - where TMapMember: ITypeMapMember + where TMapMember : ITypeMapMember { private readonly IAnonymousTypeBuilderStorage storage; @@ -61,3 +61,4 @@ public Type GetAnonymousType(TMap typeMap) return type; } } + diff --git a/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByPropertyBuilder.cs b/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByPropertyBuilder.cs index fea83e9c5..fc8aee333 100644 --- a/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByPropertyBuilder.cs +++ b/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByPropertyBuilder.cs @@ -48,3 +48,4 @@ protected override PropertyBuilder ImplementMember(TypeBuilder typeBuilder, TMap public static AnonymousTypeByPropertyBuilder Default => LazyDefault.Value; } + diff --git a/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByPropertyWithSerializeBuilder.cs b/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByPropertyWithSerializeBuilder.cs index c9e7472d9..31fafce5a 100644 --- a/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByPropertyWithSerializeBuilder.cs +++ b/src/Framework.Core/AnonymousTypeBuilder/AnonymousTypeByPropertyWithSerializeBuilder.cs @@ -27,5 +27,6 @@ protected override PropertyBuilder ImplementMember(TypeBuilder typeBuilder, TMap protected virtual CustomAttributeBuilder GetDataContractAttribute(TMap typeMap) => new(typeof(DataContractAttribute).GetConstructor(Type.EmptyTypes), []); - protected virtual CustomAttributeBuilder GetDataMemberAttribute(TMapMember member) => new(typeof (DataMemberAttribute).GetConstructor(Type.EmptyTypes), []); + protected virtual CustomAttributeBuilder GetDataMemberAttribute(TMapMember member) => new(typeof(DataMemberAttribute).GetConstructor(Type.EmptyTypes), []); } + diff --git a/src/Framework.Core/AnonymousTypeBuilder/IAnonymousTypeBuilderStorage.cs b/src/Framework.Core/AnonymousTypeBuilder/IAnonymousTypeBuilderStorage.cs index 6f2accaee..02008a4d1 100644 --- a/src/Framework.Core/AnonymousTypeBuilder/IAnonymousTypeBuilderStorage.cs +++ b/src/Framework.Core/AnonymousTypeBuilder/IAnonymousTypeBuilderStorage.cs @@ -6,3 +6,4 @@ public interface IAnonymousTypeBuilderStorage { ModuleBuilder ModuleBuilder { get; } } + diff --git a/src/Framework.Core/AnonymousTypeBuilder/TypeMap.cs b/src/Framework.Core/AnonymousTypeBuilder/TypeMap.cs index e2f753104..6cba71f7a 100644 --- a/src/Framework.Core/AnonymousTypeBuilder/TypeMap.cs +++ b/src/Framework.Core/AnonymousTypeBuilder/TypeMap.cs @@ -47,3 +47,4 @@ public TypeMap(string name, IEnumerable members) IEnumerable ITypeMap.Members => this.Members; } + diff --git a/src/Framework.Core/AnonymousTypeBuilder/TypeMapProperty.cs b/src/Framework.Core/AnonymousTypeBuilder/TypeMapProperty.cs index 6797089ff..02bd985c2 100644 --- a/src/Framework.Core/AnonymousTypeBuilder/TypeMapProperty.cs +++ b/src/Framework.Core/AnonymousTypeBuilder/TypeMapProperty.cs @@ -17,3 +17,4 @@ public TypeMapProperty(PropertyInfo property) public virtual Type Type => this.Property.PropertyType; } + diff --git a/src/Framework.Core/AssemblyExtensions.cs b/src/Framework.Core/AssemblyExtensions.cs index c69575e10..761537f4d 100644 --- a/src/Framework.Core/AssemblyExtensions.cs +++ b/src/Framework.Core/AssemblyExtensions.cs @@ -18,3 +18,4 @@ public static class AssemblyExtensions } } } + diff --git a/src/Framework.Core/CallProxyInterfaceImplementTypeBuilder.cs b/src/Framework.Core/CallProxyInterfaceImplementTypeBuilder.cs index 9dc457fec..e18a85fb0 100644 --- a/src/Framework.Core/CallProxyInterfaceImplementTypeBuilder.cs +++ b/src/Framework.Core/CallProxyInterfaceImplementTypeBuilder.cs @@ -27,3 +27,4 @@ public CallProxyInterfaceImplementTypeBuilder(ModuleBuilder moduleBuilder) { } } + diff --git a/src/Framework.Core/ConsoleCancellationToken.cs b/src/Framework.Core/ConsoleCancellationToken.cs index ae16bf8c3..b010cc79f 100644 --- a/src/Framework.Core/ConsoleCancellationToken.cs +++ b/src/Framework.Core/ConsoleCancellationToken.cs @@ -55,3 +55,4 @@ void Cancel() } } } + diff --git a/src/Framework.Core/CoreEnumerableExtensions.cs b/src/Framework.Core/CoreEnumerableExtensions.cs index 9ac8bb971..2e499a55f 100644 --- a/src/Framework.Core/CoreEnumerableExtensions.cs +++ b/src/Framework.Core/CoreEnumerableExtensions.cs @@ -454,3 +454,4 @@ private class PairGrouping(List list, TKey key) public TKey Key { get; } = key; } } + diff --git a/src/Framework.Core/CoreExpressionExtensions.cs b/src/Framework.Core/CoreExpressionExtensions.cs index 40bd98558..44957e0fe 100644 --- a/src/Framework.Core/CoreExpressionExtensions.cs +++ b/src/Framework.Core/CoreExpressionExtensions.cs @@ -253,3 +253,4 @@ public NodeExpressionVisitor(Expression startNode) public Node ToNode() => new(this.startNode, this.childVisitors.Select(child => child.ToNode())); } } + diff --git a/src/Framework.Core/CoreFuncExtensions.cs b/src/Framework.Core/CoreFuncExtensions.cs index 38adda6ac..6148f0245 100644 --- a/src/Framework.Core/CoreFuncExtensions.cs +++ b/src/Framework.Core/CoreFuncExtensions.cs @@ -47,3 +47,4 @@ public static Func WithLock(this Func Delegate.CreateDelegate(delegateType, methodInfo); } + diff --git a/src/Framework.Core/CoreObjectExtensions.cs b/src/Framework.Core/CoreObjectExtensions.cs index 2b7fe0b08..80fc45923 100644 --- a/src/Framework.Core/CoreObjectExtensions.cs +++ b/src/Framework.Core/CoreObjectExtensions.cs @@ -49,3 +49,4 @@ public static IEnumerable RepeatInfinity(this TSource v) public static KeyValuePair ToKeyValuePair(this TKey key, TValue value) => new(key, value); } + diff --git a/src/Framework.Core/CorePropertyInfoExtensions.cs b/src/Framework.Core/CorePropertyInfoExtensions.cs index 33dea830a..80673d908 100644 --- a/src/Framework.Core/CorePropertyInfoExtensions.cs +++ b/src/Framework.Core/CorePropertyInfoExtensions.cs @@ -148,3 +148,4 @@ private static bool HasPrivateFieldInternal(this PropertyInfo propertyInfo, Type return request.SingleOrDefault(); } } + diff --git a/src/Framework.Core/CoreStringExtensions.cs b/src/Framework.Core/CoreStringExtensions.cs index 56010e2ea..91af8a507 100644 --- a/src/Framework.Core/CoreStringExtensions.cs +++ b/src/Framework.Core/CoreStringExtensions.cs @@ -221,3 +221,4 @@ public static void MaybeString(this string source, Action evaluate) public static string IfDefaultString(this string source, string otherResult) => string.IsNullOrWhiteSpace(source) ? otherResult : source; } + diff --git a/src/Framework.Core/CoreTypeExtensions.cs b/src/Framework.Core/CoreTypeExtensions.cs index 3b6169ea6..53a00bff5 100644 --- a/src/Framework.Core/CoreTypeExtensions.cs +++ b/src/Framework.Core/CoreTypeExtensions.cs @@ -525,3 +525,4 @@ public static IEnumerable Windowed2(this IEnumerable< return method; } } + diff --git a/src/Framework.Core/CustomAttributeProviderExtensions.cs b/src/Framework.Core/CustomAttributeProviderExtensions.cs index 75a96ab7b..50a346966 100644 --- a/src/Framework.Core/CustomAttributeProviderExtensions.cs +++ b/src/Framework.Core/CustomAttributeProviderExtensions.cs @@ -77,3 +77,4 @@ public static bool HasAttribute(this ICustomAttributeProvider source) : attributes.FirstOrDefault(); } } + diff --git a/src/Framework.Core/EncodingStringWriter.cs b/src/Framework.Core/EncodingStringWriter.cs index a9673b3f0..c8979966f 100644 --- a/src/Framework.Core/EncodingStringWriter.cs +++ b/src/Framework.Core/EncodingStringWriter.cs @@ -6,3 +6,4 @@ public class EncodingStringWriter(StringBuilder sb, Encoding encoding) : StringW { public override Encoding Encoding => encoding; } + diff --git a/src/Framework.Core/EqualsHelper.cs b/src/Framework.Core/EqualsHelper.cs index 5b81f0d1c..436198521 100644 --- a/src/Framework.Core/EqualsHelper.cs +++ b/src/Framework.Core/EqualsHelper.cs @@ -26,3 +26,4 @@ private static Func>> GetGetEqualsExpression() return expr.Compile(); } } + diff --git a/src/Framework.Core/ExpressionVisitorExtensions.cs b/src/Framework.Core/ExpressionVisitorExtensions.cs index 8f31b5ec1..1492750e2 100644 --- a/src/Framework.Core/ExpressionVisitorExtensions.cs +++ b/src/Framework.Core/ExpressionVisitorExtensions.cs @@ -1,6 +1,7 @@ using System.Linq.Expressions; using Anch.Core; + using Framework.Core.Visitors; namespace Framework.Core; @@ -66,3 +67,4 @@ public override Expression Visit(Expression node) } } } + diff --git a/src/Framework.Core/Helpers/DataContractSerializerHelper.cs b/src/Framework.Core/Helpers/DataContractSerializerHelper.cs index 04d5a8b83..bca0fa3fc 100644 --- a/src/Framework.Core/Helpers/DataContractSerializerHelper.cs +++ b/src/Framework.Core/Helpers/DataContractSerializerHelper.cs @@ -12,7 +12,7 @@ public static T Deserialize(string source) { var serializer = new DataContractSerializer(typeof(T)); - using var textReader = new StringReader (source); + using var textReader = new StringReader(source); using var xmlReader = new XmlTextReader(textReader); return (T)serializer.ReadObject(xmlReader); } @@ -58,5 +58,6 @@ public static bool XmlEquals(this T source, T other) } - public static ISerializer GetSerializer() => new Serializer (Deserialize, value => Serialize(value)); + public static ISerializer GetSerializer() => new Serializer(Deserialize, value => Serialize(value)); } + diff --git a/src/Framework.Core/Helpers/EnumHelper.cs b/src/Framework.Core/Helpers/EnumHelper.cs index f21d5d2a4..4a76375b6 100644 --- a/src/Framework.Core/Helpers/EnumHelper.cs +++ b/src/Framework.Core/Helpers/EnumHelper.cs @@ -10,7 +10,7 @@ public static class EnumHelper public static ReadOnlyCollection GetValues() where TEnum : struct, Enum { - if (!typeof (TEnum).IsEnum) + if (!typeof(TEnum).IsEnum) { throw new InvalidOperationException($"Type:{typeof(TEnum)} is not Enum"); } @@ -73,3 +73,4 @@ private static IEnumerable GetValues() } } } + diff --git a/src/Framework.Core/Helpers/ParserHelper.cs b/src/Framework.Core/Helpers/ParserHelper.cs index 005b511d7..7bffebd23 100644 --- a/src/Framework.Core/Helpers/ParserHelper.cs +++ b/src/Framework.Core/Helpers/ParserHelper.cs @@ -156,3 +156,4 @@ private static class InternalHelper } } } + diff --git a/src/Framework.Core/Helpers/PerformanceHelper.cs b/src/Framework.Core/Helpers/PerformanceHelper.cs index 483c80ae7..9ebc80f5b 100644 --- a/src/Framework.Core/Helpers/PerformanceHelper.cs +++ b/src/Framework.Core/Helpers/PerformanceHelper.cs @@ -34,3 +34,4 @@ public static string GetHealthStatus(Action action) return $"Health status is ok. SQL execution time: {duration} miliseconds"; } } + diff --git a/src/Framework.Core/IFactory.cs b/src/Framework.Core/IFactory.cs index a0c517915..14c649740 100644 --- a/src/Framework.Core/IFactory.cs +++ b/src/Framework.Core/IFactory.cs @@ -69,3 +69,4 @@ public class FuncFactory(Func crea { public TResult Create(TArg1 arg1, TArg2 arg2) => createFunc(arg1, arg2); } + diff --git a/src/Framework.Core/InterfaceImplementTypeBuilder.cs b/src/Framework.Core/InterfaceImplementTypeBuilder.cs index a5afe816a..70ab7f86b 100644 --- a/src/Framework.Core/InterfaceImplementTypeBuilder.cs +++ b/src/Framework.Core/InterfaceImplementTypeBuilder.cs @@ -123,7 +123,7 @@ public Type GetAnonymousType(Type sourceType) foreach (var pair in genericMap) { - if (pair.Key.ContainsGenericParameters) + if (pair.Key.ContainsGenericParameters) { // with explicit method implement not need contraints of class generics var contraints = pair.Key.GetGenericParameterConstraints() @@ -215,3 +215,4 @@ public Type GetAnonymousType(Type sourceType) return typeBuilder.CreateTypeInfo(); } } + diff --git a/src/Framework.Core/LazyImplementDictionaryCache.cs b/src/Framework.Core/LazyImplementDictionaryCache.cs index ff0dc3a65..4a53eeb95 100644 --- a/src/Framework.Core/LazyImplementDictionaryCache.cs +++ b/src/Framework.Core/LazyImplementDictionaryCache.cs @@ -60,3 +60,4 @@ private static Func, TValue> GetCreateProxyFunc() IEnumerable IDictionaryCache.Values => this.dict.Values; } + diff --git a/src/Framework.Core/LazyInterfaceImplementHelper.cs b/src/Framework.Core/LazyInterfaceImplementHelper.cs index 55ba3ca44..30a05a6b5 100644 --- a/src/Framework.Core/LazyInterfaceImplementHelper.cs +++ b/src/Framework.Core/LazyInterfaceImplementHelper.cs @@ -40,3 +40,4 @@ public static class LazyInterfaceImplementHelper public static readonly Func, T> CreateCallProxy = CallProxyInterfaceImplementTypeBuilder.Default.GetCreateProxyFunc(); } + diff --git a/src/Framework.Core/LazyInterfaceImplementTypeBuilder.cs b/src/Framework.Core/LazyInterfaceImplementTypeBuilder.cs index f6b2e476e..94ff18a22 100644 --- a/src/Framework.Core/LazyInterfaceImplementTypeBuilder.cs +++ b/src/Framework.Core/LazyInterfaceImplementTypeBuilder.cs @@ -23,7 +23,8 @@ public class LazyInterfaceImplementTypeBuilder : InterfaceImplementTypeBuilder /// /// Модуль, где будет генерировать анонимный тип public LazyInterfaceImplementTypeBuilder(ModuleBuilder moduleBuilder) - :base(moduleBuilder, typeof(Lazy<>)) + : base(moduleBuilder, typeof(Lazy<>)) { } } + diff --git a/src/Framework.Core/MessageSender/MessageSender.cs b/src/Framework.Core/MessageSender/MessageSender.cs index d28eaa523..63d28e9b2 100644 --- a/src/Framework.Core/MessageSender/MessageSender.cs +++ b/src/Framework.Core/MessageSender/MessageSender.cs @@ -27,7 +27,7 @@ public EmptyMessageSender() } - public override async Task SendAsync (TMessage message, CancellationToken cancellationToken) + public override async Task SendAsync(TMessage message, CancellationToken cancellationToken) { } diff --git a/src/Framework.Core/MethodBaseExtensions.cs b/src/Framework.Core/MethodBaseExtensions.cs index 17ab317da..57ee989b9 100644 --- a/src/Framework.Core/MethodBaseExtensions.cs +++ b/src/Framework.Core/MethodBaseExtensions.cs @@ -12,3 +12,4 @@ public static object InvokeWithExceptionProcessed(this MethodBase methodBase, ob return methodBase.Invoke(obj, parameters); } } + diff --git a/src/Framework.Core/Node.cs b/src/Framework.Core/Node.cs index 0a91083bf..e638affab 100644 --- a/src/Framework.Core/Node.cs +++ b/src/Framework.Core/Node.cs @@ -37,7 +37,7 @@ internal NodeP(T value) public new IEnumerable> Children { - get => (IEnumerable>) base.Children; + get => (IEnumerable>)base.Children; internal set => base.Children = value; } @@ -64,3 +64,4 @@ public static Node Select(this Node source, Func, T> return new Node(selector(source.Value, children.Select(v => v.Value)), children); } } + diff --git a/src/Framework.Core/NullableExtensions.cs b/src/Framework.Core/NullableExtensions.cs index 6249432d4..5ebe03620 100644 --- a/src/Framework.Core/NullableExtensions.cs +++ b/src/Framework.Core/NullableExtensions.cs @@ -57,3 +57,4 @@ public static Maybe Or(this Maybe v1, TResul where TSource : TResult => v1.HasValue ? v1.Select(v => (TResult)v) : Maybe.Return(v2); } + diff --git a/src/Framework.Core/Period/CommonPeriodExtensions.cs b/src/Framework.Core/Period/CommonPeriodExtensions.cs index 71862e130..3415ece6a 100644 --- a/src/Framework.Core/Period/CommonPeriodExtensions.cs +++ b/src/Framework.Core/Period/CommonPeriodExtensions.cs @@ -339,3 +339,4 @@ public static bool Contains(this Period? period, DateTime? date) private static string ProcessYear(this Period period, string result, bool addStartDateYear) => addStartDateYear ? $"{result} ({period.StartDate:yyyy})" : result; } + diff --git a/src/Framework.Core/Period/MonthFormatter.cs b/src/Framework.Core/Period/MonthFormatter.cs index dcfe781f6..add8616e9 100644 --- a/src/Framework.Core/Period/MonthFormatter.cs +++ b/src/Framework.Core/Period/MonthFormatter.cs @@ -61,8 +61,9 @@ public static class MonthFormatter /// /// Период, который начинается и заканчивается в одинаковом году /// Строка, содержащая римские номера месяцев начало и конца периода и год на дату начала периода - public static string GetMonthAndYearStrRoman(Period period) => + public static string GetMonthAndYearStrRoman(Period period) => period.IsWithinOneMonth ? period.StartDate.GetMonthAndYearStrRoman() : $"{RomanMonths[period.StartDate.Month - 1]}-{RomanMonths[period.EndDateValue.Month - 1]}'{period.StartDate:yy}"; } + diff --git a/src/Framework.Core/Period/Period.Reports.cs b/src/Framework.Core/Period/Period.Reports.cs index d2f9d7c26..875d4ba02 100644 --- a/src/Framework.Core/Period/Period.Reports.cs +++ b/src/Framework.Core/Period/Period.Reports.cs @@ -71,3 +71,4 @@ public partial struct Period [Obsolete("Only for reports. In plain code use CommonPeriodExtensions.GetDayAndMonthDateFormat instead")] public string GetDayAndMonthDateFormat(CultureInfo cultureInfo) => CommonPeriodExtensions.GetDayAndMonthDateFormat(this, cultureInfo); } + diff --git a/src/Framework.Core/Period/Period.cs b/src/Framework.Core/Period/Period.cs index 518931663..3d8a1f305 100644 --- a/src/Framework.Core/Period/Period.cs +++ b/src/Framework.Core/Period/Period.cs @@ -362,3 +362,4 @@ public DateTime? EndDate #endregion } + diff --git a/src/Framework.Core/Period/PeriodItemCollectionContainerExtensions.cs b/src/Framework.Core/Period/PeriodItemCollectionContainerExtensions.cs index a1eaef789..bd460e1d9 100644 --- a/src/Framework.Core/Period/PeriodItemCollectionContainerExtensions.cs +++ b/src/Framework.Core/Period/PeriodItemCollectionContainerExtensions.cs @@ -3,17 +3,17 @@ namespace Framework.Core; public static class PeriodItemCollectionContainerExtensions { - public static TItem? GetNewestItem (this IPeriodItemCollectionContainer source) + public static TItem? GetNewestItem(this IPeriodItemCollectionContainer source) where TItem : IPeriodObject { var request = from item in source.Items orderby item.Period descending select item; - return request.FirstOrDefault (); + return request.FirstOrDefault(); } - public static TItem? SingleOrDefault (this IPeriodItemCollectionContainer source, DateTime selectedDate) + public static TItem? SingleOrDefault(this IPeriodItemCollectionContainer source, DateTime selectedDate) where TItem : class, IPeriodObject => - source.Items.SingleOrDefault (item => item.Period.Contains (selectedDate)); + source.Items.SingleOrDefault(item => item.Period.Contains(selectedDate)); } diff --git a/src/Framework.Core/Period/PeriodObjectExtensions.cs b/src/Framework.Core/Period/PeriodObjectExtensions.cs index fbaa387b0..bdd2eaf9f 100644 --- a/src/Framework.Core/Period/PeriodObjectExtensions.cs +++ b/src/Framework.Core/Period/PeriodObjectExtensions.cs @@ -3,36 +3,36 @@ namespace Framework.Core; public static class PeriodObjectExtensions { - public static void OverridePeriodStartDate (this IMutablePeriodObject source, DateTime startDate) + public static void OverridePeriodStartDate(this IMutablePeriodObject source, DateTime startDate) { if (source == null) { - throw new ArgumentNullException (nameof(source)); + throw new ArgumentNullException(nameof(source)); } source.Period = new Period(startDate, source.Period.EndDate); } - public static void OverridePeriodEndDate (this IMutablePeriodObject source, DateTime? endDate) + public static void OverridePeriodEndDate(this IMutablePeriodObject source, DateTime? endDate) { if (source == null) { - throw new ArgumentNullException (nameof(source)); + throw new ArgumentNullException(nameof(source)); } - source.Period = new Period (source.Period.StartDate, endDate); + source.Period = new Period(source.Period.StartDate, endDate); } - public static T GetNewest (this IEnumerable source) + public static T GetNewest(this IEnumerable source) where T : IPeriodObject { var request = from item in source orderby item.Period descending select item; - return request.FirstOrDefault (); + return request.FirstOrDefault(); } public static T GetForDate(this IEnumerable source, DateTime date) @@ -45,7 +45,7 @@ where item.Period.Contains(date) return request.SingleOrDefault(); } - public static IEnumerable OrderByPeriod (this IEnumerable source) + public static IEnumerable OrderByPeriod(this IEnumerable source) where T : IPeriodObject { var request = from item in source diff --git a/src/Framework.Core/PropertyPath/PropertyPath.cs b/src/Framework.Core/PropertyPath/PropertyPath.cs index ffbe690fd..13c2773f9 100644 --- a/src/Framework.Core/PropertyPath/PropertyPath.cs +++ b/src/Framework.Core/PropertyPath/PropertyPath.cs @@ -90,3 +90,4 @@ private static IEnumerable GetProperties(Type sourceType, IEnumera return currentType.GetRequiredProperty(propertyName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); }).Skip(1).Select(v => v!); } + diff --git a/src/Framework.Core/PropertyPath/PropertyPathExtensions.cs b/src/Framework.Core/PropertyPath/PropertyPathExtensions.cs index 68a598638..1dce926f6 100644 --- a/src/Framework.Core/PropertyPath/PropertyPathExtensions.cs +++ b/src/Framework.Core/PropertyPath/PropertyPathExtensions.cs @@ -60,3 +60,4 @@ public static IEnumerable Compress(this IEnumerable return resultPaths; } } + diff --git a/src/Framework.Core/Range/Range.cs b/src/Framework.Core/Range/Range.cs index ec362b435..7e6f51aa1 100644 --- a/src/Framework.Core/Range/Range.cs +++ b/src/Framework.Core/Range/Range.cs @@ -11,6 +11,6 @@ private static class InfinityHelper private static readonly T MaxValue = (T)typeof(T).GetField("MaxValue")!.GetValue(null)!; - public static readonly Range RangeValue = new (MinValue, MaxValue); + public static readonly Range RangeValue = new(MinValue, MaxValue); } } diff --git a/src/Framework.Core/ReflectionImpl/BaseFieldInfoImpl.cs b/src/Framework.Core/ReflectionImpl/BaseFieldInfoImpl.cs index 664d1713e..391b1a12d 100644 --- a/src/Framework.Core/ReflectionImpl/BaseFieldInfoImpl.cs +++ b/src/Framework.Core/ReflectionImpl/BaseFieldInfoImpl.cs @@ -27,3 +27,4 @@ public class BaseFieldInfoImpl : FieldInfo public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture) => throw new NotImplementedException(); } + diff --git a/src/Framework.Core/ReflectionImpl/BaseMethodInfoImpl.cs b/src/Framework.Core/ReflectionImpl/BaseMethodInfoImpl.cs index 7fcd0a5a2..ad3c0448b 100644 --- a/src/Framework.Core/ReflectionImpl/BaseMethodInfoImpl.cs +++ b/src/Framework.Core/ReflectionImpl/BaseMethodInfoImpl.cs @@ -31,3 +31,4 @@ public class BaseMethodInfoImpl : MethodInfo public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotImplementedException(); } + diff --git a/src/Framework.Core/ReflectionImpl/BaseModuleImpl.cs b/src/Framework.Core/ReflectionImpl/BaseModuleImpl.cs index 7445294e6..307190912 100644 --- a/src/Framework.Core/ReflectionImpl/BaseModuleImpl.cs +++ b/src/Framework.Core/ReflectionImpl/BaseModuleImpl.cs @@ -3,3 +3,4 @@ namespace Framework.Core.ReflectionImpl; public class BaseModuleImpl : Module; + diff --git a/src/Framework.Core/ReflectionImpl/BasePropertyInfoImpl.cs b/src/Framework.Core/ReflectionImpl/BasePropertyInfoImpl.cs index c87881f0c..26e76c553 100644 --- a/src/Framework.Core/ReflectionImpl/BasePropertyInfoImpl.cs +++ b/src/Framework.Core/ReflectionImpl/BasePropertyInfoImpl.cs @@ -37,3 +37,4 @@ public abstract class BasePropertyInfoImpl : PropertyInfo public override bool CanWrite => throw new NotImplementedException(); } + diff --git a/src/Framework.Core/ReflectionImpl/BaseTypeImpl.cs b/src/Framework.Core/ReflectionImpl/BaseTypeImpl.cs index 2d14d6017..3796e56c6 100644 --- a/src/Framework.Core/ReflectionImpl/BaseTypeImpl.cs +++ b/src/Framework.Core/ReflectionImpl/BaseTypeImpl.cs @@ -113,3 +113,4 @@ protected override ConstructorInfo GetConstructorImpl( } } } + diff --git a/src/Framework.Core/Rendering/XDocumentFileRenderer.cs b/src/Framework.Core/Rendering/XDocumentFileRenderer.cs index 536b2b939..c33877319 100644 --- a/src/Framework.Core/Rendering/XDocumentFileRenderer.cs +++ b/src/Framework.Core/Rendering/XDocumentFileRenderer.cs @@ -32,3 +32,4 @@ public string Render(XDocument document) public static readonly XDocumentFileRenderer Default = new(Encoding.UTF8); } + diff --git a/src/Framework.Core/SequenceComparer.cs b/src/Framework.Core/SequenceComparer.cs index 3d911ce80..0bb2262c9 100644 --- a/src/Framework.Core/SequenceComparer.cs +++ b/src/Framework.Core/SequenceComparer.cs @@ -2,7 +2,7 @@ public class SequenceComparer(IEqualityComparer equalityComparer) : IEqualityComparer> { - public bool Equals (IEnumerable? x, IEnumerable? y) => x.SequenceEqual (y, equalityComparer); + public bool Equals(IEnumerable? x, IEnumerable? y) => x.SequenceEqual(y, equalityComparer); public int GetHashCode(IEnumerable sequence) => 0; diff --git a/src/Framework.Core/Serialization/Base85Convert.cs b/src/Framework.Core/Serialization/Base85Convert.cs index 862bd99e0..87e71e2ec 100644 --- a/src/Framework.Core/Serialization/Base85Convert.cs +++ b/src/Framework.Core/Serialization/Base85Convert.cs @@ -163,3 +163,4 @@ private static void DecodeValue(Stream stream, uint value, int paddingChars) static readonly uint[] SPowersOf85 = [85u * 85u * 85u * 85u, 85u * 85u * 85u, 85u * 85u, 85u, 1]; } + diff --git a/src/Framework.Core/Serialization/ISerializer.cs b/src/Framework.Core/Serialization/ISerializer.cs index 1b5c4e3df..59dfd204b 100644 --- a/src/Framework.Core/Serialization/ISerializer.cs +++ b/src/Framework.Core/Serialization/ISerializer.cs @@ -79,3 +79,4 @@ private static Serializer GetValue() } } } + diff --git a/src/Framework.Core/Serialization/ISerializerFactory.cs b/src/Framework.Core/Serialization/ISerializerFactory.cs index 2b041a00a..f6bbb1ac3 100644 --- a/src/Framework.Core/Serialization/ISerializerFactory.cs +++ b/src/Framework.Core/Serialization/ISerializerFactory.cs @@ -43,3 +43,4 @@ private static void InternalValidate(this ISerializerF serializerFactory.Create().Deserialize(serializedValue); } } + diff --git a/src/Framework.Core/Serialization/ParserExtensions.cs b/src/Framework.Core/Serialization/ParserExtensions.cs index 092ee7497..e5b805a2e 100644 --- a/src/Framework.Core/Serialization/ParserExtensions.cs +++ b/src/Framework.Core/Serialization/ParserExtensions.cs @@ -19,3 +19,4 @@ public static IParser WithLock(this IParser(FuncHelper.Create((TValue value) => parser.Parse(value)).WithLock()); } } + diff --git a/src/Framework.Core/Serialization/SerializerExtensions.cs b/src/Framework.Core/Serialization/SerializerExtensions.cs index 85ffc663b..5fd59dafd 100644 --- a/src/Framework.Core/Serialization/SerializerExtensions.cs +++ b/src/Framework.Core/Serialization/SerializerExtensions.cs @@ -41,3 +41,4 @@ public static ISerializer Select(this ISerializer return new Serializer(v => serializer.Parse(nextSerializer.Parse(v)), v => nextSerializer.Format(serializer.Format(v))); } } + diff --git a/src/Framework.Core/StringParse/StringParseResult.cs b/src/Framework.Core/StringParse/StringParseResult.cs index 2221c6f3f..833f70d7b 100644 --- a/src/Framework.Core/StringParse/StringParseResult.cs +++ b/src/Framework.Core/StringParse/StringParseResult.cs @@ -11,3 +11,4 @@ public class StringParseResult public string GetResultFor(MatchResultDescription mathResultDescription) => this.math.Groups[mathResultDescription.ResultIndex].Value; } + diff --git a/src/Framework.Core/StringParse/StringParser.cs b/src/Framework.Core/StringParse/StringParser.cs index ff5c35218..1e9f16fbb 100644 --- a/src/Framework.Core/StringParse/StringParser.cs +++ b/src/Framework.Core/StringParse/StringParser.cs @@ -37,3 +37,4 @@ private void Validate(StringPattern pattern) public StringParseResult Evaluate(string inputString) => new(new Regex(this.regexPatternBuilder.ToString()).Match(inputString)); } + diff --git a/src/Framework.Core/StringParse/StringPattern.cs b/src/Framework.Core/StringParse/StringPattern.cs index 9de6e9189..5fb3d89a2 100644 --- a/src/Framework.Core/StringParse/StringPattern.cs +++ b/src/Framework.Core/StringParse/StringPattern.cs @@ -51,3 +51,4 @@ private void SetValue(string value, Func getValue, Action setVal setValue(value); } } + diff --git a/src/Framework.Core/TryResult/Extensions/TryResultExtensions.cs b/src/Framework.Core/TryResult/Extensions/TryResultExtensions.cs index 14bcc47d3..21c6aa9d5 100644 --- a/src/Framework.Core/TryResult/Extensions/TryResultExtensions.cs +++ b/src/Framework.Core/TryResult/Extensions/TryResultExtensions.cs @@ -206,3 +206,4 @@ public static void TryFault(this IEnumerable> source, Func(Func resolveFunc, Func Types => getSourceTypesFunc(); } } + diff --git a/src/Framework.Core/TypeResolving/TypeSearchMode.cs b/src/Framework.Core/TypeResolving/TypeSearchMode.cs index bd789e68f..c6722e7d5 100644 --- a/src/Framework.Core/TypeResolving/TypeSearchMode.cs +++ b/src/Framework.Core/TypeResolving/TypeSearchMode.cs @@ -3,7 +3,7 @@ [Flags] public enum TypeSearchMode { - Name = 1, + Name = 1, FullName = 2, diff --git a/src/Framework.Core/TypeResolving/TypeSource/ITypeSource.cs b/src/Framework.Core/TypeResolving/TypeSource/ITypeSource.cs index c00a691f7..00640cd8d 100644 --- a/src/Framework.Core/TypeResolving/TypeSource/ITypeSource.cs +++ b/src/Framework.Core/TypeResolving/TypeSource/ITypeSource.cs @@ -14,3 +14,4 @@ public interface ITypeSource /// ImmutableHashSet Types { get; } } + diff --git a/src/Framework.Core/TypeResolving/TypeSource/TypeSource.cs b/src/Framework.Core/TypeResolving/TypeSource/TypeSource.cs index efd377b55..2a99ea5e1 100644 --- a/src/Framework.Core/TypeResolving/TypeSource/TypeSource.cs +++ b/src/Framework.Core/TypeResolving/TypeSource/TypeSource.cs @@ -22,3 +22,4 @@ public TypeSource(IEnumerable domains) public static TypeSource FromSample() => FromSample(typeof(T)); } + diff --git a/src/Framework.Core/Visitors/EmptyExpressionVisitor.cs b/src/Framework.Core/Visitors/EmptyExpressionVisitor.cs index c832028ee..1c476ead9 100644 --- a/src/Framework.Core/Visitors/EmptyExpressionVisitor.cs +++ b/src/Framework.Core/Visitors/EmptyExpressionVisitor.cs @@ -10,3 +10,4 @@ private EmptyExpressionVisitor() public static readonly EmptyExpressionVisitor Value = new(); } + diff --git a/src/Framework.Core/Visitors/FixPropertySourceVisitor.cs b/src/Framework.Core/Visitors/FixPropertySourceVisitor.cs index a5ac712e0..80dfa12a8 100644 --- a/src/Framework.Core/Visitors/FixPropertySourceVisitor.cs +++ b/src/Framework.Core/Visitors/FixPropertySourceVisitor.cs @@ -44,3 +44,4 @@ protected override Expression VisitMethodCall(MethodCallExpression node) return methodRequest.GetValueOrDefault(() => base.VisitMethodCall(node)); } } + diff --git a/src/Framework.Core/Visitors/OverrideCallInterfacePropertiesVisitor.cs b/src/Framework.Core/Visitors/OverrideCallInterfacePropertiesVisitor.cs index b9f066d35..41b7ff254 100644 --- a/src/Framework.Core/Visitors/OverrideCallInterfacePropertiesVisitor.cs +++ b/src/Framework.Core/Visitors/OverrideCallInterfacePropertiesVisitor.cs @@ -19,3 +19,4 @@ public OverrideCallInterfacePropertiesVisitor(Type interfaceType) public override Expression? Visit(Expression? node) => this.internalVisitor.Visit(node); } + diff --git a/src/Framework.Core/Visitors/OverrideCallInterfacePropertyVisitor.cs b/src/Framework.Core/Visitors/OverrideCallInterfacePropertyVisitor.cs index 3fb7222c2..077256f5a 100644 --- a/src/Framework.Core/Visitors/OverrideCallInterfacePropertyVisitor.cs +++ b/src/Framework.Core/Visitors/OverrideCallInterfacePropertyVisitor.cs @@ -42,3 +42,4 @@ protected override Expression VisitMember(MemberExpression node) return base.VisitMember(node); } } + diff --git a/src/Framework.Core/Visitors/OverrideMethodInfoVisitor.cs b/src/Framework.Core/Visitors/OverrideMethodInfoVisitor.cs index 7eb9cea5a..29537d1c4 100644 --- a/src/Framework.Core/Visitors/OverrideMethodInfoVisitor.cs +++ b/src/Framework.Core/Visitors/OverrideMethodInfoVisitor.cs @@ -41,4 +41,5 @@ private Expression GetExpressionByArgs(IEnumerable arguments) public class OverrideMethodInfoVisitor(TDelegate func, Expression expression) : OverrideMethodInfoVisitor(((Delegate)(object)func).Method, expression); - //where TDelegate : Delegate +//where TDelegate : Delegate + diff --git a/src/Framework.Core/XDocumentExtensions.cs b/src/Framework.Core/XDocumentExtensions.cs index be53eb8a2..2cf73d6e9 100644 --- a/src/Framework.Core/XDocumentExtensions.cs +++ b/src/Framework.Core/XDocumentExtensions.cs @@ -43,3 +43,4 @@ public static XDocument ToXDocument(this XmlDocument xmlDocument) return XDocument.Load(nodeReader); } } + diff --git a/src/Framework.Core/XElementExtensions.cs b/src/Framework.Core/XElementExtensions.cs index 9972b5185..8d09bdb58 100644 --- a/src/Framework.Core/XElementExtensions.cs +++ b/src/Framework.Core/XElementExtensions.cs @@ -60,3 +60,4 @@ public static XElement CreateElementWithRootNamespace(this XElement source, stri return newElement; } } + diff --git a/src/Framework.DependencyInjection/ServiceCollectionExtensions.cs b/src/Framework.DependencyInjection/ServiceCollectionExtensions.cs index 38c7a211e..a46971a16 100644 --- a/src/Framework.DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Framework.DependencyInjection/ServiceCollectionExtensions.cs @@ -51,3 +51,4 @@ public static IServiceCollection AddKeyedNotImplemented(this IServiceC return services; } } + diff --git a/src/Framework.ExpressionParsers.Tests/ExpressionParserTests.cs b/src/Framework.ExpressionParsers.Tests/ExpressionParserTests.cs index 2367fd2b4..ecab40474 100644 --- a/src/Framework.ExpressionParsers.Tests/ExpressionParserTests.cs +++ b/src/Framework.ExpressionParsers.Tests/ExpressionParserTests.cs @@ -20,3 +20,4 @@ public void Validate_InvalidExpressionAndErrorsUnWrapped_CorrectException() Assert.Contains("The name 'blah' does not exist in the current context", innerException.Message); } } + diff --git a/src/Framework.ExpressionParsers/CSharp/CSharpNativeExpressionParser.cs b/src/Framework.ExpressionParsers/CSharp/CSharpNativeExpressionParser.cs index 6fc171378..b38ab7155 100644 --- a/src/Framework.ExpressionParsers/CSharp/CSharpNativeExpressionParser.cs +++ b/src/Framework.ExpressionParsers/CSharp/CSharpNativeExpressionParser.cs @@ -32,18 +32,18 @@ private IEnumerable GetInputFuncParameters(IEnumerable new {ParameterType = parameterType, Index = index}) + .Select((parameterType, index) => new { ParameterType = parameterType, Index = index }) .ToList(); var expressionParameterNames = parameterNames - .Select((name, index) => new {Name = name, Index = index}) + .Select((name, index) => new { Name = name, Index = index }) .ToList(); if (!expressionParameterNames.Any()) { expressionParameterNames = - genericParameterSequencies.Select((_, index) => new {Name = string.Empty, Index = index}).ToList(); + genericParameterSequencies.Select((_, index) => new { Name = string.Empty, Index = index }).ToList(); } @@ -123,3 +123,4 @@ private IEnumerable GetParametersNames(string expression) /// public static readonly CSharpNativeExpressionParser Compile = new(new RoslynCSharpExpressionParser()); } + diff --git a/src/Framework.ExpressionParsers/CSharp/CompileReferenceExtensions.cs b/src/Framework.ExpressionParsers/CSharp/CompileReferenceExtensions.cs index d48f2043d..1749341d1 100644 --- a/src/Framework.ExpressionParsers/CSharp/CompileReferenceExtensions.cs +++ b/src/Framework.ExpressionParsers/CSharp/CompileReferenceExtensions.cs @@ -107,3 +107,4 @@ private static void FillCompileReferencedAssemblies(this HashSet graph //// } ////} } + diff --git a/src/Framework.ExpressionParsers/CSharp/MicrosoftCSharpExpressionParser.cs b/src/Framework.ExpressionParsers/CSharp/MicrosoftCSharpExpressionParser.cs index 3fddf28ba..27dab7ce4 100644 --- a/src/Framework.ExpressionParsers/CSharp/MicrosoftCSharpExpressionParser.cs +++ b/src/Framework.ExpressionParsers/CSharp/MicrosoftCSharpExpressionParser.cs @@ -13,3 +13,4 @@ public Expression Parse(ParameterExpression[] parameters, Type resultType, strin return Expression.Lambda(resultExpression, parameters); } } + diff --git a/src/Framework.ExpressionParsers/CSharp/MicrosoftCSharpExpressionParserImplement.cs b/src/Framework.ExpressionParsers/CSharp/MicrosoftCSharpExpressionParserImplement.cs index b986634cb..c2c163db7 100644 --- a/src/Framework.ExpressionParsers/CSharp/MicrosoftCSharpExpressionParserImplement.cs +++ b/src/Framework.ExpressionParsers/CSharp/MicrosoftCSharpExpressionParserImplement.cs @@ -2181,3 +2181,4 @@ static Dictionary CreateKeywords() } } + diff --git a/src/Framework.ExpressionParsers/CSharp/RoslynCSharpExpressionParser.cs b/src/Framework.ExpressionParsers/CSharp/RoslynCSharpExpressionParser.cs index a42c389af..eb57fbf49 100644 --- a/src/Framework.ExpressionParsers/CSharp/RoslynCSharpExpressionParser.cs +++ b/src/Framework.ExpressionParsers/CSharp/RoslynCSharpExpressionParser.cs @@ -86,3 +86,4 @@ public Expression Parse(ParameterExpression[] parameters, Type returnType, strin } } } + diff --git a/src/Framework.ExpressionParsers/CSharp/ScriptEngineService.cs b/src/Framework.ExpressionParsers/CSharp/ScriptEngineService.cs index 53caf1f8d..710ccf356 100644 --- a/src/Framework.ExpressionParsers/CSharp/ScriptEngineService.cs +++ b/src/Framework.ExpressionParsers/CSharp/ScriptEngineService.cs @@ -202,3 +202,4 @@ private IEnumerable GetParametersNames(string expression) } } } + diff --git a/src/Framework.ExpressionParsers/ExpressionParser.cs b/src/Framework.ExpressionParsers/ExpressionParser.cs index 0f3373ae5..8401d27c3 100644 --- a/src/Framework.ExpressionParsers/ExpressionParser.cs +++ b/src/Framework.ExpressionParsers/ExpressionParser.cs @@ -64,3 +64,4 @@ public TDelegate GetDelegate(string value) => public virtual void Validate(string source) => this.GetExpression(source); } + diff --git a/src/Framework.ExpressionParsers/IExpressionParser.cs b/src/Framework.ExpressionParsers/IExpressionParser.cs index f3fb568c5..c3f62a99b 100644 --- a/src/Framework.ExpressionParsers/IExpressionParser.cs +++ b/src/Framework.ExpressionParsers/IExpressionParser.cs @@ -21,3 +21,4 @@ public interface IExpressionParser : public interface IExpressionParser : IExpressionParser> where TDelegate : Delegate; + diff --git a/src/Framework.ExpressionParsers/Native/Exceptions/MissingParsingMethodException.cs b/src/Framework.ExpressionParsers/Native/Exceptions/MissingParsingMethodException.cs index cb715adce..33d3c87d5 100644 --- a/src/Framework.ExpressionParsers/Native/Exceptions/MissingParsingMethodException.cs +++ b/src/Framework.ExpressionParsers/Native/Exceptions/MissingParsingMethodException.cs @@ -13,3 +13,4 @@ public class MissingParsingMethodException(string message, int position, Type ob public readonly ReadOnlyCollection TryArgs = tryArgs.ToReadOnlyCollection(); } + diff --git a/src/Framework.ExpressionParsers/Native/Exceptions/ParseException.cs b/src/Framework.ExpressionParsers/Native/Exceptions/ParseException.cs index 9647aaf15..b6e17bc39 100644 --- a/src/Framework.ExpressionParsers/Native/Exceptions/ParseException.cs +++ b/src/Framework.ExpressionParsers/Native/Exceptions/ParseException.cs @@ -8,3 +8,4 @@ public class ParseException(string message, int position) : Exception(message) public override string ToString() => string.Format(ExpressionParsersResources.ParseExceptionFormat, this.Message, position); } + diff --git a/src/Framework.ExpressionParsers/Native/INativeBodyExpressionParser.cs b/src/Framework.ExpressionParsers/Native/INativeBodyExpressionParser.cs index 2d52781ee..cfbba0870 100644 --- a/src/Framework.ExpressionParsers/Native/INativeBodyExpressionParser.cs +++ b/src/Framework.ExpressionParsers/Native/INativeBodyExpressionParser.cs @@ -6,3 +6,4 @@ public interface INativeBodyExpressionParser { Expression Parse(ParameterExpression[] parameters, Type resultType, string expression); } + diff --git a/src/Framework.ExpressionParsers/Native/INativeExpressionParser.cs b/src/Framework.ExpressionParsers/Native/INativeExpressionParser.cs index b4cba61aa..a13edffef 100644 --- a/src/Framework.ExpressionParsers/Native/INativeExpressionParser.cs +++ b/src/Framework.ExpressionParsers/Native/INativeExpressionParser.cs @@ -5,3 +5,4 @@ namespace Framework.ExpressionParsers.Native; public interface INativeExpressionParser : IParser; + diff --git a/src/Framework.ExpressionParsers/Native/MethodTypeInfo.cs b/src/Framework.ExpressionParsers/Native/MethodTypeInfo.cs index cbf84a2e7..cf86e31bd 100644 --- a/src/Framework.ExpressionParsers/Native/MethodTypeInfo.cs +++ b/src/Framework.ExpressionParsers/Native/MethodTypeInfo.cs @@ -1,4 +1,5 @@ using System.Reflection; + using Framework.Core; namespace Framework.ExpressionParsers.Native; @@ -34,3 +35,4 @@ public MethodTypeInfo(IEnumerable inputTypes, Type returnType) public bool Equals(MethodTypeInfo? other) => other != null && this.InputTypes.SequenceEqual(other.InputTypes) && this.ReturnType == other.ReturnType; } + diff --git a/src/Framework.ExpressionParsers/Native/MissingParsingMethodExceptionExtensions.cs b/src/Framework.ExpressionParsers/Native/MissingParsingMethodExceptionExtensions.cs index 4cac5d9ee..6df23549d 100644 --- a/src/Framework.ExpressionParsers/Native/MissingParsingMethodExceptionExtensions.cs +++ b/src/Framework.ExpressionParsers/Native/MissingParsingMethodExceptionExtensions.cs @@ -29,7 +29,7 @@ public static class MissingParsingMethodExceptionExtensions where parameters.Length == ex.TryArgs.Count - let argIndex = ex.TryArgs.IndexOf(typeof (TArg)) + let argIndex = ex.TryArgs.IndexOf(typeof(TArg)) where argIndex != -1 @@ -39,3 +39,4 @@ public static class MissingParsingMethodExceptionExtensions } } } + diff --git a/src/Framework.ExpressionParsers/Native/NativeExpressionParserExtensions.cs b/src/Framework.ExpressionParsers/Native/NativeExpressionParserExtensions.cs index e1a8bb88c..d89252ebf 100644 --- a/src/Framework.ExpressionParsers/Native/NativeExpressionParserExtensions.cs +++ b/src/Framework.ExpressionParsers/Native/NativeExpressionParserExtensions.cs @@ -1,6 +1,7 @@ using System.Linq.Expressions; using Anch.Core; + using Framework.Core; namespace Framework.ExpressionParsers.Native; @@ -41,3 +42,4 @@ public LambdaExpression Parse(NativeExpressionParsingData input) } } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Abstractions/DependencyInjection/BssFrameworkExtension.cs b/src/Infrastructure/Framework.Infrastructure.Abstractions/DependencyInjection/BssFrameworkExtension.cs index f4c9f62c6..0f947ff8f 100644 --- a/src/Infrastructure/Framework.Infrastructure.Abstractions/DependencyInjection/BssFrameworkExtension.cs +++ b/src/Infrastructure/Framework.Infrastructure.Abstractions/DependencyInjection/BssFrameworkExtension.cs @@ -6,3 +6,4 @@ public class BssFrameworkExtension(Action setupAction) : IBs { public void AddServices(IServiceCollection services) => setupAction(services); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Abstractions/DependencyInjection/IBssFrameworkExtension.cs b/src/Infrastructure/Framework.Infrastructure.Abstractions/DependencyInjection/IBssFrameworkExtension.cs index 04f10c2f6..40b2e6cfc 100644 --- a/src/Infrastructure/Framework.Infrastructure.Abstractions/DependencyInjection/IBssFrameworkExtension.cs +++ b/src/Infrastructure/Framework.Infrastructure.Abstractions/DependencyInjection/IBssFrameworkExtension.cs @@ -6,3 +6,4 @@ public interface IBssFrameworkExtension { public void AddServices(IServiceCollection services); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Abstractions/DependencyInjection/IBssFrameworkSetup.cs b/src/Infrastructure/Framework.Infrastructure.Abstractions/DependencyInjection/IBssFrameworkSetup.cs index 7c5086ebc..acbeb7981 100644 --- a/src/Infrastructure/Framework.Infrastructure.Abstractions/DependencyInjection/IBssFrameworkSetup.cs +++ b/src/Infrastructure/Framework.Infrastructure.Abstractions/DependencyInjection/IBssFrameworkSetup.cs @@ -13,3 +13,4 @@ TSelf AddExtensions() TSelf AddServices(Action setupAction) => this.AddExtensions(new BssFrameworkExtension(setupAction)); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Hangfire/AdminHangfireAuthorization.cs b/src/Infrastructure/Framework.Infrastructure.Hangfire/AdminHangfireAuthorization.cs index d50a1df39..c0ab42cb8 100644 --- a/src/Infrastructure/Framework.Infrastructure.Hangfire/AdminHangfireAuthorization.cs +++ b/src/Infrastructure/Framework.Infrastructure.Hangfire/AdminHangfireAuthorization.cs @@ -1,8 +1,8 @@ -using Hangfire.Dashboard; +using Anch.SecuritySystem; -using Microsoft.Extensions.DependencyInjection; +using Hangfire.Dashboard; -using Anch.SecuritySystem; +using Microsoft.Extensions.DependencyInjection; namespace Framework.Infrastructure.Hangfire; @@ -20,3 +20,4 @@ public bool Authorize(DashboardContext context) .GetResult(); } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Hangfire/BssJobFilterAttributeFilterProvider.cs b/src/Infrastructure/Framework.Infrastructure.Hangfire/BssJobFilterAttributeFilterProvider.cs index c09d6860b..f2f40c13c 100644 --- a/src/Infrastructure/Framework.Infrastructure.Hangfire/BssJobFilterAttributeFilterProvider.cs +++ b/src/Infrastructure/Framework.Infrastructure.Hangfire/BssJobFilterAttributeFilterProvider.cs @@ -18,3 +18,4 @@ internal class BssJobFilterAttributeFilterProvider : JobFilterAttributeFilterPro protected override IEnumerable GetTypeAttributes(Job job) => this.cache[job.Type]; } + diff --git a/src/Infrastructure/Framework.Infrastructure.Hangfire/DependencyInjection/BssHangfireSettings.cs b/src/Infrastructure/Framework.Infrastructure.Hangfire/DependencyInjection/BssHangfireSettings.cs index 3fde4913b..35c816c16 100644 --- a/src/Infrastructure/Framework.Infrastructure.Hangfire/DependencyInjection/BssHangfireSettings.cs +++ b/src/Infrastructure/Framework.Infrastructure.Hangfire/DependencyInjection/BssHangfireSettings.cs @@ -30,14 +30,14 @@ public class BssHangfireSettings : IBssHangfireSettings private IJobNameExtractPolicy jobNameExtractPolicy = new JobNameExtractPolicy(); private readonly SqlServerStorageOptions sqlServerStorageOptions = new() - { - CommandBatchMaxTimeout = TimeSpan.FromMinutes(5), - SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5), - QueuePollInterval = TimeSpan.Zero, - UseRecommendedIsolationLevel = true, - UsePageLocksOnDequeue = true, - DisableGlobalLocks = true, - }; + { + CommandBatchMaxTimeout = TimeSpan.FromMinutes(5), + SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5), + QueuePollInterval = TimeSpan.Zero, + UseRecommendedIsolationLevel = true, + UsePageLocksOnDequeue = true, + DisableGlobalLocks = true, + }; private Action globalConfigurationAction = _ => { }; @@ -122,11 +122,11 @@ public IBssHangfireSettings AddJob(Func executeAct var job = Job.FromExpression(ExpressionHelper.Create((MiddlewareJob job) => job.ExecuteAsync(default!))); var actualSettings = new JobSettings - { - Name = jobName, - CronTiming = cronTiming, - DisplayName = jobSettings?.DisplayName ?? this.jobNameExtractPolicy.GetDisplayName(typeof(TJob)) - }; + { + Name = jobName, + CronTiming = cronTiming, + DisplayName = jobSettings?.DisplayName ?? this.jobNameExtractPolicy.GetDisplayName(typeof(TJob)) + }; this.registerJobs.Add(job, actualSettings); @@ -179,3 +179,4 @@ public void RunJobs(IServiceProvider serviceProvider) } } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Hangfire/DependencyInjection/IBssHangfireSettings.cs b/src/Infrastructure/Framework.Infrastructure.Hangfire/DependencyInjection/IBssHangfireSettings.cs index de515b88f..5733470e1 100644 --- a/src/Infrastructure/Framework.Infrastructure.Hangfire/DependencyInjection/IBssHangfireSettings.cs +++ b/src/Infrastructure/Framework.Infrastructure.Hangfire/DependencyInjection/IBssHangfireSettings.cs @@ -35,3 +35,4 @@ IBssHangfireSettings AddJob(Func executeAct IBssHangfireSettings AddJob(Func executeAction, JobSettings? jobSettings = null) where TJob : class; } + diff --git a/src/Infrastructure/Framework.Infrastructure.Hangfire/HangfireExtensions.cs b/src/Infrastructure/Framework.Infrastructure.Hangfire/HangfireExtensions.cs index d05117259..23f8716c4 100644 --- a/src/Infrastructure/Framework.Infrastructure.Hangfire/HangfireExtensions.cs +++ b/src/Infrastructure/Framework.Infrastructure.Hangfire/HangfireExtensions.cs @@ -1,4 +1,6 @@ -using Framework.Infrastructure.Hangfire.DependencyInjection; +using Anch.SecuritySystem; + +using Framework.Infrastructure.Hangfire.DependencyInjection; using Hangfire; @@ -6,8 +8,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem; - namespace Framework.Infrastructure.Hangfire; public static class HangfireExtensions @@ -42,14 +42,14 @@ public static IApplicationBuilder UseHangfireBss( if (settings.Enabled) { var options = new DashboardOptions - { - DashboardTitle = "Regular jobs", - Authorization = + { + DashboardTitle = "Regular jobs", + Authorization = [ new AdminHangfireAuthorization(SecurityRole.Administrator) ], - DisplayNameFunc = (_, job) => settings.GetDisplayName(job) - }; + DisplayNameFunc = (_, job) => settings.GetDisplayName(job) + }; setupOptions?.Invoke(options); @@ -63,3 +63,4 @@ public static IApplicationBuilder UseHangfireBss( return app; } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Hangfire/JobNameExtractPolicy.cs b/src/Infrastructure/Framework.Infrastructure.Hangfire/JobNameExtractPolicy.cs index af8446533..2ac84b355 100644 --- a/src/Infrastructure/Framework.Infrastructure.Hangfire/JobNameExtractPolicy.cs +++ b/src/Infrastructure/Framework.Infrastructure.Hangfire/JobNameExtractPolicy.cs @@ -10,3 +10,4 @@ public class JobNameExtractPolicy : IJobNameExtractPolicy public string GetDisplayName(Type jobType) => jobType.Name; } + diff --git a/src/Infrastructure/Framework.Infrastructure.Hangfire/MiddlewareJob.cs b/src/Infrastructure/Framework.Infrastructure.Hangfire/MiddlewareJob.cs index ea4bb3af8..dab820004 100644 --- a/src/Infrastructure/Framework.Infrastructure.Hangfire/MiddlewareJob.cs +++ b/src/Infrastructure/Framework.Infrastructure.Hangfire/MiddlewareJob.cs @@ -8,3 +8,4 @@ public class MiddlewareJob(TJob innerJob, JobInfo jobInf public Task ExecuteAsync(TArg arg) => jobMiddlewareFactory.Create(true).EvaluateAsync(async () => await jobInfo.ExecuteActon(innerJob, arg)); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DALListeners/FixDomainObjectEventRevisionNumberDALListener.cs b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DALListeners/FixDomainObjectEventRevisionNumberDALListener.cs index 55ae18d66..5bce187b9 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DALListeners/FixDomainObjectEventRevisionNumberDALListener.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DALListeners/FixDomainObjectEventRevisionNumberDALListener.cs @@ -40,3 +40,4 @@ public async Task Process(DALChangesEventArgs eventArgs, CancellationToken cance } } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DALListeners/SubscriptionDALListener.cs b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DALListeners/SubscriptionDALListener.cs index 55ec06e59..1e3c440e3 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DALListeners/SubscriptionDALListener.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DALListeners/SubscriptionDALListener.cs @@ -23,3 +23,4 @@ public async Task Process(DALChangesEventArgs eventArgs, CancellationToken cance } } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/BssFrameworkSettingsExtensions.cs b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/BssFrameworkSettingsExtensions.cs index f989a9031..7b366a7fa 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/BssFrameworkSettingsExtensions.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/BssFrameworkSettingsExtensions.cs @@ -20,3 +20,4 @@ public IBssFrameworkSetup AddConfigurationTargetSystems(Action services.Initialize(setupAction)); } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/ITargetSystemSetup.cs b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/ITargetSystemSetup.cs index e1631b3b8..f3cfe577a 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/ITargetSystemSetup.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/ITargetSystemSetup.cs @@ -12,3 +12,4 @@ public interface ITargetSystemSetup ITargetSystemSetup AddTargetSystem(PersistentTargetSystemInfo targetSystemInfo); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/PersistentTargetSystemInfoHelper.cs b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/PersistentTargetSystemInfoHelper.cs index 9064b9083..d9565b146 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/PersistentTargetSystemInfoHelper.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/PersistentTargetSystemInfoHelper.cs @@ -39,3 +39,4 @@ public static class PersistentTargetSystemInfoHelper ]) }; } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/ServiceCollectionExtensions.cs b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/ServiceCollectionExtensions.cs index f2139a4a7..aa5abe74e 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/ServiceCollectionExtensions.cs @@ -1,4 +1,7 @@ -using Framework.Application.ApplicationVariable; +using Anch.SecuritySystem; +using Anch.SecuritySystem.DependencyInjection; + +using Framework.Application.ApplicationVariable; using Framework.Application.Events; using Framework.Application.Lock; using Framework.Authorization.BLL; @@ -20,9 +23,6 @@ using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem; -using Anch.SecuritySystem.DependencyInjection; - namespace Framework.Infrastructure.DependencyInjection; public static class ServiceCollectionExtensions @@ -90,3 +90,4 @@ public static ISecuritySystemSetup AddConfigurationSecurity(this ISecuritySystem .AddDomainSecurity(b => b.SetView(SecurityRole.Administrator).SetEdit(SecurityRole.Administrator)) .AddDomainSecurity(b => b.SetView(SecurityRule.Disabled)); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/TargetSystemSetup.cs b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/TargetSystemSetup.cs index f8be03108..bab17345b 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/TargetSystemSetup.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/DependencyInjection/TargetSystemSetup.cs @@ -51,3 +51,4 @@ public void Initialize(IServiceCollection services) this.registerActions.Foreach(action => action(services)); } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/LocalDBEvents/EventDTOMessageSenderBase.cs b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/LocalDBEvents/EventDTOMessageSenderBase.cs index 03c1f73c7..5485a8fe8 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/LocalDBEvents/EventDTOMessageSenderBase.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/LocalDBEvents/EventDTOMessageSenderBase.cs @@ -44,3 +44,4 @@ await func.Invoke( [domainObjectEventArgs.DomainObject, domainObjectEventArgs.Operation, domainObjectEventArgs.CustomSendObject, cancellationToken]); } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/LocalDBEvents/LocalDBEventMessageSender.cs b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/LocalDBEvents/LocalDBEventMessageSender.cs index 922a1559b..1546af5a1 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/LocalDBEvents/LocalDBEventMessageSender.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/LocalDBEvents/LocalDBEventMessageSender.cs @@ -47,3 +47,4 @@ public override async Task SendAsync(IDomainOperationSerializeDat configurationContext.Logics.Default.Create().Save(dbEvent); } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/SubscriptionService/IObjectModificationProcessor.cs b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/SubscriptionService/IObjectModificationProcessor.cs index f53f5f841..60403a0ce 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/SubscriptionService/IObjectModificationProcessor.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/SubscriptionService/IObjectModificationProcessor.cs @@ -6,3 +6,4 @@ public interface IObjectModificationProcessor { Task ProcessChanged(ObjectModificationInfoDTO changedObjectInfo, CancellationToken cancellationToken); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/SubscriptionService/LocalDbObjectModificationProcessor.cs b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/SubscriptionService/LocalDbObjectModificationProcessor.cs index 123a0dfef..7f1c5ea8f 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy.Default/SubscriptionService/LocalDbObjectModificationProcessor.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy.Default/SubscriptionService/LocalDbObjectModificationProcessor.cs @@ -22,13 +22,14 @@ public LocalDbObjectModificationProcessor(IConfigurationBLLContext context) public async Task ProcessChanged(ObjectModificationInfoDTO changedObjectInfo, CancellationToken cancellationToken) { var domainObjectModification = new DomainObjectModification - { - DomainType = this.Context.GetDomainType(changedObjectInfo.TypeInfoDescription.ToDomainObject()), - DomainObjectId = changedObjectInfo.Identity, - Revision = changedObjectInfo.Revision, - Type = changedObjectInfo.ModificationType - }; + { + DomainType = this.Context.GetDomainType(changedObjectInfo.TypeInfoDescription.ToDomainObject()), + DomainObjectId = changedObjectInfo.Identity, + Revision = changedObjectInfo.Revision, + Type = changedObjectInfo.ModificationType + }; this.Context.Logics.Default.Create().Save(domainObjectModification); } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBaseEvaluator/ApiControllerBaseSingleCallEvaluator.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBaseEvaluator/ApiControllerBaseSingleCallEvaluator.cs index 286a6a0b4..beb57d135 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBaseEvaluator/ApiControllerBaseSingleCallEvaluator.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBaseEvaluator/ApiControllerBaseSingleCallEvaluator.cs @@ -28,3 +28,4 @@ public TResult Evaluate(DBSessionMode sessionMode, Func>()); } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBaseEvaluator/ApiControllerNewScopeEvaluator.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBaseEvaluator/ApiControllerNewScopeEvaluator.cs index 3bb7a8f6c..1296f44b5 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBaseEvaluator/ApiControllerNewScopeEvaluator.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBaseEvaluator/ApiControllerNewScopeEvaluator.cs @@ -9,3 +9,4 @@ public class ApiControllerNewScopeEvaluator(IConte { public TResult Evaluate(DBSessionMode sessionMode, Func, TResult> getResult) => contextEvaluator.Evaluate(sessionMode, getResult); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBaseEvaluator/IApiControllerBaseEvaluator.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBaseEvaluator/IApiControllerBaseEvaluator.cs index 01215f841..45fe3d6ca 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBaseEvaluator/IApiControllerBaseEvaluator.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBaseEvaluator/IApiControllerBaseEvaluator.cs @@ -7,3 +7,4 @@ public interface IApiControllerBaseEvaluator { TResult Evaluate(DBSessionMode sessionMode, Func, TResult> getResult); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBase`1.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBase`1.cs index c4e2dfa0f..b8636330b 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBase`1.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBase`1.cs @@ -23,3 +23,4 @@ public abstract class ApiControllerBase : ControllerBase [NonAction] public abstract TResult EvaluateC(DBSessionMode sessionMode, Func getResult); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBase`2.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBase`2.cs index aff6a956c..e9c92c539 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBase`2.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/ApiControllerBase`2.cs @@ -58,3 +58,4 @@ public TResult Evaluate(DBSessionMode sessionMode, Func(Func, TResult> getResult) => this.Evaluate(DBSessionMode.Write, getResult); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/ContextEvaluator/ContextEvaluator.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/ContextEvaluator/ContextEvaluator.cs index e967b2bdf..f3ea21589 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/ContextEvaluator/ContextEvaluator.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/ContextEvaluator/ContextEvaluator.cs @@ -1,12 +1,12 @@ -using Framework.Application; +using Anch.SecuritySystem; + +using Framework.Application; using Framework.Core; using Framework.Database; using Framework.Infrastructure.Services; using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem; - namespace Framework.Infrastructure.ContextEvaluator; public class ContextEvaluator(IServiceEvaluator baseContextEvaluator) @@ -25,3 +25,4 @@ await baseContextEvaluator.EvaluateAsync( context, context.ServiceProvider.GetRequiredService()))); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/ContextEvaluator/ContextEvaluatorExtensions.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/ContextEvaluator/ContextEvaluatorExtensions.cs index 2e5ea6e97..6e26b042f 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/ContextEvaluator/ContextEvaluatorExtensions.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/ContextEvaluator/ContextEvaluatorExtensions.cs @@ -1,10 +1,9 @@ using Anch.Core; +using Anch.SecuritySystem; using Framework.Database; using Framework.Infrastructure.Services; -using Anch.SecuritySystem; - namespace Framework.Infrastructure.ContextEvaluator; public static class ContextEvaluatorExtensions @@ -32,3 +31,4 @@ public TResult Evaluate(DBSessionMode sessionMode, UserCredential? cust contextEvaluator.EvaluateAsync(sessionMode, customUserCredential, async c => getResult(c)).GetAwaiter().GetResult(); } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/ContextEvaluator/IContextEvaluator.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/ContextEvaluator/IContextEvaluator.cs index afea0ee96..ffd85c8ec 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/ContextEvaluator/IContextEvaluator.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/ContextEvaluator/IContextEvaluator.cs @@ -1,7 +1,7 @@ -using Framework.Database; -using Framework.Infrastructure.Services; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using Framework.Database; +using Framework.Infrastructure.Services; namespace Framework.Infrastructure.ContextEvaluator; @@ -9,3 +9,4 @@ public interface IContextEvaluator { Task EvaluateAsync(DBSessionMode sessionMode, UserCredential? customUserCredential, Func, Task> getResult); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/BssFrameworkSettingsExtensions.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/BssFrameworkSettingsExtensions.cs index f2d62a668..f7d55098c 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/BssFrameworkSettingsExtensions.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/BssFrameworkSettingsExtensions.cs @@ -30,3 +30,4 @@ public IBssFrameworkSetup SetDTOMapping>()); } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/ISubscriptionManagerSetupObject.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/ISubscriptionManagerSetupObject.cs index 7116dd95d..e21e7ac6d 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/ISubscriptionManagerSetupObject.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/ISubscriptionManagerSetupObject.cs @@ -7,3 +7,4 @@ public interface ISubscriptionManagerSetupObject ISubscriptionManagerSetupObject Add() where TSubscriptionManager : class, IEventOperationReceiver; } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/ProjectionDomainSecurityBssFrameworkExtension.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/ProjectionDomainSecurityBssFrameworkExtension.cs index ce6a0abdd..e11a7b7f3 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/ProjectionDomainSecurityBssFrameworkExtension.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/ProjectionDomainSecurityBssFrameworkExtension.cs @@ -1,12 +1,13 @@ using System.Reflection; -using Microsoft.Extensions.DependencyInjection; - using Anch.SecuritySystem.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; + namespace Framework.Infrastructure.DependencyInjection; public class ProjectionDomainSecurityBssFrameworkExtension(Assembly assembly) : ISecuritySystemExtension { public void AddServices(IServiceCollection services) => services.AddProjectionDomainSecurityServices(assembly); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/ServiceCollectionExtensions.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/ServiceCollectionExtensions.cs index b0391bd3b..47c0498fe 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/ServiceCollectionExtensions.cs @@ -1,6 +1,12 @@ using System.Reflection; using Anch.DependencyInjection; +using Anch.HierarchicalExpand; +using Anch.OData.DependencyInjection; +using Anch.SecuritySystem; +using Anch.SecuritySystem.DomainServices; +using Anch.SecuritySystem.DomainServices.DependencySecurity; +using Anch.SecuritySystem.SecurityRuleInfo; using Framework.Application.Events; using Framework.BLL; @@ -20,17 +26,8 @@ using Framework.Tracking; using Framework.Validation; -using Anch.HierarchicalExpand; - using Microsoft.Extensions.DependencyInjection; -using Anch.OData.DependencyInjection; - -using Anch.SecuritySystem; -using Anch.SecuritySystem.DomainServices; -using Anch.SecuritySystem.DomainServices.DependencySecurity; -using Anch.SecuritySystem.SecurityRuleInfo; - namespace Framework.Infrastructure.DependencyInjection; public static class ServiceCollectionExtensions @@ -122,3 +119,4 @@ public IServiceCollection AddProjectionDomainSecurityServices(Assembly assembly) } } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/SubscriptionManagerSetupObject.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/SubscriptionManagerSetupObject.cs index f240412f1..3507c8326 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/SubscriptionManagerSetupObject.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/DependencyInjection/SubscriptionManagerSetupObject.cs @@ -21,3 +21,4 @@ public ISubscriptionManagerSetupObject Add() return this; } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/ProjectionActualDomainTypeResolver.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/ProjectionActualDomainTypeResolver.cs index 4335c652b..555813138 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/ProjectionActualDomainTypeResolver.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/ProjectionActualDomainTypeResolver.cs @@ -1,6 +1,6 @@ -using Framework.Projection; +using Anch.HierarchicalExpand; -using Anch.HierarchicalExpand; +using Framework.Projection; namespace Framework.Infrastructure; @@ -8,3 +8,4 @@ public class ProjectionActualDomainTypeResolver : IActualDomainTypeResolver { public Type Resolve(Type identity) => identity.GetProjectionSourceTypeOrSelf(); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/ProjectionSecurityContextInfoSource.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/ProjectionSecurityContextInfoSource.cs index b38678770..7691c45d7 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/ProjectionSecurityContextInfoSource.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/ProjectionSecurityContextInfoSource.cs @@ -1,7 +1,5 @@ using Anch.Core; - using Anch.HierarchicalExpand; - using Anch.SecuritySystem; namespace Framework.Infrastructure; @@ -14,3 +12,4 @@ public class ProjectionSecurityContextInfoSource( { public override SecurityContextInfo GetSecurityContextInfo(Type type) => base.GetSecurityContextInfo(actualDomainTypeResolver.Resolve(type)); } + diff --git a/src/Infrastructure/Framework.Infrastructure.Legacy/Services/AuditService.cs b/src/Infrastructure/Framework.Infrastructure.Legacy/Services/AuditService.cs index a58b16b23..da54c180d 100644 --- a/src/Infrastructure/Framework.Infrastructure.Legacy/Services/AuditService.cs +++ b/src/Infrastructure/Framework.Infrastructure.Legacy/Services/AuditService.cs @@ -129,3 +129,4 @@ private TPropertyRevisionDto CreateGenericPropertyRevisionDto(RevisionIn } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Swagger/ClientSecurityRuleDocumentFilter.cs b/src/Infrastructure/Framework.Infrastructure.Swagger/ClientSecurityRuleDocumentFilter.cs index 90c50ee2e..d5146b080 100644 --- a/src/Infrastructure/Framework.Infrastructure.Swagger/ClientSecurityRuleDocumentFilter.cs +++ b/src/Infrastructure/Framework.Infrastructure.Swagger/ClientSecurityRuleDocumentFilter.cs @@ -1,7 +1,7 @@ -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Models; +using Anch.SecuritySystem.SecurityRuleInfo; -using Anch.SecuritySystem.SecurityRuleInfo; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Models; using Swashbuckle.AspNetCore.SwaggerGen; @@ -17,10 +17,10 @@ private OpenApiSchema BuildSchema() var ruleNames = source.GetInfos().Select(info => info.Rule.Name).OrderBy(v => v).ToArray(); var schema = new OpenApiSchema - { - Type = "integer", - Enum = Enumerable.Range(0, ruleNames.Length).Select(IOpenApiAny (v) => new OpenApiInteger(v)).ToList(), - }; + { + Type = "integer", + Enum = Enumerable.Range(0, ruleNames.Length).Select(IOpenApiAny (v) => new OpenApiInteger(v)).ToList(), + }; var apiNames = new OpenApiArray(); apiNames.AddRange(ruleNames.Select(v => new OpenApiString(v))); @@ -29,3 +29,4 @@ private OpenApiSchema BuildSchema() return schema; } } + diff --git a/src/Infrastructure/Framework.Infrastructure.Swagger/SwaggerExtensions.cs b/src/Infrastructure/Framework.Infrastructure.Swagger/SwaggerExtensions.cs index fa57403d0..32626b500 100644 --- a/src/Infrastructure/Framework.Infrastructure.Swagger/SwaggerExtensions.cs +++ b/src/Infrastructure/Framework.Infrastructure.Swagger/SwaggerExtensions.cs @@ -13,3 +13,4 @@ public static SwaggerGenOptions AddClientSecurityRule(this SwaggerGenOptions opt return options; } } + diff --git a/src/Infrastructure/Framework.Infrastructure/Auth/ApplicationDefaultCancellationTokenSource.cs b/src/Infrastructure/Framework.Infrastructure/Auth/ApplicationDefaultCancellationTokenSource.cs index 6372d8626..dba08cb7e 100644 --- a/src/Infrastructure/Framework.Infrastructure/Auth/ApplicationDefaultCancellationTokenSource.cs +++ b/src/Infrastructure/Framework.Infrastructure/Auth/ApplicationDefaultCancellationTokenSource.cs @@ -8,3 +8,4 @@ public class ApplicationDefaultCancellationTokenSource(IHttpContextAccessor http { public CancellationToken CancellationToken => httpContextAccessor.HttpContext?.RequestAborted ?? CancellationToken.None; } + diff --git a/src/Infrastructure/Framework.Infrastructure/Auth/ApplicationDefaultCurrentUser.cs b/src/Infrastructure/Framework.Infrastructure/Auth/ApplicationDefaultCurrentUser.cs index b02a3fa87..5de63ad2e 100644 --- a/src/Infrastructure/Framework.Infrastructure/Auth/ApplicationDefaultCurrentUser.cs +++ b/src/Infrastructure/Framework.Infrastructure/Auth/ApplicationDefaultCurrentUser.cs @@ -11,3 +11,4 @@ public class ApplicationDefaultCurrentUser(IHttpContextAccessor httpContextAcces { public string Name => httpContextAccessor.HttpContext?.User.Identity?.Name ?? settings.UserName; } + diff --git a/src/Infrastructure/Framework.Infrastructure/DALListener/DenormalizeHierarchicalDALListener.cs b/src/Infrastructure/Framework.Infrastructure/DALListener/DenormalizeHierarchicalDALListener.cs index 2792c6885..cfe463454 100644 --- a/src/Infrastructure/Framework.Infrastructure/DALListener/DenormalizeHierarchicalDALListener.cs +++ b/src/Infrastructure/Framework.Infrastructure/DALListener/DenormalizeHierarchicalDALListener.cs @@ -1,17 +1,15 @@ using Anch.Core; +using Anch.HierarchicalExpand; +using Anch.HierarchicalExpand.Denormalization; +using Anch.SecuritySystem; using Framework.Application.Lock; using Framework.Core; using Framework.Database; using Framework.Database.DALListener; -using Anch.HierarchicalExpand; -using Anch.HierarchicalExpand.Denormalization; - using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem; - namespace Framework.Infrastructure.DALListener; public class DenormalizeHierarchicalDALListener( @@ -77,3 +75,4 @@ private async Task LockChanges(FullAncestorLinkInfo fullAncestorLinkInfo, Cancel await namedLockService.LockAsync(namedLock, LockRole.Update, cancellationToken); } } + diff --git a/src/Infrastructure/Framework.Infrastructure/DependencyInjection/BssFrameworkSetup.cs b/src/Infrastructure/Framework.Infrastructure/DependencyInjection/BssFrameworkSetup.cs index 1a26393bd..41a38de9a 100644 --- a/src/Infrastructure/Framework.Infrastructure/DependencyInjection/BssFrameworkSetup.cs +++ b/src/Infrastructure/Framework.Infrastructure/DependencyInjection/BssFrameworkSetup.cs @@ -1,5 +1,6 @@ using Anch.Core; using Anch.DependencyInjection; +using Anch.SecuritySystem.DependencyInjection; using Framework.Application; using Framework.Application.Auth; @@ -8,7 +9,6 @@ using Framework.Core; using Framework.Database.DALListener; using Framework.Database.DependencyInjection; - using Framework.Infrastructure.Auth; using Framework.Infrastructure.DALListener; using Framework.Infrastructure.Integration; @@ -18,8 +18,6 @@ using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem.DependencyInjection; - namespace Framework.Infrastructure.DependencyInjection; public class BssFrameworkSetup : IBssFrameworkSetup, IServiceInitializer @@ -122,3 +120,4 @@ public void Initialize(IServiceCollection services) this.extensions.ForEach(ex => ex.AddServices(services)); } } + diff --git a/src/Infrastructure/Framework.Infrastructure/DependencyInjection/IBssFrameworkSetup.cs b/src/Infrastructure/Framework.Infrastructure/DependencyInjection/IBssFrameworkSetup.cs index 903aa4c20..a4071b4fb 100644 --- a/src/Infrastructure/Framework.Infrastructure/DependencyInjection/IBssFrameworkSetup.cs +++ b/src/Infrastructure/Framework.Infrastructure/DependencyInjection/IBssFrameworkSetup.cs @@ -1,10 +1,10 @@ -using Framework.Application.DependencyInjection; +using Anch.SecuritySystem.DependencyInjection; + +using Framework.Application.DependencyInjection; using Framework.Application.Events; using Framework.Database.DALListener; using Framework.Database.DependencyInjection; -using Anch.SecuritySystem.DependencyInjection; - namespace Framework.Infrastructure.DependencyInjection; public interface IBssFrameworkSetup : IBssFrameworkSetup @@ -23,3 +23,4 @@ IBssFrameworkSetup AddListener() IBssFrameworkSetup SetDomainObjectEventMetadata() where T : IDomainObjectEventMetadata; } + diff --git a/src/Infrastructure/Framework.Infrastructure/DependencyInjection/ServiceCollectionExtensions.cs b/src/Infrastructure/Framework.Infrastructure/DependencyInjection/ServiceCollectionExtensions.cs index 90e5b7ac3..f53420837 100644 --- a/src/Infrastructure/Framework.Infrastructure/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Infrastructure/Framework.Infrastructure/DependencyInjection/ServiceCollectionExtensions.cs @@ -10,3 +10,4 @@ public static IServiceCollection AddBssFramework(this IServiceCollection service services.Initialize(setupAction); } + diff --git a/src/Infrastructure/Framework.Infrastructure/Integration/EventXsdExporter.cs b/src/Infrastructure/Framework.Infrastructure/Integration/EventXsdExporter.cs index 50691f5d8..c051f1aca 100644 --- a/src/Infrastructure/Framework.Infrastructure/Integration/EventXsdExporter.cs +++ b/src/Infrastructure/Framework.Infrastructure/Integration/EventXsdExporter.cs @@ -77,3 +77,4 @@ private Stream WriteXsd(XmlSchemaSet schemasSet) return zipStream; } } + diff --git a/src/Infrastructure/Framework.Infrastructure/Integration/EventXsdExporter2.cs b/src/Infrastructure/Framework.Infrastructure/Integration/EventXsdExporter2.cs index bd1e46146..bfb1c2d91 100644 --- a/src/Infrastructure/Framework.Infrastructure/Integration/EventXsdExporter2.cs +++ b/src/Infrastructure/Framework.Infrastructure/Integration/EventXsdExporter2.cs @@ -108,10 +108,10 @@ private static void AddReferences(XmlSchema schema, IEnumerable refer foreach (var schemaReference in references) { var xmlSchemaImport = new XmlSchemaImport - { - Namespace = schemaReference.TargetNamespace, - SchemaLocation = $".\\{ToFileName(schemaReference.TargetNamespace)}" - }; + { + Namespace = schemaReference.TargetNamespace, + SchemaLocation = $".\\{ToFileName(schemaReference.TargetNamespace)}" + }; schema.Includes.Add(xmlSchemaImport); } @@ -219,3 +219,4 @@ private static bool IsNotNullable(Type type) => || (type.IsGenericType && type.GetGenericTypeDefinition() != typeof(Nullable<>)) || type.IsArray; } + diff --git a/src/Infrastructure/Framework.Infrastructure/Integration/IntegrationSchemaControllerBase.cs b/src/Infrastructure/Framework.Infrastructure/Integration/IntegrationSchemaControllerBase.cs index 882bdcd77..fc33484a7 100644 --- a/src/Infrastructure/Framework.Infrastructure/Integration/IntegrationSchemaControllerBase.cs +++ b/src/Infrastructure/Framework.Infrastructure/Integration/IntegrationSchemaControllerBase.cs @@ -1,12 +1,12 @@ using System.Globalization; using System.Net.Mime; +using Anch.SecuritySystem; + using Framework.Core; using Microsoft.AspNetCore.Mvc; -using Anch.SecuritySystem; - namespace Framework.Infrastructure.Integration; [Obsolete("Will be removed in v19")] @@ -53,3 +53,4 @@ protected abstract string IntegrationNamespace protected abstract IReadOnlyCollection GetAuthEventDTOTypes(); } + diff --git a/src/Infrastructure/Framework.Infrastructure/JsonConverter/DefaultJsonNamingPolicy.cs b/src/Infrastructure/Framework.Infrastructure/JsonConverter/DefaultJsonNamingPolicy.cs index 0d9d733c8..224e03303 100644 --- a/src/Infrastructure/Framework.Infrastructure/JsonConverter/DefaultJsonNamingPolicy.cs +++ b/src/Infrastructure/Framework.Infrastructure/JsonConverter/DefaultJsonNamingPolicy.cs @@ -1,6 +1,4 @@ - - -using System.Text.Json; +using System.Text.Json; namespace Framework.Infrastructure.JsonConverter; @@ -10,3 +8,4 @@ public class DefaultJsonNamingPolicy : JsonNamingPolicy public static DefaultJsonNamingPolicy Default { get; } = new(); } + diff --git a/src/Infrastructure/Framework.Infrastructure/JsonConverter/PeriodJsonConverter.cs b/src/Infrastructure/Framework.Infrastructure/JsonConverter/PeriodJsonConverter.cs index 901036250..567acc7ac 100644 --- a/src/Infrastructure/Framework.Infrastructure/JsonConverter/PeriodJsonConverter.cs +++ b/src/Infrastructure/Framework.Infrastructure/JsonConverter/PeriodJsonConverter.cs @@ -55,3 +55,4 @@ public override void Write(Utf8JsonWriter writer, Period value, JsonSerializerOp writer.WriteEndObject(); } } + diff --git a/src/Infrastructure/Framework.Infrastructure/JsonConverter/UtcDateTimeJsonConverter.cs b/src/Infrastructure/Framework.Infrastructure/JsonConverter/UtcDateTimeJsonConverter.cs index 77b6df3a2..0036acf82 100644 --- a/src/Infrastructure/Framework.Infrastructure/JsonConverter/UtcDateTimeJsonConverter.cs +++ b/src/Infrastructure/Framework.Infrastructure/JsonConverter/UtcDateTimeJsonConverter.cs @@ -14,3 +14,4 @@ public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializer writer.WriteStringValue(actualDateTime); } } + diff --git a/src/Infrastructure/Framework.Infrastructure/Middleware/IWebApiCurrentDBSessionModeResolver.cs b/src/Infrastructure/Framework.Infrastructure/Middleware/IWebApiCurrentDBSessionModeResolver.cs index 1041cf749..e56929579 100644 --- a/src/Infrastructure/Framework.Infrastructure/Middleware/IWebApiCurrentDBSessionModeResolver.cs +++ b/src/Infrastructure/Framework.Infrastructure/Middleware/IWebApiCurrentDBSessionModeResolver.cs @@ -6,3 +6,4 @@ public interface IWebApiCurrentDBSessionModeResolver { DBSessionMode? GetSessionMode(); } + diff --git a/src/Infrastructure/Framework.Infrastructure/Middleware/IWebApiCurrentMethodResolver.cs b/src/Infrastructure/Framework.Infrastructure/Middleware/IWebApiCurrentMethodResolver.cs index ac8ebc4dc..63b09c5dc 100644 --- a/src/Infrastructure/Framework.Infrastructure/Middleware/IWebApiCurrentMethodResolver.cs +++ b/src/Infrastructure/Framework.Infrastructure/Middleware/IWebApiCurrentMethodResolver.cs @@ -6,3 +6,4 @@ public interface IWebApiCurrentMethodResolver { MethodInfo? TryGetCurrentMethod(); } + diff --git a/src/Infrastructure/Framework.Infrastructure/Middleware/IWebApiDBSessionModeResolver.cs b/src/Infrastructure/Framework.Infrastructure/Middleware/IWebApiDBSessionModeResolver.cs index 64663d700..3a1da3892 100644 --- a/src/Infrastructure/Framework.Infrastructure/Middleware/IWebApiDBSessionModeResolver.cs +++ b/src/Infrastructure/Framework.Infrastructure/Middleware/IWebApiDBSessionModeResolver.cs @@ -8,3 +8,4 @@ public interface IWebApiDBSessionModeResolver { DBSessionMode? GetSessionMode(MethodInfo methodInfo); } + diff --git a/src/Infrastructure/Framework.Infrastructure/Middleware/MiddlewareExtensions.cs b/src/Infrastructure/Framework.Infrastructure/Middleware/MiddlewareExtensions.cs index 5f4363b4f..9db104860 100644 --- a/src/Infrastructure/Framework.Infrastructure/Middleware/MiddlewareExtensions.cs +++ b/src/Infrastructure/Framework.Infrastructure/Middleware/MiddlewareExtensions.cs @@ -8,3 +8,4 @@ public static class MiddlewareExtensions public static IApplicationBuilder UseWebApiExceptionExpander(this IApplicationBuilder builder) => builder.UseMiddleware(); } + diff --git a/src/Infrastructure/Framework.Infrastructure/Middleware/TryProcessDbSessionMiddleware.cs b/src/Infrastructure/Framework.Infrastructure/Middleware/TryProcessDbSessionMiddleware.cs index 3a03be2e2..ac4a614aa 100644 --- a/src/Infrastructure/Framework.Infrastructure/Middleware/TryProcessDbSessionMiddleware.cs +++ b/src/Infrastructure/Framework.Infrastructure/Middleware/TryProcessDbSessionMiddleware.cs @@ -34,3 +34,4 @@ await dbSessionManager.EvaluateAsync( }, context.RequestAborted); } + diff --git a/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiCurrentDBSessionModeResolver.cs b/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiCurrentDBSessionModeResolver.cs index 543d4d106..0a472438d 100644 --- a/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiCurrentDBSessionModeResolver.cs +++ b/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiCurrentDBSessionModeResolver.cs @@ -9,3 +9,4 @@ public class WebApiCurrentDBSessionModeResolver(IWebApiCurrentMethodResolver met { public DBSessionMode? GetSessionMode() => methodResolver.TryGetCurrentMethod().Maybe(dbSessionModeResolver.GetSessionMode); } + diff --git a/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiCurrentMethodResolver.cs b/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiCurrentMethodResolver.cs index bb79c6c77..381e8f034 100644 --- a/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiCurrentMethodResolver.cs +++ b/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiCurrentMethodResolver.cs @@ -14,3 +14,4 @@ public class WebApiCurrentMethodResolver(IHttpContextAccessor httpContextAccesso return endPoint?.Metadata.GetMetadata()?.MethodInfo; } } + diff --git a/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiDBSessionModeResolver.cs b/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiDBSessionModeResolver.cs index 33f4724f4..2b1ac2683 100644 --- a/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiDBSessionModeResolver.cs +++ b/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiDBSessionModeResolver.cs @@ -25,3 +25,4 @@ public class WebApiDBSessionModeResolver : IWebApiDBSessionModeResolver .ToNullable(); }); } + diff --git a/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiExceptionExpanderMiddleware.cs b/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiExceptionExpanderMiddleware.cs index 37b10cccf..d25417425 100644 --- a/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiExceptionExpanderMiddleware.cs +++ b/src/Infrastructure/Framework.Infrastructure/Middleware/WebApiExceptionExpanderMiddleware.cs @@ -31,3 +31,4 @@ public async Task Invoke(HttpContext context, IWebApiExceptionExpander exception } } } + diff --git a/src/Infrastructure/Framework.Infrastructure/Services/RootExceptionExpander.cs b/src/Infrastructure/Framework.Infrastructure/Services/RootExceptionExpander.cs index 8ca62ac22..94582848e 100644 --- a/src/Infrastructure/Framework.Infrastructure/Services/RootExceptionExpander.cs +++ b/src/Infrastructure/Framework.Infrastructure/Services/RootExceptionExpander.cs @@ -13,3 +13,4 @@ public class RootExceptionExpander([FromKeyedServices(IExceptionExpander.Element return result == exception ? null : result; } } + diff --git a/src/Infrastructure/Framework.Infrastructure/WebApiExceptionExpander/IWebApiExceptionExpander.cs b/src/Infrastructure/Framework.Infrastructure/WebApiExceptionExpander/IWebApiExceptionExpander.cs index a5228e73e..31dc95ffe 100644 --- a/src/Infrastructure/Framework.Infrastructure/WebApiExceptionExpander/IWebApiExceptionExpander.cs +++ b/src/Infrastructure/Framework.Infrastructure/WebApiExceptionExpander/IWebApiExceptionExpander.cs @@ -6,3 +6,4 @@ namespace Framework.Infrastructure.WebApiExceptionExpander; /// Handle and wrap exception for user UI /// public interface IWebApiExceptionExpander : IExceptionExpander; + diff --git a/src/Infrastructure/Framework.Infrastructure/WebApiExceptionExpander/WebApiExceptionExpander.cs b/src/Infrastructure/Framework.Infrastructure/WebApiExceptionExpander/WebApiExceptionExpander.cs index f9ac7477d..0b455dc6a 100644 --- a/src/Infrastructure/Framework.Infrastructure/WebApiExceptionExpander/WebApiExceptionExpander.cs +++ b/src/Infrastructure/Framework.Infrastructure/WebApiExceptionExpander/WebApiExceptionExpander.cs @@ -23,3 +23,4 @@ private bool IsHandledException(Exception exception) => this.isHandledExceptionC exception.GetType(), exceptionType => settingsList.Any(settings => exceptionType.IsAssignableToAny(settings.HandledTypes))); } + diff --git a/src/Infrastructure/Framework.Infrastructure/WebApiExceptionExpander/WebApiExceptionExpanderSettings.cs b/src/Infrastructure/Framework.Infrastructure/WebApiExceptionExpander/WebApiExceptionExpanderSettings.cs index 58520a96a..5e6ff851e 100644 --- a/src/Infrastructure/Framework.Infrastructure/WebApiExceptionExpander/WebApiExceptionExpanderSettings.cs +++ b/src/Infrastructure/Framework.Infrastructure/WebApiExceptionExpander/WebApiExceptionExpanderSettings.cs @@ -1,12 +1,12 @@ using System.Collections.Immutable; using System.Security; +using Anch.SecuritySystem; + using Framework.Application; using Framework.Database; using Framework.Database.DALExceptions; -using Anch.SecuritySystem; - namespace Framework.Infrastructure.WebApiExceptionExpander; public record WebApiExceptionExpanderSettings(ImmutableArray HandledTypes) @@ -21,3 +21,4 @@ public record WebApiExceptionExpanderSettings(ImmutableArray HandledTypes) typeof(BusinessLogicException) ]); } + diff --git a/src/Notification/Framework.Notification.Abstractions/ISmtpClientFactory.cs b/src/Notification/Framework.Notification.Abstractions/ISmtpClientFactory.cs index 73c11d0f5..a550f23fd 100644 --- a/src/Notification/Framework.Notification.Abstractions/ISmtpClientFactory.cs +++ b/src/Notification/Framework.Notification.Abstractions/ISmtpClientFactory.cs @@ -6,3 +6,4 @@ public interface ISmtpClientFactory { SmtpClient CreateSmtpClient(); } + diff --git a/src/Notification/Framework.Notification.DTO/NotificationAttachmentDTO.cs b/src/Notification/Framework.Notification.DTO/NotificationAttachmentDTO.cs index 29424e867..375f1a554 100644 --- a/src/Notification/Framework.Notification.DTO/NotificationAttachmentDTO.cs +++ b/src/Notification/Framework.Notification.DTO/NotificationAttachmentDTO.cs @@ -34,3 +34,4 @@ public NotificationAttachmentDTO(System.Net.Mail.Attachment attachment) this.IsInline = attachment.ContentDisposition!.Inline; } } + diff --git a/src/Notification/Framework.Notification.DTO/NotificationEventDTO.cs b/src/Notification/Framework.Notification.DTO/NotificationEventDTO.cs index b5db1f10f..5b2d27e51 100644 --- a/src/Notification/Framework.Notification.DTO/NotificationEventDTO.cs +++ b/src/Notification/Framework.Notification.DTO/NotificationEventDTO.cs @@ -42,10 +42,11 @@ public NotificationEventDTO(Domain.Notification notification) this.Recipients = mailMessage.Recipients.Select(mar => new NotificationRecipientDTO(mar)).ToList(); this.Subject = mailMessage.Subject; - this.Message = new () { IsBodyHtml = mailMessage.IsBodyHtml, Message = mailMessage.Body }; + this.Message = new() { IsBodyHtml = mailMessage.IsBodyHtml, Message = mailMessage.Body }; this.Attachments = mailMessage.Attachments.Select(z => new NotificationAttachmentDTO(z)).ToList(); - this.TechnicalInformation = new (notification.TechnicalInformation); + this.TechnicalInformation = new(notification.TechnicalInformation); } } + diff --git a/src/Notification/Framework.Notification.DTO/NotificationMessage.cs b/src/Notification/Framework.Notification.DTO/NotificationMessage.cs index 5cd247b3e..8b223e110 100644 --- a/src/Notification/Framework.Notification.DTO/NotificationMessage.cs +++ b/src/Notification/Framework.Notification.DTO/NotificationMessage.cs @@ -11,3 +11,4 @@ public class NotificationMessage [DataMember] public string Message { get; set; } } + diff --git a/src/Notification/Framework.Notification.DTO/NotificationRecipientDTO.cs b/src/Notification/Framework.Notification.DTO/NotificationRecipientDTO.cs index d5eaec57d..be16404dc 100644 --- a/src/Notification/Framework.Notification.DTO/NotificationRecipientDTO.cs +++ b/src/Notification/Framework.Notification.DTO/NotificationRecipientDTO.cs @@ -23,3 +23,4 @@ public NotificationRecipientDTO(NotificationRecipient notificationRecipient) this.Type = notificationRecipient.Role; } } + diff --git a/src/Notification/Framework.Notification.DTO/NotificationTechnicalInformationDTO.cs b/src/Notification/Framework.Notification.DTO/NotificationTechnicalInformationDTO.cs index 94b1482a3..25f2e05ce 100644 --- a/src/Notification/Framework.Notification.DTO/NotificationTechnicalInformationDTO.cs +++ b/src/Notification/Framework.Notification.DTO/NotificationTechnicalInformationDTO.cs @@ -28,3 +28,4 @@ public NotificationTechnicalInformationDTO(NotificationTechnicalInformation info this.ContextObjectType = information.ContextObjectType; } } + diff --git a/src/Notification/Framework.Notification.Domain/MailMessageExtensions.cs b/src/Notification/Framework.Notification.Domain/MailMessageExtensions.cs index 3753e9ff6..3a5fc9d29 100644 --- a/src/Notification/Framework.Notification.Domain/MailMessageExtensions.cs +++ b/src/Notification/Framework.Notification.Domain/MailMessageExtensions.cs @@ -25,7 +25,7 @@ public ImmutableArray Recipients } } - public ImmutableArray AttachmentList { get => [..mailMessage.Attachments]; set => mailMessage.Attachments.Override(value); } + public ImmutableArray AttachmentList { get => [.. mailMessage.Attachments]; set => mailMessage.Attachments.Override(value); } public MailMessage Clone() => @@ -40,3 +40,4 @@ public MailMessage Clone() => }; } } + diff --git a/src/Notification/Framework.Notification.Domain/Notification.cs b/src/Notification/Framework.Notification.Domain/Notification.cs index b1e815bf5..a3a51489a 100644 --- a/src/Notification/Framework.Notification.Domain/Notification.cs +++ b/src/Notification/Framework.Notification.Domain/Notification.cs @@ -3,3 +3,4 @@ namespace Framework.Notification.Domain; public record Notification(NotificationTechnicalInformation TechnicalInformation, MailMessage Message); + diff --git a/src/Notification/Framework.Notification.Domain/NotificationRecipient.cs b/src/Notification/Framework.Notification.Domain/NotificationRecipient.cs index 8698a05df..6a8587821 100644 --- a/src/Notification/Framework.Notification.Domain/NotificationRecipient.cs +++ b/src/Notification/Framework.Notification.Domain/NotificationRecipient.cs @@ -11,3 +11,4 @@ public NotificationRecipient(string address, RecipientRole role) public override string ToString() => $"{this.Address} ({nameof(this.Role)} = {this.Role})"; } + diff --git a/src/Notification/Framework.Notification.Runtime/MailMessageModifier/HtmlMarkerMessageModifier.cs b/src/Notification/Framework.Notification.Runtime/MailMessageModifier/HtmlMarkerMessageModifier.cs index f94bfd17d..cf1966c58 100644 --- a/src/Notification/Framework.Notification.Runtime/MailMessageModifier/HtmlMarkerMessageModifier.cs +++ b/src/Notification/Framework.Notification.Runtime/MailMessageModifier/HtmlMarkerMessageModifier.cs @@ -6,3 +6,4 @@ public class HtmlMarkerMessageModifier : IMailMessageModifier { public void Modify(MailMessage message) => message.IsBodyHtml = message.Body.StartsWith(" ToRecipients(string[] targets) => targets.Select(z => z.Trim()).Distinct().Select(z => new MailAddress(z)); } + diff --git a/src/Notification/Framework.Notification.Runtime/MailMessageModifier/RedirectToSupportMailMessageModifier.cs b/src/Notification/Framework.Notification.Runtime/MailMessageModifier/RedirectToSupportMailMessageModifier.cs index fcb9001c5..8db64ef74 100644 --- a/src/Notification/Framework.Notification.Runtime/MailMessageModifier/RedirectToSupportMailMessageModifier.cs +++ b/src/Notification/Framework.Notification.Runtime/MailMessageModifier/RedirectToSupportMailMessageModifier.cs @@ -18,3 +18,4 @@ public void Modify(MailMessage message) } } } + diff --git a/src/Notification/Framework.Notification.Runtime/MailMessageModifier/RedirectToTestAddress.cs b/src/Notification/Framework.Notification.Runtime/MailMessageModifier/RedirectToTestAddress.cs index b6d89de55..c7b3ec169 100644 --- a/src/Notification/Framework.Notification.Runtime/MailMessageModifier/RedirectToTestAddress.cs +++ b/src/Notification/Framework.Notification.Runtime/MailMessageModifier/RedirectToTestAddress.cs @@ -36,3 +36,4 @@ private void AddRecipientsToBody(MailMessage message) message.Body = $"{originalReceivers}{message.Body}"; } } + diff --git a/src/Notification/Framework.Notification.Runtime/MailMessageModifier/RewriteReceiversMailMessageModifier.cs b/src/Notification/Framework.Notification.Runtime/MailMessageModifier/RewriteReceiversMailMessageModifier.cs index 91abe5504..e3559cffd 100644 --- a/src/Notification/Framework.Notification.Runtime/MailMessageModifier/RewriteReceiversMailMessageModifier.cs +++ b/src/Notification/Framework.Notification.Runtime/MailMessageModifier/RewriteReceiversMailMessageModifier.cs @@ -23,3 +23,4 @@ .. message.Recipients.Join( .SelectMany() ]; } + diff --git a/src/Notification/Framework.Notification.Runtime/MailMessageModifier/SubjectCleanerMailMessageModifier.cs b/src/Notification/Framework.Notification.Runtime/MailMessageModifier/SubjectCleanerMailMessageModifier.cs index a6ed3c345..6a70298f8 100644 --- a/src/Notification/Framework.Notification.Runtime/MailMessageModifier/SubjectCleanerMailMessageModifier.cs +++ b/src/Notification/Framework.Notification.Runtime/MailMessageModifier/SubjectCleanerMailMessageModifier.cs @@ -18,3 +18,4 @@ private string CutSubjectOnRight(string subject) private string ReplaceUnsupportedCharactersForSubject(string subject) => subject.Replace(Environment.NewLine, " ").Replace('\r', ' ').Replace('\n', ' '); } + diff --git a/src/Notification/Framework.Notification.Runtime/NotificationMessageSender.cs b/src/Notification/Framework.Notification.Runtime/NotificationMessageSender.cs index 8960655d2..dfa7dfe7e 100644 --- a/src/Notification/Framework.Notification.Runtime/NotificationMessageSender.cs +++ b/src/Notification/Framework.Notification.Runtime/NotificationMessageSender.cs @@ -28,3 +28,4 @@ public async Task SendAsync(Domain.Notification notification, CancellationToken } } } + diff --git a/src/Notification/Framework.Notification.Runtime/SmtpClientFactory.cs b/src/Notification/Framework.Notification.Runtime/SmtpClientFactory.cs index 1e5640d30..9850e5680 100644 --- a/src/Notification/Framework.Notification.Runtime/SmtpClientFactory.cs +++ b/src/Notification/Framework.Notification.Runtime/SmtpClientFactory.cs @@ -14,3 +14,4 @@ public SmtpClient CreateSmtpClient() => ? new SmtpClient(settings.Value.Server, settings.Value.Port) { UseDefaultCredentials = true } : new SmtpClient { UseDefaultCredentials = true, DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory, PickupDirectoryLocation = settings.Value.OutputFolder }; } + diff --git a/src/Notification/Framework.Notification.Runtime/SmtpMessageSender.cs b/src/Notification/Framework.Notification.Runtime/SmtpMessageSender.cs index b9eb290b6..48ea4bc49 100644 --- a/src/Notification/Framework.Notification.Runtime/SmtpMessageSender.cs +++ b/src/Notification/Framework.Notification.Runtime/SmtpMessageSender.cs @@ -42,3 +42,4 @@ protected virtual MailMessage GetActualMailMessage(MailMessage baseMessage) return newMailMessage; } } + diff --git a/src/Notification/Framework.Notification/DependencyInjection/ServiceCollectionExtensions.cs b/src/Notification/Framework.Notification/DependencyInjection/ServiceCollectionExtensions.cs index 2ad1f8042..831feaa78 100644 --- a/src/Notification/Framework.Notification/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Notification/Framework.Notification/DependencyInjection/ServiceCollectionExtensions.cs @@ -43,3 +43,4 @@ public void AddSmtpNotification(IConfiguration configuration, bool isProd) } } } + diff --git a/src/Projection/Framework.Projection.Abstractions/IProjectionEnvironment.cs b/src/Projection/Framework.Projection.Abstractions/IProjectionEnvironment.cs index e2ab2651b..dc7fa55eb 100644 --- a/src/Projection/Framework.Projection.Abstractions/IProjectionEnvironment.cs +++ b/src/Projection/Framework.Projection.Abstractions/IProjectionEnvironment.cs @@ -26,3 +26,4 @@ public interface IProjectionEnvironment IMetadataProxyProvider MetadataProxyProvider { get; } } + diff --git a/src/Projection/Framework.Projection.Domain/TypeExtensions.cs b/src/Projection/Framework.Projection.Domain/TypeExtensions.cs index 55e264027..8d35f5af1 100644 --- a/src/Projection/Framework.Projection.Domain/TypeExtensions.cs +++ b/src/Projection/Framework.Projection.Domain/TypeExtensions.cs @@ -155,3 +155,4 @@ public static bool IsProjection(this Type type, Func condition) return type.GetProjectionSourceType(false).Maybe(condition); } } + diff --git a/src/Projection/Framework.Projection.Runtime/AlreadyImplementedRuntimeProjectionEnvironment.cs b/src/Projection/Framework.Projection.Runtime/AlreadyImplementedRuntimeProjectionEnvironment.cs index 749fecb2e..8e6af9d6c 100644 --- a/src/Projection/Framework.Projection.Runtime/AlreadyImplementedRuntimeProjectionEnvironment.cs +++ b/src/Projection/Framework.Projection.Runtime/AlreadyImplementedRuntimeProjectionEnvironment.cs @@ -40,3 +40,4 @@ .. baseAssembly.GetTypes().Select(baseType => ]; } } + diff --git a/src/Projection/Framework.Projection.Runtime/Contract/GenerateState.cs b/src/Projection/Framework.Projection.Runtime/Contract/GenerateState.cs index 07bb9d655..059aee6f3 100644 --- a/src/Projection/Framework.Projection.Runtime/Contract/GenerateState.cs +++ b/src/Projection/Framework.Projection.Runtime/Contract/GenerateState.cs @@ -21,3 +21,4 @@ public void Add(Type contractType, GeneratedType generatedType) public ImmutableHashSet Types => this.types; } + diff --git a/src/Projection/Framework.Projection.Runtime/Contract/GenerateTypeResolver.cs b/src/Projection/Framework.Projection.Runtime/Contract/GenerateTypeResolver.cs index a1d4b0562..d4ecb87a6 100644 --- a/src/Projection/Framework.Projection.Runtime/Contract/GenerateTypeResolver.cs +++ b/src/Projection/Framework.Projection.Runtime/Contract/GenerateTypeResolver.cs @@ -33,3 +33,4 @@ public GenerateTypeResolver(ProjectionContractEnvironment environment, ITypeSour public ImmutableHashSet Types => this.generateState.Types; } + diff --git a/src/Projection/Framework.Projection.Runtime/Contract/ImplType/GeneratedField.cs b/src/Projection/Framework.Projection.Runtime/Contract/ImplType/GeneratedField.cs index 6226744f6..6466dcb9b 100644 --- a/src/Projection/Framework.Projection.Runtime/Contract/ImplType/GeneratedField.cs +++ b/src/Projection/Framework.Projection.Runtime/Contract/ImplType/GeneratedField.cs @@ -42,3 +42,4 @@ public GeneratedField(ProjectionContractEnvironment environment, GeneratedProper public override bool IsDefined(Type attributeType, bool inherit) => this.GetCustomAttributes(attributeType, inherit).Any(); } + diff --git a/src/Projection/Framework.Projection.Runtime/Contract/ImplType/GeneratedProperty.cs b/src/Projection/Framework.Projection.Runtime/Contract/ImplType/GeneratedProperty.cs index e6062a622..de3de4c55 100644 --- a/src/Projection/Framework.Projection.Runtime/Contract/ImplType/GeneratedProperty.cs +++ b/src/Projection/Framework.Projection.Runtime/Contract/ImplType/GeneratedProperty.cs @@ -68,3 +68,4 @@ public GeneratedProperty(ProjectionContractEnvironment environment, PropertyInfo public override string ToString() => $"GeneratedProperty: {this.Name}"; } + diff --git a/src/Projection/Framework.Projection.Runtime/Contract/ImplType/GeneratedType.cs b/src/Projection/Framework.Projection.Runtime/Contract/ImplType/GeneratedType.cs index 351931a9e..df3c35053 100644 --- a/src/Projection/Framework.Projection.Runtime/Contract/ImplType/GeneratedType.cs +++ b/src/Projection/Framework.Projection.Runtime/Contract/ImplType/GeneratedType.cs @@ -90,7 +90,7 @@ public GeneratedType(ProjectionContractEnvironment environment, Type contractTyp public override object[] GetCustomAttributes(bool inherit) => this.customAttributes; private Attribute[] GetCustomAttributes() => - new [] + new[] { this.GetSourceTypeAttributes(), @@ -186,21 +186,21 @@ public override InterfaceMapping GetInterfaceMap(Type interfaceType) let implementProp = explicitProp ?? (PropertyInfo)prop select new - { - InterfaceMethod = prop.ContractProperty.GetMethod, + { + InterfaceMethod = prop.ContractProperty.GetMethod, - ImplementMethod = implementProp.GetMethod - }; + ImplementMethod = implementProp.GetMethod + }; var methods = request.ToArray(); return new InterfaceMapping - { - InterfaceType = interfaceType, - TargetType = this, - InterfaceMethods = methods.ToArray(pair => pair.InterfaceMethod), - TargetMethods = methods.ToArray(pair => pair.ImplementMethod) - }; + { + InterfaceType = interfaceType, + TargetType = this, + InterfaceMethods = methods.ToArray(pair => pair.InterfaceMethod), + TargetMethods = methods.ToArray(pair => pair.ImplementMethod) + }; } public override bool Equals(Type? o) => ReferenceEquals(this, o); @@ -239,3 +239,4 @@ private IReadOnlyDictionary GetExplicitProp return request.ToDictionary(); } } + diff --git a/src/Projection/Framework.Projection.Runtime/Contract/ProjectionContractEnvironment.cs b/src/Projection/Framework.Projection.Runtime/Contract/ProjectionContractEnvironment.cs index 24a9c10fe..a9481a7ff 100644 --- a/src/Projection/Framework.Projection.Runtime/Contract/ProjectionContractEnvironment.cs +++ b/src/Projection/Framework.Projection.Runtime/Contract/ProjectionContractEnvironment.cs @@ -64,3 +64,4 @@ private class DefaultProjectionContractEnvironment( public override Type PersistentDomainObjectBaseType { get; } = persistentDomainObjectBaseType; } } + diff --git a/src/Projection/Framework.Projection.Runtime/Extensions/CachedTypeExtensions.cs b/src/Projection/Framework.Projection.Runtime/Extensions/CachedTypeExtensions.cs index 59f069360..525a16852 100644 --- a/src/Projection/Framework.Projection.Runtime/Extensions/CachedTypeExtensions.cs +++ b/src/Projection/Framework.Projection.Runtime/Extensions/CachedTypeExtensions.cs @@ -20,3 +20,4 @@ public static Type CachedMakeGenericType(this Type type, params Type[] args) return MakeGenericTypeCache[(type, args)]; } } + diff --git a/src/Projection/Framework.Projection.Runtime/Extensions/CollectionOfProjectionType.cs b/src/Projection/Framework.Projection.Runtime/Extensions/CollectionOfProjectionType.cs index 504164bf2..f2a1052a6 100644 --- a/src/Projection/Framework.Projection.Runtime/Extensions/CollectionOfProjectionType.cs +++ b/src/Projection/Framework.Projection.Runtime/Extensions/CollectionOfProjectionType.cs @@ -83,3 +83,4 @@ public override bool IsAssignableFrom(Type? targetType) protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) => null; } + diff --git a/src/Projection/Framework.Projection.Runtime/ImplType/ExplicitProperty.cs b/src/Projection/Framework.Projection.Runtime/ImplType/ExplicitProperty.cs index cb75ba6e6..5f7823eed 100644 --- a/src/Projection/Framework.Projection.Runtime/ImplType/ExplicitProperty.cs +++ b/src/Projection/Framework.Projection.Runtime/ImplType/ExplicitProperty.cs @@ -78,3 +78,4 @@ private IEnumerable GetExpandPathAttributes() public override MethodInfo? GetSetMethod(bool nonPublic) => null; //new PropertyMethodInfoImpl(); } + diff --git a/src/Projection/Framework.Projection.Runtime/ImplType/GeneratedAssembly.cs b/src/Projection/Framework.Projection.Runtime/ImplType/GeneratedAssembly.cs index db21d5017..ddba62f17 100644 --- a/src/Projection/Framework.Projection.Runtime/ImplType/GeneratedAssembly.cs +++ b/src/Projection/Framework.Projection.Runtime/ImplType/GeneratedAssembly.cs @@ -13,5 +13,6 @@ public class GeneratedAssembly(string fullName, string name, ITypeSource typeSou public override string FullName { get; } = fullName; - public override AssemblyName GetName() => new (name) { Name = name }; + public override AssemblyName GetName() => new(name) { Name = name }; } + diff --git a/src/Projection/Framework.Projection.Runtime/ImplType/PropertyMethodInfoImpl.cs b/src/Projection/Framework.Projection.Runtime/ImplType/PropertyMethodInfoImpl.cs index 9e17fd3ce..c1faef5f8 100644 --- a/src/Projection/Framework.Projection.Runtime/ImplType/PropertyMethodInfoImpl.cs +++ b/src/Projection/Framework.Projection.Runtime/ImplType/PropertyMethodInfoImpl.cs @@ -13,3 +13,4 @@ internal class PropertyMethodInfoImpl(MethodInfo? baseDefinition = null) : BaseM public override bool Equals(object obj) => ReferenceEquals(this, obj); } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/DefaultProjectionLambdaEnvironment.cs b/src/Projection/Framework.Projection.Runtime/Lambda/DefaultProjectionLambdaEnvironment.cs index 13b8863e8..a9a7a0627 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/DefaultProjectionLambdaEnvironment.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/DefaultProjectionLambdaEnvironment.cs @@ -30,3 +30,4 @@ public class DefaultProjectionLambdaEnvironment( /// public override bool UseDependencySecurity { get; } = useDependencySecurity; } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/Extensions/ProjectionBuilderExtensions.cs b/src/Projection/Framework.Projection.Runtime/Lambda/Extensions/ProjectionBuilderExtensions.cs index 5e8df558c..9494c80b6 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/Extensions/ProjectionBuilderExtensions.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/Extensions/ProjectionBuilderExtensions.cs @@ -30,3 +30,4 @@ internal static class ProjectionBuilderExtensions return builderDict.Values; } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/Extensions/ProjectionExtensions.cs b/src/Projection/Framework.Projection.Runtime/Lambda/Extensions/ProjectionExtensions.cs index d132149e0..fc5b9d79c 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/Extensions/ProjectionExtensions.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/Extensions/ProjectionExtensions.cs @@ -32,3 +32,4 @@ private static void FillProjectionList(this IProjection projection, HashSet sources) public IEnumerable GetProjections() => this.sources.SelectMany(p => p.GetProjections()); } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/Extensions/TypeExtensions.cs b/src/Projection/Framework.Projection.Runtime/Lambda/Extensions/TypeExtensions.cs index d7b1e418b..e8973957a 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/Extensions/TypeExtensions.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/Extensions/TypeExtensions.cs @@ -53,3 +53,4 @@ private static Type MakeProjectionCollectionType(this Type collectionType, Type } } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/GenerateState.cs b/src/Projection/Framework.Projection.Runtime/Lambda/GenerateState.cs index 7f9f2476a..10ac2222a 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/GenerateState.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/GenerateState.cs @@ -21,3 +21,4 @@ public void Add(IProjection projection, GeneratedType generatedType) public ImmutableHashSet Types => this.types; } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/GenerateTypeResolver.cs b/src/Projection/Framework.Projection.Runtime/Lambda/GenerateTypeResolver.cs index 981be91e1..a2fbca05e 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/GenerateTypeResolver.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/GenerateTypeResolver.cs @@ -21,3 +21,4 @@ public Type TryResolve(IProjection projection) public ImmutableHashSet Types => this.generateState.Types; } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/IProjectionProperty.cs b/src/Projection/Framework.Projection.Runtime/Lambda/IProjectionProperty.cs index 02cce3f21..c0b351a72 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/IProjectionProperty.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/IProjectionProperty.cs @@ -50,3 +50,4 @@ public interface IProjectionProperty : IProjectionAttributeProvider /// PropertyInfo? VirtualExplicitInterfaceProperty { get; } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedCustomProperty.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedCustomProperty.cs index 6f44612bf..0e1e204aa 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedCustomProperty.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedCustomProperty.cs @@ -56,3 +56,4 @@ public GeneratedCustomProperty(ProjectionLambdaEnvironment environment, IProject public override MethodInfo? GetSetMethod(bool nonPublic) => this.setMethod; } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedField.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedField.cs index 2de54967f..3057700fd 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedField.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedField.cs @@ -44,3 +44,4 @@ public GeneratedField(ProjectionLambdaEnvironment environment, GeneratedProperty public override string ToString() => $"GeneratedField: {this.Name}"; } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedProperty.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedProperty.cs index 16baffcc6..2fc56e2ca 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedProperty.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedProperty.cs @@ -65,3 +65,4 @@ public GeneratedProperty(ProjectionLambdaEnvironment environment, IProjectionPro public override string ToString() => $"GeneratedProperty: {this.Name}"; } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedType.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedType.cs index 2db3fd636..02df9ae3c 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedType.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ImplType/GeneratedType.cs @@ -216,12 +216,12 @@ public override InterfaceMapping GetInterfaceMap(Type interfaceType) var interfaceExplicitProperties = this.explicitProperties.Where(prop => prop.InterfaceProp.ReflectedType == realInterface).ToArray(); return new InterfaceMapping - { - InterfaceType = interfaceType, - TargetType = this, - InterfaceMethods = interfaceExplicitProperties.ToArray(prop => prop.InterfaceProp.GetMethod!), - TargetMethods = interfaceExplicitProperties.ToArray(prop => prop.GetMethod!) - }; + { + InterfaceType = interfaceType, + TargetType = this, + InterfaceMethods = interfaceExplicitProperties.ToArray(prop => prop.InterfaceProp.GetMethod!), + TargetMethods = interfaceExplicitProperties.ToArray(prop => prop.GetMethod!) + }; } public override bool Equals(Type? o) => ReferenceEquals(this, o); @@ -296,3 +296,4 @@ private IEnumerable GetSecurityExplicitProperties() } } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ManualProjectionEnvironment.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ManualProjectionEnvironment.cs index f82f52d27..fe855133f 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ManualProjectionEnvironment.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ManualProjectionEnvironment.cs @@ -19,3 +19,4 @@ public class ManualProjectionEnvironment(Assembly assembly, Type persistentDomai public IMetadataProxyProvider MetadataProxyProvider { get; } = metadataProxyProvider; } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/Projection.cs b/src/Projection/Framework.Projection.Runtime/Lambda/Projection.cs index 413359e88..b6934a6ac 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/Projection.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/Projection.cs @@ -422,3 +422,4 @@ public Projection Attribute(Attribute attribute) bool IProjection.IgnoreIdSerialization { get; } = false; } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionBuilder/ProjectionPropertyBuilder.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionBuilder/ProjectionPropertyBuilder.cs index 47e57ddc9..c8b5eb87d 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionBuilder/ProjectionPropertyBuilder.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionBuilder/ProjectionPropertyBuilder.cs @@ -74,3 +74,4 @@ public ProjectionPropertyBuilder(ProjectionLambdaEnvironment environment, Lambda public override string ToString() => this.Name; } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionCustomProperty.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionCustomProperty.cs index fe0b31d58..673de99a7 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionCustomProperty.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionCustomProperty.cs @@ -38,3 +38,4 @@ public ProjectionCustomProperty(string name, bool writable = false, Func public TypeReferenceBase Type => this.lazyType.Value; } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionLambdaEnvironment.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionLambdaEnvironment.cs index fead2f546..a23c282d4 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionLambdaEnvironment.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionLambdaEnvironment.cs @@ -73,31 +73,31 @@ public Type BuildPropertyType(TypeReferenceBase typeReferenceBase) switch (typeReferenceBase) { case TypeReferenceBase.FixedTypeReference fixRef: - { - if (this.IsPersistent(fixRef.PropertyType)) { - throw new PropertyProjectionNotInitializedException(fixRef.PropertyType); - } + if (this.IsPersistent(fixRef.PropertyType)) + { + throw new PropertyProjectionNotInitializedException(fixRef.PropertyType); + } - return fixRef.PropertyType; - } + return fixRef.PropertyType; + } case TypeReferenceBase.BuildTypeReference buildTypeRef: - { - if (buildTypeRef.ElementProjection == null && this.IsPersistent(buildTypeRef.ElementType)) { - throw new PropertyProjectionNotInitializedException(buildTypeRef.ElementType); - } + if (buildTypeRef.ElementProjection == null && this.IsPersistent(buildTypeRef.ElementType)) + { + throw new PropertyProjectionNotInitializedException(buildTypeRef.ElementType); + } - var elementProjectionType = - (GeneratedType?)buildTypeRef.ElementProjection.Maybe(v => this.ProjectionTypeResolver.Resolve(v)); + var elementProjectionType = + (GeneratedType?)buildTypeRef.ElementProjection.Maybe(v => this.ProjectionTypeResolver.Resolve(v)); - var elementType = elementProjectionType ?? buildTypeRef.ElementType; + var elementType = elementProjectionType ?? buildTypeRef.ElementType; - return buildTypeRef.IsNullable - ? typeof(Nullable<>).CachedMakeGenericType(elementType) - : buildTypeRef.CollectionType.SafeMakeProjectionCollectionType(elementType); - } + return buildTypeRef.IsNullable + ? typeof(Nullable<>).CachedMakeGenericType(elementType) + : buildTypeRef.CollectionType.SafeMakeProjectionCollectionType(elementType); + } default: throw new ArgumentOutOfRangeException(nameof(typeReferenceBase)); @@ -171,3 +171,4 @@ protected internal virtual IAttributeSource GetProjectionCustomPropertyAttribute return new ProjectionCustomPropertyAttributeSource(this, projectionCustomProperty); } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionManyProperty.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionManyProperty.cs index 4022a50a2..d6f566fd8 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionManyProperty.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionManyProperty.cs @@ -21,3 +21,4 @@ public ProjectionManyProperty(Expression public override Type CollectionType { get; } = typeof(IEnumerable<>); } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionProperty.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionProperty.cs index 3a94dfa34..02329ffa1 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionProperty.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionProperty.cs @@ -89,3 +89,4 @@ protected ProjectionProperty(TExpression path, string? name, Func( /// public override Type? CollectionType { get; } = null; } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/AttributeSourceBase.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/AttributeSourceBase.cs index 329ac8c82..4aa68563a 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/AttributeSourceBase.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/AttributeSourceBase.cs @@ -45,3 +45,4 @@ public virtual IEnumerable GetAttributes() /// protected abstract IEnumerable GetDefaultAttributes(); } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/ProjectionCustomPropertyAttributeSource.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/ProjectionCustomPropertyAttributeSource.cs index 84489274e..4673315de 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/ProjectionCustomPropertyAttributeSource.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/ProjectionCustomPropertyAttributeSource.cs @@ -47,3 +47,4 @@ private IEnumerable GetFetchPathAttributes() } } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/ProjectionPropertyAttributeSource.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/ProjectionPropertyAttributeSource.cs index 863f65160..9bcdf7a6f 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/ProjectionPropertyAttributeSource.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/ProjectionPropertyAttributeSource.cs @@ -205,3 +205,4 @@ protected override IEnumerable GetDefaultAttributes() => return null; } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/ProjectionTypeAttributeSource.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/ProjectionTypeAttributeSource.cs index 49de2947e..505f5b5b3 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/ProjectionTypeAttributeSource.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AttributeSource/ProjectionTypeAttributeSource.cs @@ -112,3 +112,4 @@ private TableAttribute CreateTableAttribute() private ProjectionAttribute CreateProjectionAttribute() => new(this.SourceType, this.ProjectionValue.Role); } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/AutoProjectionFactory.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/AutoProjectionFactory.cs index 792558aaf..30863926c 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/AutoProjectionFactory.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/AutoProjectionFactory.cs @@ -1,7 +1,6 @@ using Anch.Core; using Framework.Core; - using Framework.Projection.Lambda.ProjectionBuilder; namespace Framework.Projection.Lambda.ProjectionSource.AutoProjection; @@ -57,9 +56,11 @@ private IEnumerable InternalCreateProperties(Type dom node.Children); yield return new ProjectionPropertyBuilder(environment, property.ToGetLambdaExpression(domainType), "_Auto") - { - ElementProjection = elementProjection, Role = ProjectionPropertyRole.AutoNode, IgnoreSerialization = true - }; + { + ElementProjection = elementProjection, + Role = ProjectionPropertyRole.AutoNode, + IgnoreSerialization = true + }; } else { @@ -68,10 +69,13 @@ private IEnumerable InternalCreateProperties(Type dom var lastPropertyValue = projectionPath.LastProperty; yield return new ProjectionPropertyBuilder(environment, projectionPath.PropertyPath.ToLambdaExpression(domainType), $"_Last_{lastPropertyValue.PropertyName}") - { - Role = ProjectionPropertyRole.LastAutoNode, IgnoreSerialization = true, ElementProjection = lastPropertyValue.ElementProjection - }; + { + Role = ProjectionPropertyRole.LastAutoNode, + IgnoreSerialization = true, + ElementProjection = lastPropertyValue.ElementProjection + }; } } } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/ProjectionLastNodeValue.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/ProjectionLastNodeValue.cs index 38e2f8564..f16e8e284 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/ProjectionLastNodeValue.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/ProjectionLastNodeValue.cs @@ -3,3 +3,4 @@ namespace Framework.Projection.Lambda.ProjectionSource.AutoProjection; internal record ProjectionLastNodeValue(PropertyInfo Property, LastProjectionProperty LastProperty) : ProjectionNodeValue(Property); + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/ProjectionNodeValue.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/ProjectionNodeValue.cs index 490f828c9..dfd932cf3 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/ProjectionNodeValue.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/ProjectionNodeValue.cs @@ -3,3 +3,4 @@ namespace Framework.Projection.Lambda.ProjectionSource.AutoProjection; internal record ProjectionNodeValue(PropertyInfo Property); + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/ProjectionPath.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/ProjectionPath.cs index de6a89196..322376066 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/ProjectionPath.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/ProjectionPath.cs @@ -1,6 +1,6 @@ using Framework.Core; - namespace Framework.Projection.Lambda.ProjectionSource.AutoProjection; internal record ProjectionPath(PropertyPath PropertyPath, LastProjectionProperty LastProperty); + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/PropertyNodeValueExtensions.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/PropertyNodeValueExtensions.cs index 72c5784a1..5d5a09ac0 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/PropertyNodeValueExtensions.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/AutoProjection/PropertyNodeValueExtensions.cs @@ -1,6 +1,5 @@ using Framework.Core; - namespace Framework.Projection.Lambda.ProjectionSource.AutoProjection; internal static class PropertyNodeValueExtensions @@ -47,3 +46,4 @@ public static IEnumerable ToPaths(this Node } } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/CreateAutoNodesProjectionSource.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/CreateAutoNodesProjectionSource.cs index 19cb77441..7a222ad38 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/CreateAutoNodesProjectionSource.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/CreateAutoNodesProjectionSource.cs @@ -24,3 +24,4 @@ public IEnumerable GetProjections() return builders.GetAllProjections(); } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/CreateSecurityNodesProjectionSource.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/CreateSecurityNodesProjectionSource.cs index c899b09a1..18b6ce568 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/CreateSecurityNodesProjectionSource.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/CreateSecurityNodesProjectionSource.cs @@ -55,13 +55,13 @@ private ProjectionBuilder.ProjectionBuilder FillSecurityProjection(Type sourceTy var name = $"{interfaceProp.Name}_Security"; projection.Properties.Add(new ProjectionPropertyBuilder(environment, implProp.ToGetLambdaExpression(sourceType)) - { - Role = ProjectionPropertyRole.Security, - Name = name, - IgnoreSerialization = true, - ElementProjection = securityProjections.GetValueOrDefault(implProp.PropertyType.GetCollectionOrArrayElementTypeOrSelf()), - VirtualExplicitInterfaceProperty = isExplicit ? interfaceProp : null - }); + { + Role = ProjectionPropertyRole.Security, + Name = name, + IgnoreSerialization = true, + ElementProjection = securityProjections.GetValueOrDefault(implProp.PropertyType.GetCollectionOrArrayElementTypeOrSelf()), + VirtualExplicitInterfaceProperty = isExplicit ? interfaceProp : null + }); } } @@ -122,3 +122,4 @@ from securityType in genSecurityType.GetGenericArguments() } } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/ExpandPathProjectionSource.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/ExpandPathProjectionSource.cs index df1dce7af..607d08909 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/ExpandPathProjectionSource.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/ExpandPathProjectionSource.cs @@ -31,3 +31,4 @@ public IEnumerable GetProjections() return builders.GetAllProjections(); } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/InjectAttributesProjectionSource.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/InjectAttributesProjectionSource.cs index 492bc211a..5c306b999 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/InjectAttributesProjectionSource.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/InjectAttributesProjectionSource.cs @@ -33,3 +33,4 @@ public IEnumerable GetProjections() return projections; } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/InjectMissedParentsProjectionSource.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/InjectMissedParentsProjectionSource.cs index 0c3446277..3212c6211 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/InjectMissedParentsProjectionSource.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/InjectMissedParentsProjectionSource.cs @@ -46,9 +46,11 @@ where projectionProperty.Path.SingleMaybe() foreach (var pair in missedParentRequest) { var newPropertyBuilder = new ProjectionPropertyBuilder(environment, pair.ParentProperty.ToGetLambdaExpression(pair.Projection.SourceType)) - { - Role = ProjectionPropertyRole.MissedParent, ElementProjection = pair.ParentProjection, IgnoreSerialization = true - }; + { + Role = ProjectionPropertyRole.MissedParent, + ElementProjection = pair.ParentProjection, + IgnoreSerialization = true + }; pair.Projection.Properties.Add(newPropertyBuilder); } @@ -56,3 +58,4 @@ where projectionProperty.Path.SingleMaybe() return builders; } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/ProjectionSource.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/ProjectionSource.cs index c8c50ecb4..89df9dfc5 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/ProjectionSource.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/ProjectionSource.cs @@ -33,3 +33,4 @@ protected IEnumerable GetInternalProjections() } } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/VerifyUniqueProjectionSource.cs b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/VerifyUniqueProjectionSource.cs index d1f3dfc8f..3fe177576 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/VerifyUniqueProjectionSource.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/ProjectionSource/VerifyUniqueProjectionSource.cs @@ -28,3 +28,4 @@ public IEnumerable GetProjections() return projections; } } + diff --git a/src/Projection/Framework.Projection.Runtime/Lambda/TypeReferenceBase.cs b/src/Projection/Framework.Projection.Runtime/Lambda/TypeReferenceBase.cs index 5e16b49a9..34266ed56 100644 --- a/src/Projection/Framework.Projection.Runtime/Lambda/TypeReferenceBase.cs +++ b/src/Projection/Framework.Projection.Runtime/Lambda/TypeReferenceBase.cs @@ -96,3 +96,4 @@ public override TypeReferenceBase TryOverrideElementProjection(Func lazyIdentityProperty; - protected ProjectionEnvironmentBase(IMetadataProxyProvider metadataProxyProvider ) + protected ProjectionEnvironmentBase(IMetadataProxyProvider metadataProxyProvider) { this.MetadataProxyProvider = metadataProxyProvider; this.lazyIdentityProperty = LazyHelper.Create(this.GetIdentityProperty); } - public IMetadataProxyProvider MetadataProxyProvider { get; } + public IMetadataProxyProvider MetadataProxyProvider { get; } public abstract string Namespace { get; } @@ -59,3 +59,4 @@ public bool IsPersistent(Type type) return this.PersistentDomainObjectBaseType.IsAssignableFrom(type); } } + diff --git a/src/Subscriptions/Framework.Subscriptions.Abstractions/ISubscriptionResolver.cs b/src/Subscriptions/Framework.Subscriptions.Abstractions/ISubscriptionResolver.cs index e37ab5745..741418550 100644 --- a/src/Subscriptions/Framework.Subscriptions.Abstractions/ISubscriptionResolver.cs +++ b/src/Subscriptions/Framework.Subscriptions.Abstractions/ISubscriptionResolver.cs @@ -11,3 +11,4 @@ public interface ISubscriptionResolver ImmutableArray Resolve(Type domainType, DomainObjectChangeType domainObjectChangeType); } + diff --git a/src/Subscriptions/Framework.Subscriptions.Abstractions/ISubscriptionService.cs b/src/Subscriptions/Framework.Subscriptions.Abstractions/ISubscriptionService.cs index 40a23fa94..78996e14f 100644 --- a/src/Subscriptions/Framework.Subscriptions.Abstractions/ISubscriptionService.cs +++ b/src/Subscriptions/Framework.Subscriptions.Abstractions/ISubscriptionService.cs @@ -7,3 +7,4 @@ public interface ISubscriptionService { IEnumerable> Process(DomainObjectVersions versions); } + diff --git a/src/Subscriptions/Framework.Subscriptions.Metadata/IMessageTemplate.cs b/src/Subscriptions/Framework.Subscriptions.Metadata/IMessageTemplate.cs index 50de9a644..cbf4bdb91 100644 --- a/src/Subscriptions/Framework.Subscriptions.Metadata/IMessageTemplate.cs +++ b/src/Subscriptions/Framework.Subscriptions.Metadata/IMessageTemplate.cs @@ -7,3 +7,4 @@ public interface IMessageTemplate { (string Subject, string Body) Render(IServiceProvider serviceProvider, DomainObjectVersions versions); } + diff --git a/src/Subscriptions/Framework.Subscriptions.Metadata/ISubscription.cs b/src/Subscriptions/Framework.Subscriptions.Metadata/ISubscription.cs index 19c9e1f18..2b3d429d7 100644 --- a/src/Subscriptions/Framework.Subscriptions.Metadata/ISubscription.cs +++ b/src/Subscriptions/Framework.Subscriptions.Metadata/ISubscription.cs @@ -1,11 +1,11 @@ using System.Collections.Immutable; using System.Net.Mail; -using Framework.Subscriptions.Domain; - using Anch.SecuritySystem; using Anch.SecuritySystem.Notification.Domain; +using Framework.Subscriptions.Domain; + namespace Framework.Subscriptions.Metadata; public interface ISubscription : ISubscription @@ -96,3 +96,4 @@ public interface ISubscription /// ImmutableArray SecurityRoles { get; } } + diff --git a/src/Subscriptions/Framework.Subscriptions.Metadata/NotificationMessageGenerationInfo.cs b/src/Subscriptions/Framework.Subscriptions.Metadata/NotificationMessageGenerationInfo.cs index bd3660d9c..251af2ad7 100644 --- a/src/Subscriptions/Framework.Subscriptions.Metadata/NotificationMessageGenerationInfo.cs +++ b/src/Subscriptions/Framework.Subscriptions.Metadata/NotificationMessageGenerationInfo.cs @@ -22,3 +22,4 @@ private static IEnumerable CreateMany(string emails) => public record NotificationMessageGenerationInfo(ImmutableHashSet Recipients, DomainObjectVersions Versions) where TRenderingObject : class; + diff --git a/src/Subscriptions/Framework.Subscriptions.Metadata/RazorTemplate.cs b/src/Subscriptions/Framework.Subscriptions.Metadata/RazorTemplate.cs index 106ad1d9f..c801df226 100644 --- a/src/Subscriptions/Framework.Subscriptions.Metadata/RazorTemplate.cs +++ b/src/Subscriptions/Framework.Subscriptions.Metadata/RazorTemplate.cs @@ -54,3 +54,4 @@ public abstract partial class RazorTemplate : IMessageTemplate protected record RenderingState(StringWriter Writer, IServiceProvider ServiceProvider, DomainObjectVersions Versions); } + diff --git a/src/Subscriptions/Framework.Subscriptions.Metadata/Subscription.cs b/src/Subscriptions/Framework.Subscriptions.Metadata/Subscription.cs index 739564a66..6f9c56f0e 100644 --- a/src/Subscriptions/Framework.Subscriptions.Metadata/Subscription.cs +++ b/src/Subscriptions/Framework.Subscriptions.Metadata/Subscription.cs @@ -2,14 +2,13 @@ using System.Net.Mail; using Anch.Core; +using Anch.SecuritySystem; +using Anch.SecuritySystem.Notification.Domain; using Framework.Subscriptions.Domain; using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem; -using Anch.SecuritySystem.Notification.Domain; - namespace Framework.Subscriptions.Metadata; @@ -59,3 +58,4 @@ public virtual IEnumerable> public virtual IEnumerable GetAttachments(IServiceProvider serviceProvider, DomainObjectVersions versions) => []; } + diff --git a/src/Subscriptions/Framework.Subscriptions.Runtime/EmployeeEmailExtractor.cs b/src/Subscriptions/Framework.Subscriptions.Runtime/EmployeeEmailExtractor.cs index 38a7cd19a..74b64d0bf 100644 --- a/src/Subscriptions/Framework.Subscriptions.Runtime/EmployeeEmailExtractor.cs +++ b/src/Subscriptions/Framework.Subscriptions.Runtime/EmployeeEmailExtractor.cs @@ -1,14 +1,12 @@ using System.Collections.Immutable; using Anch.Core; -using Anch.GenericRepository; -using Anch.VisualIdentitySource; - using Anch.GenericQueryable; - +using Anch.GenericRepository; using Anch.SecuritySystem; using Anch.SecuritySystem.Notification; using Anch.SecuritySystem.Notification.Domain; +using Anch.VisualIdentitySource; namespace Framework.Subscriptions; @@ -36,3 +34,4 @@ public ImmutableHashSet GetEmails(ImmutableArray securityR .ToImmutableHashSetAsync(ct); }); } + diff --git a/src/Subscriptions/Framework.Subscriptions.Runtime/EmployeeInfo.cs b/src/Subscriptions/Framework.Subscriptions.Runtime/EmployeeInfo.cs index 0c4c832c9..fa0550cc9 100644 --- a/src/Subscriptions/Framework.Subscriptions.Runtime/EmployeeInfo.cs +++ b/src/Subscriptions/Framework.Subscriptions.Runtime/EmployeeInfo.cs @@ -3,3 +3,4 @@ namespace Framework.Subscriptions; public record EmployeeInfo(PropertyAccessors Email); + diff --git a/src/Subscriptions/Framework.Subscriptions.Runtime/IEmployeeEmailExtractor.cs b/src/Subscriptions/Framework.Subscriptions.Runtime/IEmployeeEmailExtractor.cs index 0082532f6..a81ff23a9 100644 --- a/src/Subscriptions/Framework.Subscriptions.Runtime/IEmployeeEmailExtractor.cs +++ b/src/Subscriptions/Framework.Subscriptions.Runtime/IEmployeeEmailExtractor.cs @@ -9,3 +9,4 @@ public interface IEmployeeEmailExtractor { ImmutableHashSet GetEmails(ImmutableArray securityRoles, ImmutableArray notificationFilterGroups); } + diff --git a/src/Subscriptions/Framework.Subscriptions.Runtime/INotificationExtractor.cs b/src/Subscriptions/Framework.Subscriptions.Runtime/INotificationExtractor.cs index c6e3037ac..15141f584 100644 --- a/src/Subscriptions/Framework.Subscriptions.Runtime/INotificationExtractor.cs +++ b/src/Subscriptions/Framework.Subscriptions.Runtime/INotificationExtractor.cs @@ -6,3 +6,4 @@ public interface INotificationExtractor { IEnumerable GetNotifications(DomainObjectVersions versions); } + diff --git a/src/Subscriptions/Framework.Subscriptions.Runtime/InlineAttachmentHelper.cs b/src/Subscriptions/Framework.Subscriptions.Runtime/InlineAttachmentHelper.cs index 3c98eb651..76b92cdac 100644 --- a/src/Subscriptions/Framework.Subscriptions.Runtime/InlineAttachmentHelper.cs +++ b/src/Subscriptions/Framework.Subscriptions.Runtime/InlineAttachmentHelper.cs @@ -15,3 +15,4 @@ private static string ReplaceSrcByName(string body, string name, string contentI return Regex.Replace(body, pattern, $"src=\"cid:{contentId}\"", RegexOptions.IgnoreCase); } } + diff --git a/src/Subscriptions/Framework.Subscriptions.Runtime/NotificationExtractor.cs b/src/Subscriptions/Framework.Subscriptions.Runtime/NotificationExtractor.cs index 8c76e25d0..9fe7be5b6 100644 --- a/src/Subscriptions/Framework.Subscriptions.Runtime/NotificationExtractor.cs +++ b/src/Subscriptions/Framework.Subscriptions.Runtime/NotificationExtractor.cs @@ -60,14 +60,14 @@ private MailMessage ToMailMessage(NotificationMessageGenerationInfo> GetMerg select new NotificationMessageGenerationInfo([.. resultRecipients], g.Key); } + diff --git a/src/Subscriptions/Framework.Subscriptions.Runtime/NotificationMessageGenerationInfoExtensions.cs b/src/Subscriptions/Framework.Subscriptions.Runtime/NotificationMessageGenerationInfoExtensions.cs index 5cff9420b..a7e54f049 100644 --- a/src/Subscriptions/Framework.Subscriptions.Runtime/NotificationMessageGenerationInfoExtensions.cs +++ b/src/Subscriptions/Framework.Subscriptions.Runtime/NotificationMessageGenerationInfoExtensions.cs @@ -31,3 +31,4 @@ from recipient in g group recipient by g.Key; } + diff --git a/src/Subscriptions/Framework.Subscriptions.Runtime/RecipientExtensions.cs b/src/Subscriptions/Framework.Subscriptions.Runtime/RecipientExtensions.cs index 6e5540043..820f576ed 100644 --- a/src/Subscriptions/Framework.Subscriptions.Runtime/RecipientExtensions.cs +++ b/src/Subscriptions/Framework.Subscriptions.Runtime/RecipientExtensions.cs @@ -30,3 +30,4 @@ public static IEnumerable GetEmailMergeResult(this IEnumerable r } } } + diff --git a/src/Subscriptions/Framework.Subscriptions.Runtime/SubscriptionResolver.cs b/src/Subscriptions/Framework.Subscriptions.Runtime/SubscriptionResolver.cs index c16658c48..1f9fea705 100644 --- a/src/Subscriptions/Framework.Subscriptions.Runtime/SubscriptionResolver.cs +++ b/src/Subscriptions/Framework.Subscriptions.Runtime/SubscriptionResolver.cs @@ -21,3 +21,4 @@ public class SubscriptionResolver(IEnumerable subscriptions) : IS public ImmutableArray Resolve(Type domainType, DomainObjectChangeType domainObjectChangeType) => this.cache.GetValueOrDefault((domainType, domainObjectChangeType), []); } + diff --git a/src/Subscriptions/Framework.Subscriptions.Runtime/SubscriptionService.cs b/src/Subscriptions/Framework.Subscriptions.Runtime/SubscriptionService.cs index 0f62e3d12..b533abcde 100644 --- a/src/Subscriptions/Framework.Subscriptions.Runtime/SubscriptionService.cs +++ b/src/Subscriptions/Framework.Subscriptions.Runtime/SubscriptionService.cs @@ -31,3 +31,4 @@ public IEnumerable> Process(DomainObjectVersions } } } + diff --git a/src/Subscriptions/Framework.Subscriptions/DependencyInjection/ServiceCollectionExtensions.cs b/src/Subscriptions/Framework.Subscriptions/DependencyInjection/ServiceCollectionExtensions.cs index c7fc49101..6d3d4e305 100644 --- a/src/Subscriptions/Framework.Subscriptions/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Subscriptions/Framework.Subscriptions/DependencyInjection/ServiceCollectionExtensions.cs @@ -51,3 +51,4 @@ public void AddSubscriptions( } } } + diff --git a/src/Validation/Framework.Validation.Abstractions/IValidator.cs b/src/Validation/Framework.Validation.Abstractions/IValidator.cs index 596cdd2a4..969e05278 100644 --- a/src/Validation/Framework.Validation.Abstractions/IValidator.cs +++ b/src/Validation/Framework.Validation.Abstractions/IValidator.cs @@ -6,3 +6,4 @@ public interface IValidator { ValidationResult GetValidationResult(TSource source, int operationContext = int.MaxValue, IValidationState? ownerState = null); } + diff --git a/src/Validation/Framework.Validation.Abstractions/Map/IClassValidationMap.cs b/src/Validation/Framework.Validation.Abstractions/Map/IClassValidationMap.cs index adaa72fe0..16190ff93 100644 --- a/src/Validation/Framework.Validation.Abstractions/Map/IClassValidationMap.cs +++ b/src/Validation/Framework.Validation.Abstractions/Map/IClassValidationMap.cs @@ -20,7 +20,7 @@ public interface IClassValidationMap /// /// Список валидируемых свойств /// - IReadOnlyCollection PropertyMaps { get; } + IReadOnlyCollection PropertyMaps { get; } } /// @@ -34,3 +34,4 @@ public interface IClassValidationMap : IClassValidationMap, IValidat /// new IReadOnlyCollection> PropertyMaps { get; } } + diff --git a/src/Validation/Framework.Validation.Abstractions/Map/IPropertyValidationMap.cs b/src/Validation/Framework.Validation.Abstractions/Map/IPropertyValidationMap.cs index 11e2eb872..7499198b6 100644 --- a/src/Validation/Framework.Validation.Abstractions/Map/IPropertyValidationMap.cs +++ b/src/Validation/Framework.Validation.Abstractions/Map/IPropertyValidationMap.cs @@ -91,3 +91,4 @@ public interface ICollectionPropertyValidationMap new IClassValidationMap PropertyTypeMap { get; } } + diff --git a/src/Validation/Framework.Validation.Abstractions/Map/IValidationMap.cs b/src/Validation/Framework.Validation.Abstractions/Map/IValidationMap.cs index 7ed1c58cb..c1ad8abb7 100644 --- a/src/Validation/Framework.Validation.Abstractions/Map/IValidationMap.cs +++ b/src/Validation/Framework.Validation.Abstractions/Map/IValidationMap.cs @@ -6,3 +6,4 @@ public interface IValidationMap : IServiceProviderContainer { IClassValidationMap GetClassMap(Type type); } + diff --git a/src/Validation/Framework.Validation.Abstractions/Result/ValidationResult.cs b/src/Validation/Framework.Validation.Abstractions/Result/ValidationResult.cs index 247605fd8..ecb7228c6 100644 --- a/src/Validation/Framework.Validation.Abstractions/Result/ValidationResult.cs +++ b/src/Validation/Framework.Validation.Abstractions/Result/ValidationResult.cs @@ -106,3 +106,4 @@ public static ValidationResult CreateError(ValidationExceptionBase exception) } } } + diff --git a/src/Validation/Framework.Validation.Abstractions/Result/ValidationResultExtensions.cs b/src/Validation/Framework.Validation.Abstractions/Result/ValidationResultExtensions.cs index 0b332d524..b0a58f5c9 100644 --- a/src/Validation/Framework.Validation.Abstractions/Result/ValidationResultExtensions.cs +++ b/src/Validation/Framework.Validation.Abstractions/Result/ValidationResultExtensions.cs @@ -36,3 +36,4 @@ internal static ValidationResult Apply(this ValidationResult validationResult, I : validationResult; } } + diff --git a/src/Validation/Framework.Validation.Abstractions/SuccessValidator.cs b/src/Validation/Framework.Validation.Abstractions/SuccessValidator.cs index 30d902624..73dd0365c 100644 --- a/src/Validation/Framework.Validation.Abstractions/SuccessValidator.cs +++ b/src/Validation/Framework.Validation.Abstractions/SuccessValidator.cs @@ -6,3 +6,4 @@ public class SuccessValidator : ValidatorBase { public override ValidationResult GetValidationResult(TSource source, int operationContext = int.MaxValue, IValidationState ownerState = null) => ValidationResult.Success; } + diff --git a/src/Validation/Framework.Validation.Abstractions/ValidationContext/ClassValidationContextExtensions.cs b/src/Validation/Framework.Validation.Abstractions/ValidationContext/ClassValidationContextExtensions.cs index 157a62f75..e5182ccfa 100644 --- a/src/Validation/Framework.Validation.Abstractions/ValidationContext/ClassValidationContextExtensions.cs +++ b/src/Validation/Framework.Validation.Abstractions/ValidationContext/ClassValidationContextExtensions.cs @@ -87,3 +87,4 @@ public BoxedClassValidationContext(IClassValidationContext baseCont public IServiceProvider ServiceProvider { get; } } } + diff --git a/src/Validation/Framework.Validation.Abstractions/ValidationContext/IClassValidationContext.cs b/src/Validation/Framework.Validation.Abstractions/ValidationContext/IClassValidationContext.cs index cae4f63f7..a50cad36c 100644 --- a/src/Validation/Framework.Validation.Abstractions/ValidationContext/IClassValidationContext.cs +++ b/src/Validation/Framework.Validation.Abstractions/ValidationContext/IClassValidationContext.cs @@ -4,3 +4,4 @@ namespace Framework.Validation; public interface IClassValidationContext : IValidationContext; + diff --git a/src/Validation/Framework.Validation.Abstractions/ValidationContext/IPropertyValidationContext.cs b/src/Validation/Framework.Validation.Abstractions/ValidationContext/IPropertyValidationContext.cs index 7693c5943..652c9ec4f 100644 --- a/src/Validation/Framework.Validation.Abstractions/ValidationContext/IPropertyValidationContext.cs +++ b/src/Validation/Framework.Validation.Abstractions/ValidationContext/IPropertyValidationContext.cs @@ -7,3 +7,4 @@ public interface IPropertyValidationContext : IValid { TProperty Value { get; } } + diff --git a/src/Validation/Framework.Validation.Abstractions/ValidationContext/IValidationContext.cs b/src/Validation/Framework.Validation.Abstractions/ValidationContext/IValidationContext.cs index 7f554d24e..4c188dcb0 100644 --- a/src/Validation/Framework.Validation.Abstractions/ValidationContext/IValidationContext.cs +++ b/src/Validation/Framework.Validation.Abstractions/ValidationContext/IValidationContext.cs @@ -21,3 +21,4 @@ public interface IValidationContext : IValidationContextBaseМетаданные public interface IValidationContext : IValidationContext, IValidationContextBase where TValidationMap : class; + diff --git a/src/Validation/Framework.Validation.Abstractions/ValidationContext/IValidationContextBase.cs b/src/Validation/Framework.Validation.Abstractions/ValidationContext/IValidationContextBase.cs index 942d45a8c..a6764701c 100644 --- a/src/Validation/Framework.Validation.Abstractions/ValidationContext/IValidationContextBase.cs +++ b/src/Validation/Framework.Validation.Abstractions/ValidationContext/IValidationContextBase.cs @@ -34,3 +34,4 @@ public interface IValidationContextBase : IVali { TValidationMap Map { get; } } + diff --git a/src/Validation/Framework.Validation.Abstractions/ValidatorBase.cs b/src/Validation/Framework.Validation.Abstractions/ValidatorBase.cs index 8a4632b3f..4d4e07b7f 100644 --- a/src/Validation/Framework.Validation.Abstractions/ValidatorBase.cs +++ b/src/Validation/Framework.Validation.Abstractions/ValidatorBase.cs @@ -9,3 +9,4 @@ public abstract class ValidatorBase : IValidator public static readonly IValidator Success = new SuccessValidator(); } + diff --git a/src/Validation/Framework.Validation.Abstractions/Validators/IDynamicValidator.cs b/src/Validation/Framework.Validation.Abstractions/Validators/IDynamicValidator.cs index ad8841653..4b66df959 100644 --- a/src/Validation/Framework.Validation.Abstractions/Validators/IDynamicValidator.cs +++ b/src/Validation/Framework.Validation.Abstractions/Validators/IDynamicValidator.cs @@ -64,3 +64,4 @@ public static class DynamicValidatorExtensions return dynamicValidator.GetValidator(type, serviceProvider).Maybe(typeValidator => typeValidator.GetLastClassValidator(type, serviceProvider)); } } + diff --git a/src/Validation/Framework.Validation.Abstractions/_Exceptions/AggregateValidationException.cs b/src/Validation/Framework.Validation.Abstractions/_Exceptions/AggregateValidationException.cs index 6add6a79e..a1deb2005 100644 --- a/src/Validation/Framework.Validation.Abstractions/_Exceptions/AggregateValidationException.cs +++ b/src/Validation/Framework.Validation.Abstractions/_Exceptions/AggregateValidationException.cs @@ -21,3 +21,4 @@ public AggregateValidationException(IEnumerable innerEx public override string ToString() => new AggregateException(this.InnerExceptions).ToString(); } + diff --git a/src/Validation/Framework.Validation.Domain/RestrictionExtensionAttribute.cs b/src/Validation/Framework.Validation.Domain/RestrictionExtensionAttribute.cs index 0a7263e58..d0afc7be8 100644 --- a/src/Validation/Framework.Validation.Domain/RestrictionExtensionAttribute.cs +++ b/src/Validation/Framework.Validation.Domain/RestrictionExtensionAttribute.cs @@ -26,3 +26,4 @@ public RestrictionExtensionAttribute(Type attributeType) public object? CustomError { get; set; } } + diff --git a/src/Validation/Framework.Validation.Domain/TypeExtensions.cs b/src/Validation/Framework.Validation.Domain/TypeExtensions.cs index e6c83b04e..4ebf3f21d 100644 --- a/src/Validation/Framework.Validation.Domain/TypeExtensions.cs +++ b/src/Validation/Framework.Validation.Domain/TypeExtensions.cs @@ -20,3 +20,4 @@ public static string GetValidationName(this PropertyInfo property) return property.GetCustomAttribute().Maybe(v => v.Name) ?? property.Name; } } + diff --git a/src/Validation/Framework.Validation.Tests/ExpandValidationTest.cs b/src/Validation/Framework.Validation.Tests/ExpandValidationTest.cs index 77e2c5fa1..d3925044f 100644 --- a/src/Validation/Framework.Validation.Tests/ExpandValidationTest.cs +++ b/src/Validation/Framework.Validation.Tests/ExpandValidationTest.cs @@ -15,7 +15,7 @@ public void ExpandValidation_CheckCompositeProperty_ErrorContainsFullPropertyPat .AddSingleton() .AddSingleton() .AddSingleton() - .BuildServiceProvider(new ServiceProviderOptions{ ValidateScopes = true, ValidateOnBuild = true }); + .BuildServiceProvider(new ServiceProviderOptions { ValidateScopes = true, ValidateOnBuild = true }); var validator = sp.GetRequiredService(); @@ -42,3 +42,4 @@ public class TestCompositeClass [RequiredValidator] public string SomeProperty { get; set; } } + diff --git a/src/Validation/Framework.Validation.Tests/MaxStringLengthValidatorTest.cs b/src/Validation/Framework.Validation.Tests/MaxStringLengthValidatorTest.cs index 9486d1a5b..ebf3de7cd 100644 --- a/src/Validation/Framework.Validation.Tests/MaxStringLengthValidatorTest.cs +++ b/src/Validation/Framework.Validation.Tests/MaxStringLengthValidatorTest.cs @@ -76,3 +76,4 @@ public void GetValidationResult_NullContext_ThrowArgumentNullException() Assert.Throws(TestDelegate); } } + diff --git a/src/Validation/Framework.Validation.Tests/RangePropertyValidatorTests.cs b/src/Validation/Framework.Validation.Tests/RangePropertyValidatorTests.cs index dd91e95ba..280ef722b 100644 --- a/src/Validation/Framework.Validation.Tests/RangePropertyValidatorTests.cs +++ b/src/Validation/Framework.Validation.Tests/RangePropertyValidatorTests.cs @@ -86,3 +86,4 @@ public void GetValidationResult_DecimalValidatorMaxNegativeValueMinusOne_Failure Assert.Equal("decimal has Number value was too overflow for a decimal", result.Errors[0].Message); } } + diff --git a/src/Validation/Framework.Validation.Tests/SignValueValidatorTest.cs b/src/Validation/Framework.Validation.Tests/SignValueValidatorTest.cs index 3af49592e..61c5996ee 100644 --- a/src/Validation/Framework.Validation.Tests/SignValueValidatorTest.cs +++ b/src/Validation/Framework.Validation.Tests/SignValueValidatorTest.cs @@ -212,3 +212,4 @@ public void GetValidationResult_NullContext_ThrowArgumentNullException() Assert.Throws(TestDelegate); } } + diff --git a/src/Validation/Framework.Validation/Attributes/AnyElementsValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/AnyElementsValidatorAttribute.cs index 019e1f809..b8b434806 100644 --- a/src/Validation/Framework.Validation/Attributes/AnyElementsValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/AnyElementsValidatorAttribute.cs @@ -39,3 +39,4 @@ public ValidationResult GetValidationResult(IPropertyValidationContext $"Collection {context.GetPropertyTypeName()} of {context.GetSourceTypeName()} can't be empty"); } } + diff --git a/src/Validation/Framework.Validation/Attributes/Available/DefaultStringMaxLengthValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/Available/DefaultStringMaxLengthValidatorAttribute.cs index a6076d128..974d6e590 100644 --- a/src/Validation/Framework.Validation/Attributes/Available/DefaultStringMaxLengthValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/Available/DefaultStringMaxLengthValidatorAttribute.cs @@ -10,3 +10,4 @@ public class DefaultStringMaxLengthValidatorAttribute : ClassValidatorAttribute { public override IClassValidator CreateValidator() => DefaultStringMaxLengthValidator.Value; } + diff --git a/src/Validation/Framework.Validation/Attributes/Available/Range/AvailableDateTimeValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/Available/Range/AvailableDateTimeValidatorAttribute.cs index 3e46c2662..78baf1d75 100644 --- a/src/Validation/Framework.Validation/Attributes/Available/Range/AvailableDateTimeValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/Available/Range/AvailableDateTimeValidatorAttribute.cs @@ -7,3 +7,4 @@ public class AvailableDateTimeValidatorAttribute : ClassValidatorAttribute { public override IClassValidator CreateValidator() => AvailableDateTimeValidator.Value; } + diff --git a/src/Validation/Framework.Validation/Attributes/Available/Range/AvailableDecimalValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/Available/Range/AvailableDecimalValidatorAttribute.cs index ca56dc76b..c0820aee6 100644 --- a/src/Validation/Framework.Validation/Attributes/Available/Range/AvailableDecimalValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/Available/Range/AvailableDecimalValidatorAttribute.cs @@ -7,3 +7,4 @@ public class AvailableDecimalValidatorAttribute : ClassValidatorAttribute { public override IClassValidator CreateValidator() => AvailableDecimalValidator.Value; } + diff --git a/src/Validation/Framework.Validation/Attributes/Available/Range/AvailablePeriodValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/Available/Range/AvailablePeriodValidatorAttribute.cs index 3fee4083b..68f6fd43c 100644 --- a/src/Validation/Framework.Validation/Attributes/Available/Range/AvailablePeriodValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/Available/Range/AvailablePeriodValidatorAttribute.cs @@ -7,3 +7,4 @@ public class AvailablePeriodValidatorAttribute : ClassValidatorAttribute { public override IClassValidator CreateValidator() => AvailablePeriodValidator.Value; } + diff --git a/src/Validation/Framework.Validation/Attributes/EnglishAlphabetValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/EnglishAlphabetValidatorAttribute.cs index 5b6eca645..aaf339330 100644 --- a/src/Validation/Framework.Validation/Attributes/EnglishAlphabetValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/EnglishAlphabetValidatorAttribute.cs @@ -10,3 +10,4 @@ public class EnglishAlphabetValidatorAttribute : PropertyValidatorAttribute public override IPropertyValidator CreateValidator() => new EnglishAlphabetValidator(this.ExternalChars); } + diff --git a/src/Validation/Framework.Validation/Attributes/Int64ValueValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/Int64ValueValidatorAttribute.cs index f08da38f0..fc3a09d9a 100644 --- a/src/Validation/Framework.Validation/Attributes/Int64ValueValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/Int64ValueValidatorAttribute.cs @@ -12,3 +12,4 @@ public class Int64ValueValidatorAttribute : PropertyValidatorAttribute public override IPropertyValidator CreateValidator() => new Int64ValueValidator(this.Min, this.Max); } + diff --git a/src/Validation/Framework.Validation/Attributes/IntValueValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/IntValueValidatorAttribute.cs index 86fc1f692..4939fa41e 100644 --- a/src/Validation/Framework.Validation/Attributes/IntValueValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/IntValueValidatorAttribute.cs @@ -12,3 +12,4 @@ public class IntValueValidatorAttribute : PropertyValidatorAttribute public override IPropertyValidator CreateValidator() => new IntValueValidator(this.Min, this.Max); } + diff --git a/src/Validation/Framework.Validation/Attributes/MaxLengthValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/MaxLengthValidatorAttribute.cs index e7914ca6d..9b5e99447 100644 --- a/src/Validation/Framework.Validation/Attributes/MaxLengthValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/MaxLengthValidatorAttribute.cs @@ -10,3 +10,4 @@ public class MaxLengthValidatorAttribute : PropertyValidatorAttribute public override IPropertyValidator CreateValidator() => new MaxLengthValidator(this.MaxLength); } + diff --git a/src/Validation/Framework.Validation/Attributes/NumberAlphabetValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/NumberAlphabetValidatorAttribute.cs index 6bd05fd19..74931f9f5 100644 --- a/src/Validation/Framework.Validation/Attributes/NumberAlphabetValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/NumberAlphabetValidatorAttribute.cs @@ -10,3 +10,4 @@ public class NumberAlphabetValidatorAttribute : PropertyValidatorAttribute public override IPropertyValidator CreateValidator() => new NumberAlphabetValidator(this.ExternalChars); } + diff --git a/src/Validation/Framework.Validation/Attributes/Primitive/PrimitiveClassValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/Primitive/PrimitiveClassValidatorAttribute.cs index 6149839bb..8e70a7af4 100644 --- a/src/Validation/Framework.Validation/Attributes/Primitive/PrimitiveClassValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/Primitive/PrimitiveClassValidatorAttribute.cs @@ -17,3 +17,4 @@ public IClassValidator GetValidator(Type _, IServiceProvider serviceProvider) => serviceProvider.GetRequiredService().Create(validatorType); } } + diff --git a/src/Validation/Framework.Validation/Attributes/Primitive/PrimitivePropertyValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/Primitive/PrimitivePropertyValidatorAttribute.cs index c8961f4a3..8474e18a9 100644 --- a/src/Validation/Framework.Validation/Attributes/Primitive/PrimitivePropertyValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/Primitive/PrimitivePropertyValidatorAttribute.cs @@ -19,3 +19,4 @@ public IPropertyValidator GetValidator(PropertyInfo _, IServiceProvider serviceP serviceProvider.GetRequiredService().Create(validatorType); } } + diff --git a/src/Validation/Framework.Validation/Attributes/RequiredGroupValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/RequiredGroupValidatorAttribute.cs index 365a6d149..45db6c347 100644 --- a/src/Validation/Framework.Validation/Attributes/RequiredGroupValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/RequiredGroupValidatorAttribute.cs @@ -12,3 +12,4 @@ public class RequiredGroupValidatorAttribute(RequiredGroupValidatorMode mode) : public override IClassValidator CreateValidator() => new RequiredGroupValidator(this.Mode, this.GroupKey); } + diff --git a/src/Validation/Framework.Validation/Attributes/RequiredValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/RequiredValidatorAttribute.cs index 7cc0d7746..1bc9300fb 100644 --- a/src/Validation/Framework.Validation/Attributes/RequiredValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/RequiredValidatorAttribute.cs @@ -10,3 +10,4 @@ public class RequiredValidatorAttribute : PropertyValidatorAttribute public RequiredMode Mode { get; set; } } + diff --git a/src/Validation/Framework.Validation/Attributes/SignValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/SignValidatorAttribute.cs index 2ad233b11..adb9de64c 100644 --- a/src/Validation/Framework.Validation/Attributes/SignValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/SignValidatorAttribute.cs @@ -9,3 +9,4 @@ public class SignValidatorAttribute(SignType expectedPropertyValueSignType) : Pr public override IPropertyValidator CreateValidator() => new SignValidator(this.ExpectedPropertyValueSignType); } + diff --git a/src/Validation/Framework.Validation/Attributes/UniqueCollectionValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/UniqueCollectionValidatorAttribute.cs index a70bc86d8..d316c0bb4 100644 --- a/src/Validation/Framework.Validation/Attributes/UniqueCollectionValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/UniqueCollectionValidatorAttribute.cs @@ -9,5 +9,6 @@ public class UniqueCollectionValidatorAttribute : PropertyValidatorAttribute public string GroupKey { get; set; } - public override IPropertyValidator CreateValidator() => new UniqueCollectionValidator (this.GroupKey); + public override IPropertyValidator CreateValidator() => new UniqueCollectionValidator(this.GroupKey); } + diff --git a/src/Validation/Framework.Validation/Attributes/_Base/ClassValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/_Base/ClassValidatorAttribute.cs index b03219cbc..508444d5d 100644 --- a/src/Validation/Framework.Validation/Attributes/_Base/ClassValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/_Base/ClassValidatorAttribute.cs @@ -14,3 +14,4 @@ protected ClassValidatorAttribute() public abstract IClassValidator CreateValidator(); } + diff --git a/src/Validation/Framework.Validation/Attributes/_Base/PropertyValidatorAttribute.cs b/src/Validation/Framework.Validation/Attributes/_Base/PropertyValidatorAttribute.cs index b3e8e69bc..752d6e408 100644 --- a/src/Validation/Framework.Validation/Attributes/_Base/PropertyValidatorAttribute.cs +++ b/src/Validation/Framework.Validation/Attributes/_Base/PropertyValidatorAttribute.cs @@ -14,3 +14,4 @@ protected PropertyValidatorAttribute() public abstract IPropertyValidator CreateValidator(); } + diff --git a/src/Validation/Framework.Validation/AvailableValues.cs b/src/Validation/Framework.Validation/AvailableValues.cs index 9457f5072..a05b92623 100644 --- a/src/Validation/Framework.Validation/AvailableValues.cs +++ b/src/Validation/Framework.Validation/AvailableValues.cs @@ -1,6 +1,6 @@ -using Framework.Core; +using Anch.Core; -using Anch.Core; +using Framework.Core; namespace Framework.Validation; @@ -24,3 +24,4 @@ private class InfinityAvailableValues : IAvailableValues public int GetAvailableSize() => int.MaxValue; } } + diff --git a/src/Validation/Framework.Validation/Extensions/CustomAttributeProviderExtensions.cs b/src/Validation/Framework.Validation/Extensions/CustomAttributeProviderExtensions.cs index d248423f7..550a01baa 100644 --- a/src/Validation/Framework.Validation/Extensions/CustomAttributeProviderExtensions.cs +++ b/src/Validation/Framework.Validation/Extensions/CustomAttributeProviderExtensions.cs @@ -47,3 +47,4 @@ public IEnumerable TryGetRestrictionValidatorAttribu } } } + diff --git a/src/Validation/Framework.Validation/Extensions/PropertyInfoExtensions.cs b/src/Validation/Framework.Validation/Extensions/PropertyInfoExtensions.cs index a4e702c5e..07cb33048 100644 --- a/src/Validation/Framework.Validation/Extensions/PropertyInfoExtensions.cs +++ b/src/Validation/Framework.Validation/Extensions/PropertyInfoExtensions.cs @@ -52,3 +52,4 @@ public static bool HasDeepValidation(this PropertyInfo property) } } } + diff --git a/src/Validation/Framework.Validation/Extensions/TypeExtensions.cs b/src/Validation/Framework.Validation/Extensions/TypeExtensions.cs index 739a25ccd..3b7f58814 100644 --- a/src/Validation/Framework.Validation/Extensions/TypeExtensions.cs +++ b/src/Validation/Framework.Validation/Extensions/TypeExtensions.cs @@ -58,3 +58,4 @@ internal static bool IsCoreType(this Type type) return type.Assembly == typeof(Ignore).Assembly; } } + diff --git a/src/Validation/Framework.Validation/IAvailableValues.cs b/src/Validation/Framework.Validation/IAvailableValues.cs index 967eed61c..aaaadaec4 100644 --- a/src/Validation/Framework.Validation/IAvailableValues.cs +++ b/src/Validation/Framework.Validation/IAvailableValues.cs @@ -8,3 +8,4 @@ public interface IAvailableValues int GetAvailableSize(); } + diff --git a/src/Validation/Framework.Validation/Map/ClassValidationMap.cs b/src/Validation/Framework.Validation/Map/ClassValidationMap.cs index fc6a93080..81ef52c26 100644 --- a/src/Validation/Framework.Validation/Map/ClassValidationMap.cs +++ b/src/Validation/Framework.Validation/Map/ClassValidationMap.cs @@ -60,3 +60,4 @@ public ClassValidationMap(IEnumerable> propertyM public static readonly ClassValidationMap Empty = new([], []); } + diff --git a/src/Validation/Framework.Validation/Map/PropertyValidationMap.cs b/src/Validation/Framework.Validation/Map/PropertyValidationMap.cs index 28740bf96..ec8d5d640 100644 --- a/src/Validation/Framework.Validation/Map/PropertyValidationMap.cs +++ b/src/Validation/Framework.Validation/Map/PropertyValidationMap.cs @@ -166,3 +166,4 @@ public CollectionPropertyValidationMap(Expression> prop IClassValidationMap ICollectionPropertyValidationMap.PropertyTypeMap => this.PropertyElementTypeMap; } + diff --git a/src/Validation/Framework.Validation/Map/ValidationMap.cs b/src/Validation/Framework.Validation/Map/ValidationMap.cs index 017d3534e..674311df0 100644 --- a/src/Validation/Framework.Validation/Map/ValidationMap.cs +++ b/src/Validation/Framework.Validation/Map/ValidationMap.cs @@ -186,3 +186,4 @@ protected virtual IEnumerable> select attribute.CreateValidator().ToKeyValuePair((IValidationData)attribute); } } + diff --git a/src/Validation/Framework.Validation/Map/ValidationMapBase.cs b/src/Validation/Framework.Validation/Map/ValidationMapBase.cs index 2f73d7668..0d66af60e 100644 --- a/src/Validation/Framework.Validation/Map/ValidationMapBase.cs +++ b/src/Validation/Framework.Validation/Map/ValidationMapBase.cs @@ -50,3 +50,4 @@ protected IClassValidationMap GetClassMap(bool lazy) => protected abstract IClassValidationMap GetInternalClassMap(); } + diff --git a/src/Validation/Framework.Validation/Map/ValidationMapExtensions.cs b/src/Validation/Framework.Validation/Map/ValidationMapExtensions.cs index 514fe22e4..a9b3b2586 100644 --- a/src/Validation/Framework.Validation/Map/ValidationMapExtensions.cs +++ b/src/Validation/Framework.Validation/Map/ValidationMapExtensions.cs @@ -91,3 +91,4 @@ public IClassValidationMap GetClassMap(Type type) } } } + diff --git a/src/Validation/Framework.Validation/ValidationContext/ClassValidationContext.cs b/src/Validation/Framework.Validation/ValidationContext/ClassValidationContext.cs index 2aba83abf..d3e7e130f 100644 --- a/src/Validation/Framework.Validation/ValidationContext/ClassValidationContext.cs +++ b/src/Validation/Framework.Validation/ValidationContext/ClassValidationContext.cs @@ -11,3 +11,4 @@ public class ClassValidationContext( IClassValidationMap map, IServiceProvider serviceProvider) : ValidationContext(validator, operationContext, source, parentState, map, serviceProvider), IClassValidationContext; + diff --git a/src/Validation/Framework.Validation/ValidationContext/PropertyValidationContext.cs b/src/Validation/Framework.Validation/ValidationContext/PropertyValidationContext.cs index 0fa3047e0..8a3077612 100644 --- a/src/Validation/Framework.Validation/ValidationContext/PropertyValidationContext.cs +++ b/src/Validation/Framework.Validation/ValidationContext/PropertyValidationContext.cs @@ -15,3 +15,4 @@ public class PropertyValidationContext( { public TProperty Value { get; } = value; } + diff --git a/src/Validation/Framework.Validation/ValidationContext/PropertyValidationContextExtensions.cs b/src/Validation/Framework.Validation/ValidationContext/PropertyValidationContextExtensions.cs index 84a655553..7393a7b29 100644 --- a/src/Validation/Framework.Validation/ValidationContext/PropertyValidationContextExtensions.cs +++ b/src/Validation/Framework.Validation/ValidationContext/PropertyValidationContextExtensions.cs @@ -162,3 +162,4 @@ public BoxedPropertyValidationContext(IPropertyValidationContext( public IServiceProvider ServiceProvider { get; } = serviceProvider; } + diff --git a/src/Validation/Framework.Validation/ValidationContext/ValidationContextBase.cs b/src/Validation/Framework.Validation/ValidationContext/ValidationContextBase.cs index 1b30d1021..3aec71bc0 100644 --- a/src/Validation/Framework.Validation/ValidationContext/ValidationContextBase.cs +++ b/src/Validation/Framework.Validation/ValidationContext/ValidationContextBase.cs @@ -18,3 +18,4 @@ public class ValidationContextBase(IValidator validator, int operationC /// public IValidationState? ParentState { get; } = parentState; } + diff --git a/src/Validation/Framework.Validation/Validator.cs b/src/Validation/Framework.Validation/Validator.cs index c76223f1d..f6eb222d9 100644 --- a/src/Validation/Framework.Validation/Validator.cs +++ b/src/Validation/Framework.Validation/Validator.cs @@ -6,3 +6,4 @@ public class Validator(ValidatorCompileCache cache) : ValidatorBase { public override ValidationResult GetValidationResult(TSource source, int operationContext = int.MaxValue, IValidationState? ownerState = null) => cache.GetValidationResult(new ValidationContextBase(this, operationContext, source, ownerState)); } + diff --git a/src/Validation/Framework.Validation/ValidatorCompileCache.cs b/src/Validation/Framework.Validation/ValidatorCompileCache.cs index 2cd0c3829..b95f1efd0 100644 --- a/src/Validation/Framework.Validation/ValidatorCompileCache.cs +++ b/src/Validation/Framework.Validation/ValidatorCompileCache.cs @@ -145,3 +145,4 @@ public static ValidatorCompileCache ToCompileCache(this IValidationMap validatio return new ValidatorCompileCache(validationMap); } } + diff --git a/src/Validation/Framework.Validation/Validators/AlphabetValidator.cs b/src/Validation/Framework.Validation/Validators/AlphabetValidator.cs index 042d80aab..db6ef3bf7 100644 --- a/src/Validation/Framework.Validation/Validators/AlphabetValidator.cs +++ b/src/Validation/Framework.Validation/Validators/AlphabetValidator.cs @@ -31,3 +31,4 @@ public ValidationResult GetValidationResult(IPropertyValidationContext $"The value of {context.GetPropertyName()} property of {context.GetSourceTypeName()} contains invalid chars: {invalidChars}"); } } + diff --git a/src/Validation/Framework.Validation/Validators/Deep/DeepCollectionValidator.cs b/src/Validation/Framework.Validation/Validators/Deep/DeepCollectionValidator.cs index cbd072fea..bb6fd3ac9 100644 --- a/src/Validation/Framework.Validation/Validators/Deep/DeepCollectionValidator.cs +++ b/src/Validation/Framework.Validation/Validators/Deep/DeepCollectionValidator.cs @@ -14,3 +14,4 @@ public class DeepCollectionValidator : IPropertyVa /// public ValidationResult GetValidationResult(IPropertyValidationContext validationContext) => validationContext.Value.Sum(value => validationContext.Validator.GetValidationResult(value, validationContext.OperationContext, new ValidationState(validationContext.ParentState, validationContext.Map, validationContext.Source))); } + diff --git a/src/Validation/Framework.Validation/Validators/Deep/DeepSingleValidator.cs b/src/Validation/Framework.Validation/Validators/Deep/DeepSingleValidator.cs index c87326e10..30c8b7a14 100644 --- a/src/Validation/Framework.Validation/Validators/Deep/DeepSingleValidator.cs +++ b/src/Validation/Framework.Validation/Validators/Deep/DeepSingleValidator.cs @@ -14,3 +14,4 @@ public class DeepSingleValidator : IPropertyValidator public ValidationResult GetValidationResult(IPropertyValidationContext validationContext) => validationContext.Value.Pipe(value => validationContext.Validator.GetValidationResult(value, validationContext.OperationContext, new ValidationState(validationContext.ParentState, validationContext.Map, validationContext.Source))); } + diff --git a/src/Validation/Framework.Validation/Validators/DynamicClass/Available/AvailableDateTimeValidator.cs b/src/Validation/Framework.Validation/Validators/DynamicClass/Available/AvailableDateTimeValidator.cs index 9f35b9ffa..6f7fde539 100644 --- a/src/Validation/Framework.Validation/Validators/DynamicClass/Available/AvailableDateTimeValidator.cs +++ b/src/Validation/Framework.Validation/Validators/DynamicClass/Available/AvailableDateTimeValidator.cs @@ -15,3 +15,4 @@ private AvailableDateTimeValidator() public static AvailableDateTimeValidator Value { get; } = new(); } + diff --git a/src/Validation/Framework.Validation/Validators/DynamicClass/Available/AvailableDecimalValidator.cs b/src/Validation/Framework.Validation/Validators/DynamicClass/Available/AvailableDecimalValidator.cs index f8d8a5338..715d3a907 100644 --- a/src/Validation/Framework.Validation/Validators/DynamicClass/Available/AvailableDecimalValidator.cs +++ b/src/Validation/Framework.Validation/Validators/DynamicClass/Available/AvailableDecimalValidator.cs @@ -5,7 +5,7 @@ namespace Framework.Validation.Validators.DynamicClass.Available; public class AvailableDecimalValidator : RangeClassValidator { - private AvailableDecimalValidator () + private AvailableDecimalValidator() { } @@ -15,3 +15,4 @@ private AvailableDecimalValidator () public static AvailableDecimalValidator Value { get; } = new(); } + diff --git a/src/Validation/Framework.Validation/Validators/DynamicClass/Available/AvailablePeriodValidator.cs b/src/Validation/Framework.Validation/Validators/DynamicClass/Available/AvailablePeriodValidator.cs index 96b6272c1..37494bf01 100644 --- a/src/Validation/Framework.Validation/Validators/DynamicClass/Available/AvailablePeriodValidator.cs +++ b/src/Validation/Framework.Validation/Validators/DynamicClass/Available/AvailablePeriodValidator.cs @@ -15,3 +15,4 @@ private AvailablePeriodValidator() public static AvailablePeriodValidator Value { get; } = new(); } + diff --git a/src/Validation/Framework.Validation/Validators/DynamicClass/Available/Base/RangeClassValidator.cs b/src/Validation/Framework.Validation/Validators/DynamicClass/Available/Base/RangeClassValidator.cs index 699bec03e..ca32dfe9b 100644 --- a/src/Validation/Framework.Validation/Validators/DynamicClass/Available/Base/RangeClassValidator.cs +++ b/src/Validation/Framework.Validation/Validators/DynamicClass/Available/Base/RangeClassValidator.cs @@ -60,3 +60,4 @@ public ValidationResult GetValidationResult(IPropertyValidationContext(Range availableRange, Func, TProperty, bool> isValidValueFunc) : RangePropertyValidator(availableRange, (range, value) => value == null || isValidValueFunc(range, value.Value)) where TProperty : struct; + diff --git a/src/Validation/Framework.Validation/Validators/DynamicClass/Available/Base/RangePropertyValidatorHelper.cs b/src/Validation/Framework.Validation/Validators/DynamicClass/Available/Base/RangePropertyValidatorHelper.cs index cfad724ba..1c9678e79 100644 --- a/src/Validation/Framework.Validation/Validators/DynamicClass/Available/Base/RangePropertyValidatorHelper.cs +++ b/src/Validation/Framework.Validation/Validators/DynamicClass/Available/Base/RangePropertyValidatorHelper.cs @@ -31,3 +31,4 @@ public NullableRangePropertyValidator CreateNullable } } } + diff --git a/src/Validation/Framework.Validation/Validators/DynamicClass/DefaultStringMaxLengthValidator.cs b/src/Validation/Framework.Validation/Validators/DynamicClass/DefaultStringMaxLengthValidator.cs index cf20de67f..29c441be7 100644 --- a/src/Validation/Framework.Validation/Validators/DynamicClass/DefaultStringMaxLengthValidator.cs +++ b/src/Validation/Framework.Validation/Validators/DynamicClass/DefaultStringMaxLengthValidator.cs @@ -29,3 +29,4 @@ public class DefaultStringMaxLengthValidator : IManyPropertyDynamicClassValidato public static DefaultStringMaxLengthValidator Value { get; } = new(); } + diff --git a/src/Validation/Framework.Validation/Validators/EnglishAlphabetValidator.cs b/src/Validation/Framework.Validation/Validators/EnglishAlphabetValidator.cs index d17b9e2e1..868ea12f9 100644 --- a/src/Validation/Framework.Validation/Validators/EnglishAlphabetValidator.cs +++ b/src/Validation/Framework.Validation/Validators/EnglishAlphabetValidator.cs @@ -5,5 +5,6 @@ namespace Framework.Validation.Validators; public class EnglishAlphabetValidator(string externalChars) : AlphabetValidator(EnglishAlphabet, externalChars) { private static readonly string EnglishAlphabet = - Enumerable.Range('a', 'z').Concat(Enumerable.Range ('A', 'Z')).Select(v => (char) v).Concat(); + Enumerable.Range('a', 'z').Concat(Enumerable.Range('A', 'Z')).Select(v => (char)v).Concat(); } + diff --git a/src/Validation/Framework.Validation/Validators/MaxLengthValidator.cs b/src/Validation/Framework.Validation/Validators/MaxLengthValidator.cs index 3e73e64f1..fbac1caa3 100644 --- a/src/Validation/Framework.Validation/Validators/MaxLengthValidator.cs +++ b/src/Validation/Framework.Validation/Validators/MaxLengthValidator.cs @@ -79,3 +79,4 @@ public ValidationResult GetValidationResult(IPropertyValidationContext val } } } + diff --git a/src/Validation/Framework.Validation/Validators/RequiredHelper.cs b/src/Validation/Framework.Validation/Validators/RequiredHelper.cs index c14f1b68f..12f95d318 100644 --- a/src/Validation/Framework.Validation/Validators/RequiredHelper.cs +++ b/src/Validation/Framework.Validation/Validators/RequiredHelper.cs @@ -129,3 +129,4 @@ private static MethodInfo GetIsValidMethod() } } } + diff --git a/src/Validation/Framework.Validation/Validators/RequiredValidator.cs b/src/Validation/Framework.Validation/Validators/RequiredValidator.cs index 14c11687f..b26458972 100644 --- a/src/Validation/Framework.Validation/Validators/RequiredValidator.cs +++ b/src/Validation/Framework.Validation/Validators/RequiredValidator.cs @@ -71,3 +71,4 @@ public ValidationResult GetValidationResult(IPropertyValidationContext Default { get; } = new(RequiredMode.Default); } + diff --git a/src/Validation/Framework.Validation/Validators/SignValidator.cs b/src/Validation/Framework.Validation/Validators/SignValidator.cs index ca4d234cc..23c603d0d 100644 --- a/src/Validation/Framework.Validation/Validators/SignValidator.cs +++ b/src/Validation/Framework.Validation/Validators/SignValidator.cs @@ -83,3 +83,4 @@ private static ValidationResult CreateErrorResult(IPropertyValidationContext $"{context.GetPropertyName()}{(context.GetSource() as IVisualIdentityObject).Maybe(x => " (" + x.Name + ")")} error. Duplicate fields ({this.uniqueElementString}) combination: {duplicates.Join(", ", d => d.Key)}"); } } + diff --git a/src/Validation/Framework.Validation/Validators/_Base/ClassValidatorExtensions.cs b/src/Validation/Framework.Validation/Validators/_Base/ClassValidatorExtensions.cs index 95341d55e..c506b36db 100644 --- a/src/Validation/Framework.Validation/Validators/_Base/ClassValidatorExtensions.cs +++ b/src/Validation/Framework.Validation/Validators/_Base/ClassValidatorExtensions.cs @@ -130,3 +130,4 @@ public UnboxedClassValidator(IClassValidator baseClassValidator) public ValidationResult GetValidationResult(IClassValidationContext context) => this.baseClassValidator.GetValidationResult(context.Box()); } } + diff --git a/src/Validation/Framework.Validation/Validators/_Base/DynamicClassValidator.cs b/src/Validation/Framework.Validation/Validators/_Base/DynamicClassValidator.cs index 1cdc9914a..9c7f186d0 100644 --- a/src/Validation/Framework.Validation/Validators/_Base/DynamicClassValidator.cs +++ b/src/Validation/Framework.Validation/Validators/_Base/DynamicClassValidator.cs @@ -17,3 +17,4 @@ public IClassValidator GetValidator(Type type, IServiceProvider serviceProvider) protected abstract IClassValidator GetValidator(IServiceProvider serviceProvider); } + diff --git a/src/Validation/Framework.Validation/Validators/_Base/PropertyValidatorExtensions.cs b/src/Validation/Framework.Validation/Validators/_Base/PropertyValidatorExtensions.cs index 2812d43de..453fb4fd0 100644 --- a/src/Validation/Framework.Validation/Validators/_Base/PropertyValidatorExtensions.cs +++ b/src/Validation/Framework.Validation/Validators/_Base/PropertyValidatorExtensions.cs @@ -99,3 +99,4 @@ private class UnboxedPropertyValidator context) => basePropertyValidator.GetValidationResult(context.Box()); } } + diff --git a/src/_Authorization/Framework.Authorization.BLL.Core/IAuthorizationBLLContext.cs b/src/_Authorization/Framework.Authorization.BLL.Core/IAuthorizationBLLContext.cs index 0c3b513fd..1b1a00bdc 100644 --- a/src/_Authorization/Framework.Authorization.BLL.Core/IAuthorizationBLLContext.cs +++ b/src/_Authorization/Framework.Authorization.BLL.Core/IAuthorizationBLLContext.cs @@ -1,15 +1,14 @@ using Anch.Core.Auth; - -using Framework.Authorization.Domain; -using Framework.BLL; -using Framework.Validation; - using Anch.SecuritySystem; using Anch.SecuritySystem.ExternalSystem.SecurityContextStorage; using Anch.SecuritySystem.GeneralPermission.Validation.Principal; using Anch.SecuritySystem.Services; using Anch.SecuritySystem.UserSource; +using Framework.Authorization.Domain; +using Framework.BLL; +using Framework.Validation; + namespace Framework.Authorization.BLL; public partial interface IAuthorizationBLLContext : ISecurityBLLContext @@ -32,3 +31,4 @@ public partial interface IAuthorizationBLLContext : ISecurityBLLContext { } + + public partial interface IAuthorizationValidator : Framework.Validation.IValidator + { + } } diff --git a/src/_Authorization/Framework.Authorization.BLL/AuthorizationBLLContext.cs b/src/_Authorization/Framework.Authorization.BLL/AuthorizationBLLContext.cs index e4ef5d68a..4433b96cb 100644 --- a/src/_Authorization/Framework.Authorization.BLL/AuthorizationBLLContext.cs +++ b/src/_Authorization/Framework.Authorization.BLL/AuthorizationBLLContext.cs @@ -1,5 +1,12 @@ using Anch.Core.Auth; using Anch.Core.DictionaryCache; +using Anch.HierarchicalExpand; +using Anch.SecuritySystem; +using Anch.SecuritySystem.AccessDenied; +using Anch.SecuritySystem.ExternalSystem.SecurityContextStorage; +using Anch.SecuritySystem.GeneralPermission.Validation.Principal; +using Anch.SecuritySystem.Services; +using Anch.SecuritySystem.UserSource; using Framework.Application.Events; using Framework.Authorization.Domain; @@ -9,15 +16,6 @@ using Microsoft.Extensions.DependencyInjection; -using Anch.HierarchicalExpand; - -using Anch.SecuritySystem; -using Anch.SecuritySystem.Services; -using Anch.SecuritySystem.ExternalSystem.SecurityContextStorage; -using Anch.SecuritySystem.AccessDenied; -using Anch.SecuritySystem.GeneralPermission.Validation.Principal; -using Anch.SecuritySystem.UserSource; - namespace Framework.Authorization.BLL; public partial class AuthorizationBLLContext( @@ -75,3 +73,4 @@ public SecurityContextType GetSecurityContextType(Type type) IAuthorizationBLLContext IAuthorizationBLLContextContainer.Authorization => this; } + diff --git a/src/_Authorization/Framework.Authorization.BLL/PermissionBLL.Filter.cs b/src/_Authorization/Framework.Authorization.BLL/PermissionBLL.Filter.cs index b90341451..a17f7bb5f 100644 --- a/src/_Authorization/Framework.Authorization.BLL/PermissionBLL.Filter.cs +++ b/src/_Authorization/Framework.Authorization.BLL/PermissionBLL.Filter.cs @@ -1,9 +1,9 @@ -using Framework.Authorization.Domain; +using Anch.GenericQueryable.Fetching; + +using Framework.Authorization.Domain; using Framework.BLL.Domain.Models; using Framework.Validation.Extensions; -using Anch.GenericQueryable.Fetching; - namespace Framework.Authorization.BLL; public partial class PermissionBLL @@ -19,3 +19,4 @@ public List GetListBy(PermissionDirectFilterModel filter, FetchRule< return base.GetListBy(innerFilter, fetchs); } } + diff --git a/src/_Authorization/Framework.Authorization.BLL/PermissionBLL.cs b/src/_Authorization/Framework.Authorization.BLL/PermissionBLL.cs index 988e6850a..cdb0b4386 100644 --- a/src/_Authorization/Framework.Authorization.BLL/PermissionBLL.cs +++ b/src/_Authorization/Framework.Authorization.BLL/PermissionBLL.cs @@ -56,16 +56,17 @@ public void UpdateDelegatePermissions(UpdatePermissionDelegatesModel updatePermi this.Context.Validator.Validate(updatePermissionDelegatesModel); var changePermissionDelegatesModel = new ChangePermissionDelegatesModel - { - DelegateFromPermission = updatePermissionDelegatesModel.DelegateFromPermission, + { + DelegateFromPermission = updatePermissionDelegatesModel.DelegateFromPermission, - Items = updatePermissionDelegatesModel.DelegateFromPermission.DelegatedTo.ToList(subPerm => + Items = updatePermissionDelegatesModel.DelegateFromPermission.DelegatedTo.ToList(subPerm => - new DelegateToItemModel { Permission = subPerm, Principal = subPerm.Principal }) - }; + new DelegateToItemModel { Permission = subPerm, Principal = subPerm.Principal }) + }; changePermissionDelegatesModel.Merge(updatePermissionDelegatesModel); this.ChangeDelegatePermissions(changePermissionDelegatesModel); } } + diff --git a/src/_Authorization/Framework.Authorization.BLL/PermissionDirectInternalFilterModel.cs b/src/_Authorization/Framework.Authorization.BLL/PermissionDirectInternalFilterModel.cs index 04ca57449..99998e0ef 100644 --- a/src/_Authorization/Framework.Authorization.BLL/PermissionDirectInternalFilterModel.cs +++ b/src/_Authorization/Framework.Authorization.BLL/PermissionDirectInternalFilterModel.cs @@ -1,11 +1,11 @@ using System.Linq.Expressions; +using Anch.SecuritySystem.ExternalSystem.SecurityContextStorage; + using Framework.Authorization.Domain; using Framework.BLL.Domain.Models; using Framework.Core; -using Anch.SecuritySystem.ExternalSystem.SecurityContextStorage; - namespace Framework.Authorization.BLL; internal class PermissionDirectInternalFilterModel(IAuthorizationBLLContext context, PermissionDirectFilterModel baseFilterModel) @@ -33,3 +33,4 @@ public Expression> ToFilterExpression() } } } + diff --git a/src/_Authorization/Framework.Authorization.BLL/PrincipalBLL.cs b/src/_Authorization/Framework.Authorization.BLL/PrincipalBLL.cs index 3f11b9d57..b1cd9f3f9 100644 --- a/src/_Authorization/Framework.Authorization.BLL/PrincipalBLL.cs +++ b/src/_Authorization/Framework.Authorization.BLL/PrincipalBLL.cs @@ -1,11 +1,11 @@ -using Framework.Application; +using Anch.SecuritySystem.Services; + +using Framework.Application; using Framework.Authorization.Domain; using Framework.Validation; using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem.Services; - namespace Framework.Authorization.BLL; public partial class PrincipalBLL @@ -36,3 +36,4 @@ public override void Remove(Principal domainObject) base.Remove(domainObject); } } + diff --git a/src/_Authorization/Framework.Authorization.BLL/PrincipalExtensions.cs b/src/_Authorization/Framework.Authorization.BLL/PrincipalExtensions.cs index 4ad32fc67..f1bda1a3a 100644 --- a/src/_Authorization/Framework.Authorization.BLL/PrincipalExtensions.cs +++ b/src/_Authorization/Framework.Authorization.BLL/PrincipalExtensions.cs @@ -1,6 +1,6 @@ -using Framework.Authorization.Domain; +using Anch.SecuritySystem.ExternalSystem.Management; -using Anch.SecuritySystem.ExternalSystem.Management; +using Framework.Authorization.Domain; namespace Framework.Authorization.BLL; @@ -12,3 +12,4 @@ public static PrincipalData ToPrin public static PermissionData ToPermissionData(this Permission permission) => new(permission, permission.Restrictions.ToArray()); } + diff --git a/src/_Authorization/Framework.Authorization.BLL/SecurityDomainBLLBase.cs b/src/_Authorization/Framework.Authorization.BLL/SecurityDomainBLLBase.cs index 97fc9bd1d..417dc63e9 100644 --- a/src/_Authorization/Framework.Authorization.BLL/SecurityDomainBLLBase.cs +++ b/src/_Authorization/Framework.Authorization.BLL/SecurityDomainBLLBase.cs @@ -38,3 +38,4 @@ public override void Save(TDomainObject domainObject) base.Save(domainObject); } } + diff --git a/src/_Authorization/Framework.Authorization.BLL/_Generated/Authorization.Validator.Generated.cs b/src/_Authorization/Framework.Authorization.BLL/_Generated/Authorization.Validator.Generated.cs index 2c3cb5098..7c49b0c92 100644 --- a/src/_Authorization/Framework.Authorization.BLL/_Generated/Authorization.Validator.Generated.cs +++ b/src/_Authorization/Framework.Authorization.BLL/_Generated/Authorization.Validator.Generated.cs @@ -91,8 +91,4 @@ public AuthorizationValidator(Framework.Authorization.BLL.IAuthorizationBLLConte { } } - - public partial interface IAuthorizationValidator : Framework.Validation.IValidator - { - } } diff --git a/src/_Authorization/Framework.Authorization.Domain.Models/Change/ChangePermissionDelegatesModel.cs b/src/_Authorization/Framework.Authorization.Domain.Models/Change/ChangePermissionDelegatesModel.cs index e30700cb3..ee9572a38 100644 --- a/src/_Authorization/Framework.Authorization.Domain.Models/Change/ChangePermissionDelegatesModel.cs +++ b/src/_Authorization/Framework.Authorization.Domain.Models/Change/ChangePermissionDelegatesModel.cs @@ -25,3 +25,4 @@ public void Merge(UpdatePermissionDelegatesModel updatePermissionDelegatesModel) this.Items.RemoveBy(item => updatePermissionDelegatesModel.RemoveItems.Contains(item.Permission)); } } + diff --git a/src/_Authorization/Framework.Authorization.Domain.Models/Change/DelegateToItemModel.cs b/src/_Authorization/Framework.Authorization.Domain.Models/Change/DelegateToItemModel.cs index 91b4846f0..55eaaa9d0 100644 --- a/src/_Authorization/Framework.Authorization.Domain.Models/Change/DelegateToItemModel.cs +++ b/src/_Authorization/Framework.Authorization.Domain.Models/Change/DelegateToItemModel.cs @@ -12,3 +12,4 @@ public class DelegateToItemModel : DomainObjectBase [DetailRole(true)] public Permission Permission { get; set; } } + diff --git a/src/_Authorization/Framework.Authorization.Domain.Models/Change/_Base/DomainObjectChangeModel.cs b/src/_Authorization/Framework.Authorization.Domain.Models/Change/_Base/DomainObjectChangeModel.cs index 1e3f551d2..f99e2b7a2 100644 --- a/src/_Authorization/Framework.Authorization.Domain.Models/Change/_Base/DomainObjectChangeModel.cs +++ b/src/_Authorization/Framework.Authorization.Domain.Models/Change/_Base/DomainObjectChangeModel.cs @@ -11,3 +11,4 @@ public abstract class DomainObjectChangeModel : DomainObjectBase, [Restriction.Required] public TDomainObject ChangingObject { get; set; } } + diff --git a/src/_Authorization/Framework.Authorization.Domain.Models/Filters/PermissionDirectFilterModel.cs b/src/_Authorization/Framework.Authorization.Domain.Models/Filters/PermissionDirectFilterModel.cs index aabc9e134..280031fc1 100644 --- a/src/_Authorization/Framework.Authorization.Domain.Models/Filters/PermissionDirectFilterModel.cs +++ b/src/_Authorization/Framework.Authorization.Domain.Models/Filters/PermissionDirectFilterModel.cs @@ -13,3 +13,4 @@ public class PermissionDirectFilterModel : DomainObjectContextFilterModel this.description = value.TrimNull(); } } + diff --git a/src/_Authorization/Framework.Authorization.Domain/Permission.cs b/src/_Authorization/Framework.Authorization.Domain/Permission.cs index a1045997f..49f46c03b 100644 --- a/src/_Authorization/Framework.Authorization.Domain/Permission.cs +++ b/src/_Authorization/Framework.Authorization.Domain/Permission.cs @@ -116,3 +116,4 @@ public Permission(Principal principal, Permission delegatedFrom) Permission? IDetail.Master => this.DelegatedFrom; } + diff --git a/src/_Authorization/Framework.Authorization.Domain/PermissionRestriction.cs b/src/_Authorization/Framework.Authorization.Domain/PermissionRestriction.cs index 6cb1fd282..7e8bc9901 100644 --- a/src/_Authorization/Framework.Authorization.Domain/PermissionRestriction.cs +++ b/src/_Authorization/Framework.Authorization.Domain/PermissionRestriction.cs @@ -56,3 +56,4 @@ public virtual SecurityContextType SecurityContextType Permission IDetail.Master => this.Permission; } + diff --git a/src/_Authorization/Framework.Authorization.Domain/Principal.cs b/src/_Authorization/Framework.Authorization.Domain/Principal.cs index 41e5ab403..83c666a1d 100644 --- a/src/_Authorization/Framework.Authorization.Domain/Principal.cs +++ b/src/_Authorization/Framework.Authorization.Domain/Principal.cs @@ -32,3 +32,4 @@ public virtual Principal RunAs ICollection IMaster.Details => (ICollection)this.Permissions; } + diff --git a/src/_Authorization/Framework.Authorization.Domain/__Base/AuditPersistentDomainObjectBase.cs b/src/_Authorization/Framework.Authorization.Domain/__Base/AuditPersistentDomainObjectBase.cs index 329d63c44..5860f432c 100644 --- a/src/_Authorization/Framework.Authorization.Domain/__Base/AuditPersistentDomainObjectBase.cs +++ b/src/_Authorization/Framework.Authorization.Domain/__Base/AuditPersistentDomainObjectBase.cs @@ -53,3 +53,4 @@ public virtual string? CreatedBy internal protected set => this.createdBy = value.TrimNull(); } } + diff --git a/src/_Authorization/Framework.Authorization.Domain/__Base/BaseDirectory.cs b/src/_Authorization/Framework.Authorization.Domain/__Base/BaseDirectory.cs index accdde23f..dce30b794 100644 --- a/src/_Authorization/Framework.Authorization.Domain/__Base/BaseDirectory.cs +++ b/src/_Authorization/Framework.Authorization.Domain/__Base/BaseDirectory.cs @@ -25,3 +25,4 @@ public virtual string Name public override string ToString() => this.Name; } + diff --git a/src/_Authorization/Framework.Authorization.Domain/__Base/PersistentDomainObjectBase.cs b/src/_Authorization/Framework.Authorization.Domain/__Base/PersistentDomainObjectBase.cs index 2c09ae835..e614c1801 100644 --- a/src/_Authorization/Framework.Authorization.Domain/__Base/PersistentDomainObjectBase.cs +++ b/src/_Authorization/Framework.Authorization.Domain/__Base/PersistentDomainObjectBase.cs @@ -41,3 +41,4 @@ public override int GetHashCode() #pragma warning restore S2349 } } + diff --git a/src/_Authorization/Framework.Authorization.Environment/AuthorizationSystemSetup.cs b/src/_Authorization/Framework.Authorization.Environment/AuthorizationSystemSetup.cs index 6531ae54e..089183018 100644 --- a/src/_Authorization/Framework.Authorization.Environment/AuthorizationSystemSetup.cs +++ b/src/_Authorization/Framework.Authorization.Environment/AuthorizationSystemSetup.cs @@ -1,14 +1,6 @@ using Anch.Core; using Anch.DependencyInjection; using Anch.RelativePath.DependencyInjection; - -using Framework.Application; -using Framework.Authorization.Domain; -using Framework.Authorization.Environment.Security; -using Framework.Core; - -using Microsoft.Extensions.DependencyInjection; - using Anch.SecuritySystem; using Anch.SecuritySystem.DependencyInjection; using Anch.SecuritySystem.ExternalSystem.ApplicationSecurity; @@ -17,6 +9,13 @@ using Anch.SecuritySystem.Notification.DependencyInjection; using Anch.SecuritySystem.UserSource; +using Framework.Application; +using Framework.Authorization.Domain; +using Framework.Authorization.Environment.Security; +using Framework.Core; + +using Microsoft.Extensions.DependencyInjection; + namespace Framework.Authorization.Environment; public class AuthorizationSystemSetup : IAuthorizationSystemSetup, IServiceInitializer @@ -101,3 +100,4 @@ public void Initialize(ISecuritySystemSetup settings) }); } } + diff --git a/src/_Authorization/Framework.Authorization.Environment/IAuthorizationSystemSetup.cs b/src/_Authorization/Framework.Authorization.Environment/IAuthorizationSystemSetup.cs index 5813a5126..0fea07351 100644 --- a/src/_Authorization/Framework.Authorization.Environment/IAuthorizationSystemSetup.cs +++ b/src/_Authorization/Framework.Authorization.Environment/IAuthorizationSystemSetup.cs @@ -1,6 +1,6 @@ -using Framework.Authorization.Domain; +using Anch.SecuritySystem.GeneralPermission.Validation; -using Anch.SecuritySystem.GeneralPermission.Validation; +using Framework.Authorization.Domain; namespace Framework.Authorization.Environment; @@ -11,3 +11,4 @@ public interface IAuthorizationSystemSetup IAuthorizationSystemSetup SetUniquePermissionComparer() where TComparer : class, IPermissionEqualityComparer; } + diff --git a/src/_Authorization/Framework.Authorization.Environment/MasterDetailDalGenericInterceptor.cs b/src/_Authorization/Framework.Authorization.Environment/MasterDetailDalGenericInterceptor.cs index 8b8bef4a6..57ff06e32 100644 --- a/src/_Authorization/Framework.Authorization.Environment/MasterDetailDalGenericInterceptor.cs +++ b/src/_Authorization/Framework.Authorization.Environment/MasterDetailDalGenericInterceptor.cs @@ -17,3 +17,4 @@ public async Task SaveAsync(TDomainObject data, CancellationToken cancellationTo public async Task RemoveAsync(TDomainObject data, CancellationToken cancellationToken) => data.Master?.RemoveDetail(data); } + diff --git a/src/_Authorization/Framework.Authorization.Environment/Security/AuthorizationSecurityRule.cs b/src/_Authorization/Framework.Authorization.Environment/Security/AuthorizationSecurityRule.cs index 2699ebf58..7376a598b 100644 --- a/src/_Authorization/Framework.Authorization.Environment/Security/AuthorizationSecurityRule.cs +++ b/src/_Authorization/Framework.Authorization.Environment/Security/AuthorizationSecurityRule.cs @@ -6,3 +6,4 @@ public static class AuthorizationSecurityRule { public static DomainSecurityRule.ProviderSecurityRule AvailableBusinessRole { get; } = new() { GenericSecurityProviderType = typeof(AvailableBusinessRoleSecurityProvider<>) }; } + diff --git a/src/_Authorization/Framework.Authorization.Environment/Security/AvailableBusinessRoleSecurityProvider.cs b/src/_Authorization/Framework.Authorization.Environment/Security/AvailableBusinessRoleSecurityProvider.cs index e049a26a9..4727eb0a9 100644 --- a/src/_Authorization/Framework.Authorization.Environment/Security/AvailableBusinessRoleSecurityProvider.cs +++ b/src/_Authorization/Framework.Authorization.Environment/Security/AvailableBusinessRoleSecurityProvider.cs @@ -2,17 +2,15 @@ using Anch.Core; using Anch.Core.ExpressionEvaluate; -using Anch.RelativePath; - -using Framework.Authorization.Domain; - using Anch.GenericQueryable; - +using Anch.RelativePath; using Anch.SecuritySystem; using Anch.SecuritySystem.Providers; using Anch.SecuritySystem.SecurityAccessor; using Anch.SecuritySystem.Services; +using Framework.Authorization.Domain; + namespace Framework.Authorization.Environment.Security; public class AvailableBusinessRoleSecurityProvider( @@ -46,3 +44,4 @@ await availablePermissionSource .Select(principal => principal.Name) .GenericToListAsync(cancellationToken)); } + diff --git a/src/_Authorization/Framework.Authorization.Environment/SecuritySystemSetupExtensions.cs b/src/_Authorization/Framework.Authorization.Environment/SecuritySystemSetupExtensions.cs index 73e12f255..6e33eb8e1 100644 --- a/src/_Authorization/Framework.Authorization.Environment/SecuritySystemSetupExtensions.cs +++ b/src/_Authorization/Framework.Authorization.Environment/SecuritySystemSetupExtensions.cs @@ -1,5 +1,4 @@ using Anch.DependencyInjection; - using Anch.SecuritySystem.DependencyInjection; namespace Framework.Authorization.Environment; @@ -9,3 +8,4 @@ public static class SecuritySystemSetupExtensions public static ISecuritySystemSetup AddAuthorizationSystem(this ISecuritySystemSetup securitySystemSetup, Action? setupAction = null) => securitySystemSetup.Initialize(setupAction); } + diff --git a/src/_Authorization/Framework.Authorization.Events/AuthDALListenerSettings.cs b/src/_Authorization/Framework.Authorization.Events/AuthDALListenerSettings.cs index 996b45e16..3aaffc86d 100644 --- a/src/_Authorization/Framework.Authorization.Events/AuthDALListenerSettings.cs +++ b/src/_Authorization/Framework.Authorization.Events/AuthDALListenerSettings.cs @@ -21,3 +21,4 @@ public static class AuthDALListenerSettings ] }; } + diff --git a/src/_Authorization/Framework.Authorization.Events/AuthorizationRuntimeDomainEventDTOMapper.cs b/src/_Authorization/Framework.Authorization.Events/AuthorizationRuntimeDomainEventDTOMapper.cs index 7e3402c17..d52caedb0 100644 --- a/src/_Authorization/Framework.Authorization.Events/AuthorizationRuntimeDomainEventDTOMapper.cs +++ b/src/_Authorization/Framework.Authorization.Events/AuthorizationRuntimeDomainEventDTOMapper.cs @@ -40,3 +40,4 @@ public override object Convert(TDomainObject domainObject, EventO return dto; } } + diff --git a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/AuthorizationMappingSettings.cs b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/AuthorizationMappingSettings.cs index c139e6a9c..d3aa22749 100644 --- a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/AuthorizationMappingSettings.cs +++ b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/AuthorizationMappingSettings.cs @@ -17,3 +17,4 @@ public AuthorizationMappingSettings() { } } + diff --git a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/Base/AuthBaseMap.cs b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/Base/AuthBaseMap.cs index 81a306467..4d7e24441 100644 --- a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/Base/AuthBaseMap.cs +++ b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/Base/AuthBaseMap.cs @@ -21,3 +21,4 @@ protected AuthBaseMap() this.Map(x => x.ModifyDate); } } + diff --git a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/BusinessRoleMap.cs b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/BusinessRoleMap.cs index d04f7bf32..8d36775ed 100644 --- a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/BusinessRoleMap.cs +++ b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/BusinessRoleMap.cs @@ -12,3 +12,4 @@ public BusinessRoleMap() this.HasMany(x => x.Permissions).AsSet().Inverse().Cascade.None(); } } + diff --git a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PermissionMap.cs b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PermissionMap.cs index 44a9d25f4..9b95a64fa 100644 --- a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PermissionMap.cs +++ b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PermissionMap.cs @@ -23,3 +23,4 @@ public PermissionMap() this.HasMany(x => x.Restrictions).AsSet().Inverse().Cascade.AllDeleteOrphan(); } } + diff --git a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PermissionRestrictionMap.cs b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PermissionRestrictionMap.cs index 5bc2adf39..1a9e678a9 100644 --- a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PermissionRestrictionMap.cs +++ b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PermissionRestrictionMap.cs @@ -15,3 +15,4 @@ public PermissionRestrictionMap() .UniqueKey("UIX_permission_securityContextId_securityContextTypePermissionRestriction"); } } + diff --git a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PrincipalMap.cs b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PrincipalMap.cs index 1edec5a66..701ecf828 100644 --- a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PrincipalMap.cs +++ b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PrincipalMap.cs @@ -12,3 +12,4 @@ public PrincipalMap() this.HasMany(x => x.Permissions).AsSet().Inverse().Cascade.AllDeleteOrphan(); } } + diff --git a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/SecurityContextTypeMap.cs b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/SecurityContextTypeMap.cs index 5d704e414..728fe25fb 100644 --- a/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/SecurityContextTypeMap.cs +++ b/src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/SecurityContextTypeMap.cs @@ -7,3 +7,4 @@ public class SecurityContextTypeMap : AuthBaseMap { public SecurityContextTypeMap() => this.Map(x => x.Name).Not.Nullable(); } + diff --git a/src/_Authorization/Framework.Authorization.Generated.DTO/AuthorizationServerPrimitiveDTOMappingService.cs b/src/_Authorization/Framework.Authorization.Generated.DTO/AuthorizationServerPrimitiveDTOMappingService.cs index 60a99b5b8..3b8b34571 100644 --- a/src/_Authorization/Framework.Authorization.Generated.DTO/AuthorizationServerPrimitiveDTOMappingService.cs +++ b/src/_Authorization/Framework.Authorization.Generated.DTO/AuthorizationServerPrimitiveDTOMappingService.cs @@ -43,3 +43,4 @@ public override void MapDelegateToItemModel(DelegateToItemModelStrictDTO mapping } } } + diff --git a/src/_Authorization/Framework.Authorization.Generated.DTO/DelegateToItemModelStrictDTO.cs b/src/_Authorization/Framework.Authorization.Generated.DTO/DelegateToItemModelStrictDTO.cs index e29129dc1..a2e047227 100644 --- a/src/_Authorization/Framework.Authorization.Generated.DTO/DelegateToItemModelStrictDTO.cs +++ b/src/_Authorization/Framework.Authorization.Generated.DTO/DelegateToItemModelStrictDTO.cs @@ -6,3 +6,4 @@ public partial class DelegateToItemModelStrictDTO { internal Permission DelegatedFromPermission; } + diff --git a/src/_Authorization/Framework.Authorization.Generated.DTO/GetFullSecurityEntitiesByIdentsRequest.cs b/src/_Authorization/Framework.Authorization.Generated.DTO/GetFullSecurityEntitiesByIdentsRequest.cs index d1efece65..11d4f35e9 100644 --- a/src/_Authorization/Framework.Authorization.Generated.DTO/GetFullSecurityEntitiesByIdentsRequest.cs +++ b/src/_Authorization/Framework.Authorization.Generated.DTO/GetFullSecurityEntitiesByIdentsRequest.cs @@ -16,3 +16,4 @@ public class GetFullSecurityEntitiesByIdentsRequest [AutoRequestProperty(OrderIndex = 1)] public List SecurityEntities { get; set; } } + diff --git a/src/_Authorization/Framework.Authorization.Generated.DTO/SecurityEntityIdentityDTO.cs b/src/_Authorization/Framework.Authorization.Generated.DTO/SecurityEntityIdentityDTO.cs index a12fef3f8..a320dade7 100644 --- a/src/_Authorization/Framework.Authorization.Generated.DTO/SecurityEntityIdentityDTO.cs +++ b/src/_Authorization/Framework.Authorization.Generated.DTO/SecurityEntityIdentityDTO.cs @@ -1,4 +1,5 @@ using System.Runtime.Serialization; + using Framework.Application.Domain; namespace Framework.Authorization.Generated.DTO; @@ -9,3 +10,4 @@ public struct SecurityEntityIdentityDTO(Guid id) : IIdentityObject [DataMember] public Guid Id { get; set; } = id; } + diff --git a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/AuthorizationGenerationEnvironment.Impl.cs b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/AuthorizationGenerationEnvironment.Impl.cs index 409045315..82603d61c 100644 --- a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/AuthorizationGenerationEnvironment.Impl.cs +++ b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/AuthorizationGenerationEnvironment.Impl.cs @@ -5,17 +5,18 @@ namespace Framework.Authorization.TestGenerate.Configurations; - public partial class AuthorizationGenerationEnvironment : +public partial class AuthorizationGenerationEnvironment : - IBLLCoreGenerationEnvironment, + IBLLCoreGenerationEnvironment, - IBLLGenerationEnvironment, + IBLLGenerationEnvironment, - IServerDTOGenerationEnvironment, + IServerDTOGenerationEnvironment, - IServiceModelGenerationEnvironment - { - IBLLCoreGeneratorConfiguration IBLLCoreGeneratorConfigurationContainer.BLLCore => this.BLLCore; + IServiceModelGenerationEnvironment +{ + IBLLCoreGeneratorConfiguration IBLLCoreGeneratorConfigurationContainer.BLLCore => this.BLLCore; + + IServerDTOGeneratorConfiguration IServerDTOGeneratorConfigurationContainer.ServerDTO => this.ServerDTO; +} - IServerDTOGeneratorConfiguration IServerDTOGeneratorConfigurationContainer.ServerDTO => this.ServerDTO; - } diff --git a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/AuthorizationGenerationEnvironment.cs b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/AuthorizationGenerationEnvironment.cs index 55c790284..91e6d8962 100644 --- a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/AuthorizationGenerationEnvironment.cs +++ b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/AuthorizationGenerationEnvironment.cs @@ -105,3 +105,4 @@ protected override IEnumerable GetExtendedAttributeSour public static readonly AuthorizationGenerationEnvironment Default = new(new DatabaseName("", "auth")); } + diff --git a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/BLL/BLLGeneratorConfiguration.cs b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/BLL/BLLGeneratorConfiguration.cs index 3830d380f..2b5bc383f 100644 --- a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/BLL/BLLGeneratorConfiguration.cs +++ b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/BLL/BLLGeneratorConfiguration.cs @@ -3,3 +3,4 @@ namespace Framework.Authorization.TestGenerate.Configurations.BLL; public class BLLGeneratorConfiguration(AuthorizationGenerationEnvironment environment) : BLLGeneratorConfigurationBase(environment); + diff --git a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/BLLCore/BLLCoreGeneratorConfiguration.cs b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/BLLCore/BLLCoreGeneratorConfiguration.cs index cb2a4ff6d..adb6f1d99 100644 --- a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/BLLCore/BLLCoreGeneratorConfiguration.cs +++ b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/BLLCore/BLLCoreGeneratorConfiguration.cs @@ -9,3 +9,4 @@ public class BLLCoreGeneratorConfiguration(AuthorizationGenerationEnvironment en public override Type ChangeModelType { get; } = typeof(DomainObjectChangeModel<>); } + diff --git a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/DTO/ServerDTOGeneratorConfiguration.cs b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/DTO/ServerDTOGeneratorConfiguration.cs index e071ac7de..417554cc3 100644 --- a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/DTO/ServerDTOGeneratorConfiguration.cs +++ b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/DTO/ServerDTOGeneratorConfiguration.cs @@ -16,3 +16,4 @@ public class ServerDTOGeneratorConfiguration(AuthorizationGenerationEnvironment protected override IGeneratePolicy CreateGeneratePolicy() => new DTORoleGeneratePolicy(DTORole.Client | DTORole.Event).Or(new DTORoleGeneratePolicy(DTORole.Event)); } + diff --git a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/Services/Main/MainServiceGeneratorConfiguration.cs b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/Services/Main/MainServiceGeneratorConfiguration.cs index 49c382c6d..95ff9d26e 100644 --- a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/Services/Main/MainServiceGeneratorConfiguration.cs +++ b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/Services/Main/MainServiceGeneratorConfiguration.cs @@ -7,3 +7,4 @@ public class MainServiceGeneratorConfiguration(AuthorizationGenerationEnvironmen { public override string ImplementClassName { get; } = "AuthFacade"; } + diff --git a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/Services/QueryService/QueryServiceGeneratorConfiguration.cs b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/Services/QueryService/QueryServiceGeneratorConfiguration.cs index 9f0a2dbc8..5b0d51696 100644 --- a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/Services/QueryService/QueryServiceGeneratorConfiguration.cs +++ b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/Services/QueryService/QueryServiceGeneratorConfiguration.cs @@ -3,3 +3,4 @@ namespace Framework.Authorization.TestGenerate.Configurations.Services.QueryService; public class QueryServiceGeneratorConfiguration(AuthorizationGenerationEnvironment environment) : QueryGeneratorConfigurationBase(environment); + diff --git a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/Services/WebApi/MainControllerConfiguration.cs b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/Services/WebApi/MainControllerConfiguration.cs index 796fd36cf..68a500f3d 100644 --- a/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/Services/WebApi/MainControllerConfiguration.cs +++ b/src/_Authorization/Framework.Authorization.TestGenerate/Configurations/Services/WebApi/MainControllerConfiguration.cs @@ -8,3 +8,4 @@ public class MainControllerConfiguration(AuthorizationGenerationEnvironment envi public override string ImplementClassName { get; } = "AuthMainController"; } + diff --git a/src/_Authorization/Framework.Authorization.TestGenerate/GeneratorsBase.cs b/src/_Authorization/Framework.Authorization.TestGenerate/GeneratorsBase.cs index 71eedd0c1..11ef8bfce 100644 --- a/src/_Authorization/Framework.Authorization.TestGenerate/GeneratorsBase.cs +++ b/src/_Authorization/Framework.Authorization.TestGenerate/GeneratorsBase.cs @@ -11,3 +11,4 @@ public abstract class GeneratorsBase protected abstract string GeneratePath { get; } } + diff --git a/src/_Authorization/Framework.Authorization.TestGenerate/ServerGenerators.DB.cs b/src/_Authorization/Framework.Authorization.TestGenerate/ServerGenerators.DB.cs index df9b78c6e..98868facd 100644 --- a/src/_Authorization/Framework.Authorization.TestGenerate/ServerGenerators.DB.cs +++ b/src/_Authorization/Framework.Authorization.TestGenerate/ServerGenerators.DB.cs @@ -61,3 +61,4 @@ private MappingSettings GetAuthMappingSettings(string serverName, DatabaseName d new DatabaseSettings(), new NHibernateSettings { FluentAssemblyList = [typeof(AuthorizationMappingSettings).Assembly] })); } + diff --git a/src/_Authorization/Framework.Authorization.TestGenerate/ServerGenerators.Initialize.cs b/src/_Authorization/Framework.Authorization.TestGenerate/ServerGenerators.Initialize.cs index 4a8d04029..2ab71a87e 100644 --- a/src/_Authorization/Framework.Authorization.TestGenerate/ServerGenerators.Initialize.cs +++ b/src/_Authorization/Framework.Authorization.TestGenerate/ServerGenerators.Initialize.cs @@ -8,3 +8,4 @@ public partial class ServerGenerators(AuthorizationGenerationEnvironment? enviro protected override string GeneratePath => this.FrameworkPath + @"/src/_Authorization"; } + diff --git a/src/_Authorization/Framework.Authorization.TestGenerate/ServerGenerators.cs b/src/_Authorization/Framework.Authorization.TestGenerate/ServerGenerators.cs index 966431fb0..3f6393084 100644 --- a/src/_Authorization/Framework.Authorization.TestGenerate/ServerGenerators.cs +++ b/src/_Authorization/Framework.Authorization.TestGenerate/ServerGenerators.cs @@ -70,3 +70,4 @@ private IEnumerable GenerateMainController() yield return generator.GenerateSingle(outputPath, "Authorization.Generated", this.CheckOutService); } } + diff --git a/src/_Authorization/Framework.Authorization.WebApi/Impl/PermissionService.cs b/src/_Authorization/Framework.Authorization.WebApi/Impl/PermissionService.cs index 12dfdd34c..fe4d99422 100644 --- a/src/_Authorization/Framework.Authorization.WebApi/Impl/PermissionService.cs +++ b/src/_Authorization/Framework.Authorization.WebApi/Impl/PermissionService.cs @@ -1,7 +1,7 @@ -using Framework.Authorization.Generated.DTO; -using Framework.Database; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using Framework.Authorization.Generated.DTO; +using Framework.Database; using Microsoft.AspNetCore.Mvc; @@ -41,3 +41,4 @@ public IEnumerable GetVisualBusinessRolesByPermission([Fr .ToVisualDTO(evaluateData.MappingService)) ]; } + diff --git a/src/_Authorization/Framework.Authorization.WebApi/Impl/PrincipalService.cs b/src/_Authorization/Framework.Authorization.WebApi/Impl/PrincipalService.cs index 58a7a9de4..e876cb252 100644 --- a/src/_Authorization/Framework.Authorization.WebApi/Impl/PrincipalService.cs +++ b/src/_Authorization/Framework.Authorization.WebApi/Impl/PrincipalService.cs @@ -1,7 +1,7 @@ -using Framework.Authorization.Generated.DTO; -using Framework.Database; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using Framework.Authorization.Generated.DTO; +using Framework.Database; using Microsoft.AspNetCore.Mvc; @@ -22,3 +22,4 @@ public IEnumerable GetVisualPrincipalsWithoutSecurity() => ? evaluateData.Context.Logics.Principal.GetFullList().ToVisualDTOList(evaluateData.MappingService) : Enumerable.Empty()); } + diff --git a/src/_Authorization/Framework.Authorization.WebApi/Impl/RunAsManagerService.cs b/src/_Authorization/Framework.Authorization.WebApi/Impl/RunAsManagerService.cs index 61aa95f96..3a7d84904 100644 --- a/src/_Authorization/Framework.Authorization.WebApi/Impl/RunAsManagerService.cs +++ b/src/_Authorization/Framework.Authorization.WebApi/Impl/RunAsManagerService.cs @@ -20,3 +20,4 @@ public void RunAsUser([FromForm] PrincipalIdentityDTO principal) => [HttpPost] public void FinishRunAsUser() => this.Evaluate(DBSessionMode.Write, evaluateData => evaluateData.Context.RunAsManager.FinishRunAsUserAsync().GetAwaiter().GetResult()); } + diff --git a/src/_Authorization/Framework.Authorization.WebApi/Impl/SecurityEntityService.cs b/src/_Authorization/Framework.Authorization.WebApi/Impl/SecurityEntityService.cs index 9a6964c40..725a08c4e 100644 --- a/src/_Authorization/Framework.Authorization.WebApi/Impl/SecurityEntityService.cs +++ b/src/_Authorization/Framework.Authorization.WebApi/Impl/SecurityEntityService.cs @@ -1,10 +1,9 @@ using Anch.Core; +using Anch.SecuritySystem.ExternalSystem.SecurityContextStorage; using Framework.Authorization.Generated.DTO; using Framework.Database; -using Anch.SecuritySystem.ExternalSystem.SecurityContextStorage; - using Microsoft.AspNetCore.Mvc; // ReSharper disable once CheckNamespace @@ -45,3 +44,4 @@ public IEnumerable> GetFullSecurityEntitiesByIdents([F .ToList(); }); } + diff --git a/src/_Authorization/Framework.Authorization.WebApi/Impl/SecurityOperationService.cs b/src/_Authorization/Framework.Authorization.WebApi/Impl/SecurityOperationService.cs index 068a1bd81..2751e0324 100644 --- a/src/_Authorization/Framework.Authorization.WebApi/Impl/SecurityOperationService.cs +++ b/src/_Authorization/Framework.Authorization.WebApi/Impl/SecurityOperationService.cs @@ -19,3 +19,4 @@ public virtual async Task> GetSecurityOperations(CancellationToken .ToListAsync(cancellationToken); } } + diff --git a/src/_Authorization/Framework.Authorization.WebApi/MainAuthController.cs b/src/_Authorization/Framework.Authorization.WebApi/MainAuthController.cs index 1c67fc953..83bec7f52 100644 --- a/src/_Authorization/Framework.Authorization.WebApi/MainAuthController.cs +++ b/src/_Authorization/Framework.Authorization.WebApi/MainAuthController.cs @@ -8,3 +8,4 @@ namespace Framework.Authorization.WebApi; [ApiController] public abstract partial class AuthMainController : ApiControllerBase; + diff --git a/src/_Configuration/Framework.Configuration.BLL.Core/IConfigurationBLLContext.cs b/src/_Configuration/Framework.Configuration.BLL.Core/IConfigurationBLLContext.cs index 54c38fb04..f3c00c00a 100644 --- a/src/_Configuration/Framework.Configuration.BLL.Core/IConfigurationBLLContext.cs +++ b/src/_Configuration/Framework.Configuration.BLL.Core/IConfigurationBLLContext.cs @@ -34,3 +34,4 @@ public partial interface IConfigurationBLLContext : DomainType? TryGetDomainType(TypeNameIdentity type); } + diff --git a/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectEventBLL.cs b/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectEventBLL.cs index 90ea6cf2b..e189e2648 100644 --- a/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectEventBLL.cs +++ b/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectEventBLL.cs @@ -10,3 +10,4 @@ public partial interface IDomainObjectEventBLL /// QueueProcessingState GetProcessingState(); } + diff --git a/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectModificationBLL.cs b/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectModificationBLL.cs index 948396c3f..284336d7b 100644 --- a/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectModificationBLL.cs +++ b/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectModificationBLL.cs @@ -18,3 +18,4 @@ public partial interface IDomainObjectModificationBLL /// QueueProcessingState GetProcessingState(); } + diff --git a/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectNotificationBLL.cs b/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectNotificationBLL.cs index 9817761b8..381c83cb9 100644 --- a/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectNotificationBLL.cs +++ b/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectNotificationBLL.cs @@ -10,3 +10,4 @@ public partial interface IDomainObjectNotificationBLL /// QueueProcessingState GetProcessingState(); } + diff --git a/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectVersionsResolver.cs b/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectVersionsResolver.cs index 43b5cc326..2184c2dcf 100644 --- a/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectVersionsResolver.cs +++ b/src/_Configuration/Framework.Configuration.BLL.Core/IDomainObjectVersionsResolver.cs @@ -6,3 +6,4 @@ public interface IDomainObjectVersionsResolver { DomainObjectVersions GetDomainObjectVersions(Guid domainObjectId, long revisionNumber); } + diff --git a/src/_Configuration/Framework.Configuration.BLL.Core/IDomainTypeBLL.cs b/src/_Configuration/Framework.Configuration.BLL.Core/IDomainTypeBLL.cs index 383b288a2..666203d4d 100644 --- a/src/_Configuration/Framework.Configuration.BLL.Core/IDomainTypeBLL.cs +++ b/src/_Configuration/Framework.Configuration.BLL.Core/IDomainTypeBLL.cs @@ -6,3 +6,4 @@ public partial interface IDomainTypeBLL { Task ForceEventAsync(DomainTypeEventModel eventModel, CancellationToken cancellationToken); } + diff --git a/src/_Configuration/Framework.Configuration.BLL.Core/ISequenceBLL.cs b/src/_Configuration/Framework.Configuration.BLL.Core/ISequenceBLL.cs index 802bd371c..39f0706e6 100644 --- a/src/_Configuration/Framework.Configuration.BLL.Core/ISequenceBLL.cs +++ b/src/_Configuration/Framework.Configuration.BLL.Core/ISequenceBLL.cs @@ -11,6 +11,6 @@ public static long GetNextNumber(this ISequenceBLL sequenceBLL) { if (sequenceBLL == null) throw new ArgumentNullException(nameof(sequenceBLL)); - return sequenceBLL.GetNextNumber(typeof (T).Name); + return sequenceBLL.GetNextNumber(typeof(T).Name); } } diff --git a/src/_Configuration/Framework.Configuration.BLL.Core/ISystemConstantBLL.cs b/src/_Configuration/Framework.Configuration.BLL.Core/ISystemConstantBLL.cs index 76af30fb7..2ccd298d1 100644 --- a/src/_Configuration/Framework.Configuration.BLL.Core/ISystemConstantBLL.cs +++ b/src/_Configuration/Framework.Configuration.BLL.Core/ISystemConstantBLL.cs @@ -6,3 +6,4 @@ public partial interface ISystemConstantBLL { T GetValue(ApplicationVariable systemConstant); } + diff --git a/src/_Configuration/Framework.Configuration.BLL.Core/ISystemConstantInitializer.cs b/src/_Configuration/Framework.Configuration.BLL.Core/ISystemConstantInitializer.cs index 9f0beef2d..92ec2a51b 100644 --- a/src/_Configuration/Framework.Configuration.BLL.Core/ISystemConstantInitializer.cs +++ b/src/_Configuration/Framework.Configuration.BLL.Core/ISystemConstantInitializer.cs @@ -3,3 +3,4 @@ namespace Framework.Configuration.BLL; public interface ISystemConstantInitializer : IInitializer; + diff --git a/src/_Configuration/Framework.Configuration.BLL.Core/TargetSystemService/ITargetSystemInitializer.cs b/src/_Configuration/Framework.Configuration.BLL.Core/TargetSystemService/ITargetSystemInitializer.cs index 792a37673..134958228 100644 --- a/src/_Configuration/Framework.Configuration.BLL.Core/TargetSystemService/ITargetSystemInitializer.cs +++ b/src/_Configuration/Framework.Configuration.BLL.Core/TargetSystemService/ITargetSystemInitializer.cs @@ -3,3 +3,4 @@ namespace Framework.Configuration.BLL.TargetSystemService; public interface ITargetSystemInitializer : IInitializer; + diff --git a/src/_Configuration/Framework.Configuration.BLL.Core/TargetSystemService/ITargetSystemService.cs b/src/_Configuration/Framework.Configuration.BLL.Core/TargetSystemService/ITargetSystemService.cs index f99883f3c..49d6dba2b 100644 --- a/src/_Configuration/Framework.Configuration.BLL.Core/TargetSystemService/ITargetSystemService.cs +++ b/src/_Configuration/Framework.Configuration.BLL.Core/TargetSystemService/ITargetSystemService.cs @@ -14,3 +14,4 @@ public interface ITargetSystemService IEnumerable> GetObjectModifications(DALChanges changes); } + diff --git a/src/_Configuration/Framework.Configuration.BLL.Core/_Generated/Configuration.Generated.cs b/src/_Configuration/Framework.Configuration.BLL.Core/_Generated/Configuration.Generated.cs index a7ef47391..26adb3732 100644 --- a/src/_Configuration/Framework.Configuration.BLL.Core/_Generated/Configuration.Generated.cs +++ b/src/_Configuration/Framework.Configuration.BLL.Core/_Generated/Configuration.Generated.cs @@ -169,4 +169,8 @@ public partial interface ITargetSystemBLL : Framework.BLL.IDefaultSecurityDomain public partial interface ITargetSystemBLLFactory : Framework.BLL.ISecurityBLLFactory { } + + public partial interface IConfigurationValidator : Framework.Validation.IValidator + { + } } diff --git a/src/_Configuration/Framework.Configuration.BLL/ConfigurationApplicationVariableStorage.cs b/src/_Configuration/Framework.Configuration.BLL/ConfigurationApplicationVariableStorage.cs index e408b26a7..4d18803be 100644 --- a/src/_Configuration/Framework.Configuration.BLL/ConfigurationApplicationVariableStorage.cs +++ b/src/_Configuration/Framework.Configuration.BLL/ConfigurationApplicationVariableStorage.cs @@ -1,13 +1,11 @@ using Anch.Core; +using Anch.GenericQueryable; +using Anch.SecuritySystem.Attributes; using Framework.Application.ApplicationVariable; using Framework.Application.Repository; using Framework.Configuration.Domain; -using Anch.GenericQueryable; - -using Anch.SecuritySystem.Attributes; - namespace Framework.Configuration.BLL; public class ConfigurationApplicationVariableStorage( @@ -53,3 +51,4 @@ public async Task UpdateVariableAsync(SystemConstant systemConstant, Cancella await systemConstantRepository.SaveAsync(systemConstant, cancellationToken); } } + diff --git a/src/_Configuration/Framework.Configuration.BLL/ConfigurationBLLContext.cs b/src/_Configuration/Framework.Configuration.BLL/ConfigurationBLLContext.cs index b909a654b..dd930e01b 100644 --- a/src/_Configuration/Framework.Configuration.BLL/ConfigurationBLLContext.cs +++ b/src/_Configuration/Framework.Configuration.BLL/ConfigurationBLLContext.cs @@ -2,6 +2,8 @@ using System.Collections.Immutable; using Anch.Core; +using Anch.HierarchicalExpand; +using Anch.SecuritySystem.AccessDenied; using Framework.Application; using Framework.Application.Events; @@ -17,12 +19,8 @@ using Framework.Core.TypeResolving; using Framework.Validation; -using Anch.HierarchicalExpand; - using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem.AccessDenied; - namespace Framework.Configuration.BLL; public partial class ConfigurationBLLContext( @@ -91,3 +89,4 @@ public DomainType GetDomainType(TypeNameIdentity typeNameIdentity) => this.TryGetDomainType(typeNameIdentity) ?? throw new BusinessLogicException("TargetSystem with domainType \"{0}\" not found", typeNameIdentity); } + diff --git a/src/_Configuration/Framework.Configuration.BLL/ConfigurationEventSystem.cs b/src/_Configuration/Framework.Configuration.BLL/ConfigurationEventSystem.cs index c562f9745..e89b7ea0f 100644 --- a/src/_Configuration/Framework.Configuration.BLL/ConfigurationEventSystem.cs +++ b/src/_Configuration/Framework.Configuration.BLL/ConfigurationEventSystem.cs @@ -26,3 +26,4 @@ private DomainTypeEventModel ToDomainTypeEventModel(EventModel eventModel) return new DomainTypeEventModel { Operation = operation, DomainObjectIdents = [.. eventModel.DomainObjectIdents], Revision = eventModel.Revision, }; } } + diff --git a/src/_Configuration/Framework.Configuration.BLL/ConfigurationNamedLock.cs b/src/_Configuration/Framework.Configuration.BLL/ConfigurationNamedLock.cs index aa072606f..4f43aae5a 100644 --- a/src/_Configuration/Framework.Configuration.BLL/ConfigurationNamedLock.cs +++ b/src/_Configuration/Framework.Configuration.BLL/ConfigurationNamedLock.cs @@ -5,9 +5,10 @@ namespace Framework.Configuration.BLL; public static class ConfigurationNamedLock { - public static NamedLock UpdateDomainTypeLock { get; } = new (nameof(UpdateDomainTypeLock), typeof(DomainType)); + public static NamedLock UpdateDomainTypeLock { get; } = new(nameof(UpdateDomainTypeLock), typeof(DomainType)); - public static NamedLock UpdateSequence { get; } = new (nameof(UpdateSequence), typeof(Sequence)); + public static NamedLock UpdateSequence { get; } = new(nameof(UpdateSequence), typeof(Sequence)); - public static NamedLock ProcessModifications { get; } = new (nameof(ProcessModifications), typeof(DomainObjectModification)); + public static NamedLock ProcessModifications { get; } = new(nameof(ProcessModifications), typeof(DomainObjectModification)); } + diff --git a/src/_Configuration/Framework.Configuration.BLL/ConfigurationSentNotificationLogger.cs b/src/_Configuration/Framework.Configuration.BLL/ConfigurationSentNotificationLogger.cs index 6dbbc87bf..c01867cd6 100644 --- a/src/_Configuration/Framework.Configuration.BLL/ConfigurationSentNotificationLogger.cs +++ b/src/_Configuration/Framework.Configuration.BLL/ConfigurationSentNotificationLogger.cs @@ -10,3 +10,4 @@ public Task LogAsync(Framework.Notification.Domain.Notification notification, Ca sentMessageRepositoryFactory.Create().SaveAsync(notification.ToSentMessage(), cancellationToken); } + diff --git a/src/_Configuration/Framework.Configuration.BLL/ConfigurationValidator.SystemConstant.cs b/src/_Configuration/Framework.Configuration.BLL/ConfigurationValidator.SystemConstant.cs index 49a3629c3..d4cf7bc81 100644 --- a/src/_Configuration/Framework.Configuration.BLL/ConfigurationValidator.SystemConstant.cs +++ b/src/_Configuration/Framework.Configuration.BLL/ConfigurationValidator.SystemConstant.cs @@ -33,3 +33,4 @@ protected override ValidationResult GetSystemConstantValidationResult(SystemCons } } } + diff --git a/src/_Configuration/Framework.Configuration.BLL/DomainObjectEventBLL.cs b/src/_Configuration/Framework.Configuration.BLL/DomainObjectEventBLL.cs index 3bdc69b45..1e1adc4a7 100644 --- a/src/_Configuration/Framework.Configuration.BLL/DomainObjectEventBLL.cs +++ b/src/_Configuration/Framework.Configuration.BLL/DomainObjectEventBLL.cs @@ -13,3 +13,4 @@ public QueueProcessingState GetProcessingState() => LastProcessedItemDateTime = this.GetUnsecureQueryable().Where(mod => mod.Status == QueueProgressStatus.Processed).Max(mod => mod.ProcessDate) }; } + diff --git a/src/_Configuration/Framework.Configuration.BLL/DomainObjectModificationBLL.cs b/src/_Configuration/Framework.Configuration.BLL/DomainObjectModificationBLL.cs index 31d887b29..f632d6a28 100644 --- a/src/_Configuration/Framework.Configuration.BLL/DomainObjectModificationBLL.cs +++ b/src/_Configuration/Framework.Configuration.BLL/DomainObjectModificationBLL.cs @@ -1,4 +1,6 @@ -using Framework.Configuration.Domain; +using Anch.SecuritySystem.Providers; + +using Framework.Configuration.Domain; using Framework.Core; using Framework.Database; using Framework.Database.Domain; @@ -7,8 +9,6 @@ using Microsoft.Extensions.Logging; -using Anch.SecuritySystem.Providers; - namespace Framework.Configuration.BLL; public partial class DomainObjectModificationBLL( @@ -83,3 +83,4 @@ public QueueProcessingState GetProcessingState() => LastProcessedItemDateTime = this.GetUnsecureQueryable().Where(mod => mod.Processed).Max(mod => mod.ModifyDate) }; } + diff --git a/src/_Configuration/Framework.Configuration.BLL/DomainObjectNotificationBLL.cs b/src/_Configuration/Framework.Configuration.BLL/DomainObjectNotificationBLL.cs index b061cae05..016ddc6ea 100644 --- a/src/_Configuration/Framework.Configuration.BLL/DomainObjectNotificationBLL.cs +++ b/src/_Configuration/Framework.Configuration.BLL/DomainObjectNotificationBLL.cs @@ -13,3 +13,4 @@ public QueueProcessingState GetProcessingState() => LastProcessedItemDateTime = this.GetUnsecureQueryable().Where(mod => mod.Status == QueueProgressStatus.Processed).Max(mod => mod.ProcessDate) }; } + diff --git a/src/_Configuration/Framework.Configuration.BLL/DomainObjectVersionsResolver.cs b/src/_Configuration/Framework.Configuration.BLL/DomainObjectVersionsResolver.cs index 828b4f963..9a0d70a2c 100644 --- a/src/_Configuration/Framework.Configuration.BLL/DomainObjectVersionsResolver.cs +++ b/src/_Configuration/Framework.Configuration.BLL/DomainObjectVersionsResolver.cs @@ -60,3 +60,4 @@ private TDomainObject GetDomainObjectByRevisionNumber(Guid domainObjectId, long return result; } } + diff --git a/src/_Configuration/Framework.Configuration.BLL/DomainObjectVersionsResolverFactory.cs b/src/_Configuration/Framework.Configuration.BLL/DomainObjectVersionsResolverFactory.cs index 23643c839..ea96e7ade 100644 --- a/src/_Configuration/Framework.Configuration.BLL/DomainObjectVersionsResolverFactory.cs +++ b/src/_Configuration/Framework.Configuration.BLL/DomainObjectVersionsResolverFactory.cs @@ -15,3 +15,4 @@ public IDomainObjectVersionsResolver Create(Type domainObjectType) return serviceProxyFactory.Create(domainObjectVersionsResolverType); } } + diff --git a/src/_Configuration/Framework.Configuration.BLL/DomainTypeBLL.cs b/src/_Configuration/Framework.Configuration.BLL/DomainTypeBLL.cs index 4dff3b1df..a30bafc1f 100644 --- a/src/_Configuration/Framework.Configuration.BLL/DomainTypeBLL.cs +++ b/src/_Configuration/Framework.Configuration.BLL/DomainTypeBLL.cs @@ -21,3 +21,4 @@ public async Task ForceEventAsync(DomainTypeEventModel eventModel, CancellationT await this.Context.TargetSystemServices.Values.Single(tss => tss.TargetSystem == targetSystem).ForceEventAsync(eventModel, cancellationToken); } } + diff --git a/src/_Configuration/Framework.Configuration.BLL/Jobs/ISendNotificationsJob.cs b/src/_Configuration/Framework.Configuration.BLL/Jobs/ISendNotificationsJob.cs index bdc75af8e..972d13831 100644 --- a/src/_Configuration/Framework.Configuration.BLL/Jobs/ISendNotificationsJob.cs +++ b/src/_Configuration/Framework.Configuration.BLL/Jobs/ISendNotificationsJob.cs @@ -3,3 +3,4 @@ namespace Framework.Configuration.BLL.Jobs; public interface ISendNotificationsJob : IJob; + diff --git a/src/_Configuration/Framework.Configuration.BLL/MailMessageExtensions.cs b/src/_Configuration/Framework.Configuration.BLL/MailMessageExtensions.cs index 91ebfaeb9..cd6e6bac3 100644 --- a/src/_Configuration/Framework.Configuration.BLL/MailMessageExtensions.cs +++ b/src/_Configuration/Framework.Configuration.BLL/MailMessageExtensions.cs @@ -18,3 +18,4 @@ public static SentMessage ToSentMessage(this Framework.Notification.Domain.Notif notification.TechnicalInformation.ContextObjectId, string.Join(",", notification.Message.ReplyToList.Select(z => z.Address))); } + diff --git a/src/_Configuration/Framework.Configuration.BLL/Notification/LocalDbNotificationMessageSender.cs b/src/_Configuration/Framework.Configuration.BLL/Notification/LocalDbNotificationMessageSender.cs index 796ca6542..9fd27dee9 100644 --- a/src/_Configuration/Framework.Configuration.BLL/Notification/LocalDbNotificationMessageSender.cs +++ b/src/_Configuration/Framework.Configuration.BLL/Notification/LocalDbNotificationMessageSender.cs @@ -1,11 +1,11 @@ -using Framework.Application.Repository; +using Anch.SecuritySystem.Attributes; + +using Framework.Application.Repository; using Framework.Configuration.Domain; -using Framework.Core.Helpers; using Framework.Core; +using Framework.Core.Helpers; using Framework.Notification.DTO; -using Anch.SecuritySystem.Attributes; - namespace Framework.Configuration.BLL.Notification; /// @@ -25,3 +25,4 @@ public async Task SendAsync(Framework.Notification.Domain.Notification notificat await domainObjectNotificationRepository.SaveAsync(dbNotification, cancellationToken); } } + diff --git a/src/_Configuration/Framework.Configuration.BLL/SecurityDomainBLLBase.cs b/src/_Configuration/Framework.Configuration.BLL/SecurityDomainBLLBase.cs index 6bdfa43b3..baf584224 100644 --- a/src/_Configuration/Framework.Configuration.BLL/SecurityDomainBLLBase.cs +++ b/src/_Configuration/Framework.Configuration.BLL/SecurityDomainBLLBase.cs @@ -50,3 +50,4 @@ public override void Save(TDomainObject value) base.Save(value); } } + diff --git a/src/_Configuration/Framework.Configuration.BLL/SequenceBLL.cs b/src/_Configuration/Framework.Configuration.BLL/SequenceBLL.cs index 399a8b4fd..e284cb85f 100644 --- a/src/_Configuration/Framework.Configuration.BLL/SequenceBLL.cs +++ b/src/_Configuration/Framework.Configuration.BLL/SequenceBLL.cs @@ -31,3 +31,4 @@ public long GetNextNumber(string name) public Sequence Create(SequenceCreateModel createModel) => new(); } + diff --git a/src/_Configuration/Framework.Configuration.BLL/SystemConstantBLL.cs b/src/_Configuration/Framework.Configuration.BLL/SystemConstantBLL.cs index 8c7eb7d9a..595f5a414 100644 --- a/src/_Configuration/Framework.Configuration.BLL/SystemConstantBLL.cs +++ b/src/_Configuration/Framework.Configuration.BLL/SystemConstantBLL.cs @@ -1,9 +1,9 @@ -using Framework.Application.ApplicationVariable; +using Anch.SecuritySystem.Providers; + +using Framework.Application.ApplicationVariable; using Framework.Configuration.Domain; using Framework.Tracking; -using Anch.SecuritySystem.Providers; - namespace Framework.Configuration.BLL; public partial class SystemConstantBLL( @@ -35,3 +35,4 @@ public T GetValue(ApplicationVariable applicationVariable) return serializer.Parse(systemConstant.Value); } } + diff --git a/src/_Configuration/Framework.Configuration.BLL/SystemConstantInitializer.cs b/src/_Configuration/Framework.Configuration.BLL/SystemConstantInitializer.cs index de781377c..da5fd442e 100644 --- a/src/_Configuration/Framework.Configuration.BLL/SystemConstantInitializer.cs +++ b/src/_Configuration/Framework.Configuration.BLL/SystemConstantInitializer.cs @@ -1,15 +1,13 @@ using System.Reflection; using Anch.Core; +using Anch.GenericQueryable; +using Anch.SecuritySystem.Attributes; using Framework.Application.ApplicationVariable; using Framework.Application.Repository; using Framework.Configuration.Domain; -using Anch.GenericQueryable; - -using Anch.SecuritySystem.Attributes; - namespace Framework.Configuration.BLL; public class SystemConstantInitializer(IConfigurationBLLContext context, [DisabledSecurity] IRepository repository, IEnumerable infoList) @@ -55,3 +53,4 @@ private async Task Initialize(ApplicationVariable typedSystemConstant, IRe } } } + diff --git a/src/_Configuration/Framework.Configuration.BLL/TargetSystemService/TargetSystemInitializer.cs b/src/_Configuration/Framework.Configuration.BLL/TargetSystemService/TargetSystemInitializer.cs index 1d1dc0b1f..51eef043a 100644 --- a/src/_Configuration/Framework.Configuration.BLL/TargetSystemService/TargetSystemInitializer.cs +++ b/src/_Configuration/Framework.Configuration.BLL/TargetSystemService/TargetSystemInitializer.cs @@ -34,9 +34,11 @@ private void Register(TargetSystemInfo targetSystemInfo) var targetSystem = bll.GetById(targetSystemInfo.Id, false, new DTOFetchRule(MainDTOType.RichDTO)) ?? new TargetSystem(isBase, persistentTargetSystemInfo?.IsMain ?? false, persistentTargetSystemInfo?.IsRevision ?? false) - { - Name = targetSystemInfo.Name, SubscriptionEnabled = !isBase, Id = targetSystemInfo.Id - }.Self(bll.Insert); + { + Name = targetSystemInfo.Name, + SubscriptionEnabled = !isBase, + Id = targetSystemInfo.Id + }.Self(bll.Insert); var mergeResult = targetSystem.DomainTypes.GetMergeResult(targetSystemInfo.Domain.Types, t => t.Id, t => t.Id); @@ -84,3 +86,4 @@ private void Register(TargetSystemInfo targetSystemInfo) } } } + diff --git a/src/_Configuration/Framework.Configuration.BLL/TargetSystemService/TargetSystemService.cs b/src/_Configuration/Framework.Configuration.BLL/TargetSystemService/TargetSystemService.cs index ee6fd8ab9..1db9525c8 100644 --- a/src/_Configuration/Framework.Configuration.BLL/TargetSystemService/TargetSystemService.cs +++ b/src/_Configuration/Framework.Configuration.BLL/TargetSystemService/TargetSystemService.cs @@ -86,3 +86,4 @@ public IEnumerable> GetObjectModifications(DALChang } } } + diff --git a/src/_Configuration/Framework.Configuration.BLL/_Generated/Configuration.Validator.Generated.cs b/src/_Configuration/Framework.Configuration.BLL/_Generated/Configuration.Validator.Generated.cs index dbcffcd88..2e3d5299f 100644 --- a/src/_Configuration/Framework.Configuration.BLL/_Generated/Configuration.Validator.Generated.cs +++ b/src/_Configuration/Framework.Configuration.BLL/_Generated/Configuration.Validator.Generated.cs @@ -133,8 +133,4 @@ public ConfigurationValidator(Framework.Configuration.BLL.IConfigurationBLLConte { } } - - public partial interface IConfigurationValidator : Framework.Validation.IValidator - { - } } diff --git a/src/_Configuration/Framework.Configuration.Domain.Models/Filters/DomainTypeRootFilterModel.cs b/src/_Configuration/Framework.Configuration.Domain.Models/Filters/DomainTypeRootFilterModel.cs index d201b0c88..2aceae112 100644 --- a/src/_Configuration/Framework.Configuration.Domain.Models/Filters/DomainTypeRootFilterModel.cs +++ b/src/_Configuration/Framework.Configuration.Domain.Models/Filters/DomainTypeRootFilterModel.cs @@ -15,3 +15,4 @@ public override Expression> ToFilterExpression() return domainType => targetSystem == null || targetSystem == domainType.TargetSystem; } } + diff --git a/src/_Configuration/Framework.Configuration.Domain.Models/Filters/TargetSystemRootFilterModel.cs b/src/_Configuration/Framework.Configuration.Domain.Models/Filters/TargetSystemRootFilterModel.cs index acc2ae34a..ecf48fc3f 100644 --- a/src/_Configuration/Framework.Configuration.Domain.Models/Filters/TargetSystemRootFilterModel.cs +++ b/src/_Configuration/Framework.Configuration.Domain.Models/Filters/TargetSystemRootFilterModel.cs @@ -32,3 +32,4 @@ protected override IEnumerable>> ToFilterExp } } } + diff --git a/src/_Configuration/Framework.Configuration.Domain.Models/Filters/_Base/DomainObjectFilterModel.cs b/src/_Configuration/Framework.Configuration.Domain.Models/Filters/_Base/DomainObjectFilterModel.cs index 55a06211b..aa3fa9a14 100644 --- a/src/_Configuration/Framework.Configuration.Domain.Models/Filters/_Base/DomainObjectFilterModel.cs +++ b/src/_Configuration/Framework.Configuration.Domain.Models/Filters/_Base/DomainObjectFilterModel.cs @@ -10,3 +10,4 @@ public abstract class DomainObjectFilterModel : DomainObjectBase, { public virtual Expression> ToFilterExpression() => _ => true; } + diff --git a/src/_Configuration/Framework.Configuration.Domain.Models/Filters/_Base/DomainObjectMultiFilterModel.cs b/src/_Configuration/Framework.Configuration.Domain.Models/Filters/_Base/DomainObjectMultiFilterModel.cs index 1c0d922f9..e1045009e 100644 --- a/src/_Configuration/Framework.Configuration.Domain.Models/Filters/_Base/DomainObjectMultiFilterModel.cs +++ b/src/_Configuration/Framework.Configuration.Domain.Models/Filters/_Base/DomainObjectMultiFilterModel.cs @@ -12,3 +12,4 @@ public abstract class DomainObjectMultiFilterModel : DomainObject protected abstract IEnumerable>> ToFilterExpressionItems(); } + diff --git a/src/_Configuration/Framework.Configuration.Domain.Models/_Legacy/DomainTypeEventModel.cs b/src/_Configuration/Framework.Configuration.Domain.Models/_Legacy/DomainTypeEventModel.cs index 9f8d823bc..794badda1 100644 --- a/src/_Configuration/Framework.Configuration.Domain.Models/_Legacy/DomainTypeEventModel.cs +++ b/src/_Configuration/Framework.Configuration.Domain.Models/_Legacy/DomainTypeEventModel.cs @@ -27,3 +27,4 @@ public class DomainTypeEventModel : DomainObjectBase /// public long? Revision { get; set; } } + diff --git a/src/_Configuration/Framework.Configuration.Domain/DomainObjectQueue/DomainObjectEvent.cs b/src/_Configuration/Framework.Configuration.Domain/DomainObjectQueue/DomainObjectEvent.cs index 8c8ac223c..0793b81f3 100644 --- a/src/_Configuration/Framework.Configuration.Domain/DomainObjectQueue/DomainObjectEvent.cs +++ b/src/_Configuration/Framework.Configuration.Domain/DomainObjectQueue/DomainObjectEvent.cs @@ -89,3 +89,4 @@ public virtual int Size //// get { return this.number; } ////} } + diff --git a/src/_Configuration/Framework.Configuration.Domain/DomainObjectQueue/DomainObjectModification.cs b/src/_Configuration/Framework.Configuration.Domain/DomainObjectQueue/DomainObjectModification.cs index 48b1af2f3..78e35c64b 100644 --- a/src/_Configuration/Framework.Configuration.Domain/DomainObjectQueue/DomainObjectModification.cs +++ b/src/_Configuration/Framework.Configuration.Domain/DomainObjectQueue/DomainObjectModification.cs @@ -72,3 +72,4 @@ public virtual long Version set => this.version = value; } } + diff --git a/src/_Configuration/Framework.Configuration.Domain/DomainObjectQueue/DomainObjectNotification.cs b/src/_Configuration/Framework.Configuration.Domain/DomainObjectQueue/DomainObjectNotification.cs index a0c9ed2a6..3c6a6bb89 100644 --- a/src/_Configuration/Framework.Configuration.Domain/DomainObjectQueue/DomainObjectNotification.cs +++ b/src/_Configuration/Framework.Configuration.Domain/DomainObjectQueue/DomainObjectNotification.cs @@ -40,3 +40,4 @@ public virtual int Size set => this.size = value; } } + diff --git a/src/_Configuration/Framework.Configuration.Domain/SentMessage.cs b/src/_Configuration/Framework.Configuration.Domain/SentMessage.cs index 8a7b7c6e7..d9a26359d 100644 --- a/src/_Configuration/Framework.Configuration.Domain/SentMessage.cs +++ b/src/_Configuration/Framework.Configuration.Domain/SentMessage.cs @@ -105,3 +105,4 @@ public SentMessage(string @from, string to, string subject, string message, stri [MaxLength] public virtual string ReplyTo => this.replyTo; } + diff --git a/src/_Configuration/Framework.Configuration.Domain/Sequence.cs b/src/_Configuration/Framework.Configuration.Domain/Sequence.cs index f10f7dbf2..4d3afdfb6 100644 --- a/src/_Configuration/Framework.Configuration.Domain/Sequence.cs +++ b/src/_Configuration/Framework.Configuration.Domain/Sequence.cs @@ -21,3 +21,4 @@ public virtual long Number set => this.number = value; } } + diff --git a/src/_Configuration/Framework.Configuration.Domain/SystemConstant.cs b/src/_Configuration/Framework.Configuration.Domain/SystemConstant.cs index 0bbd2280a..86bb0ded8 100644 --- a/src/_Configuration/Framework.Configuration.Domain/SystemConstant.cs +++ b/src/_Configuration/Framework.Configuration.Domain/SystemConstant.cs @@ -92,3 +92,4 @@ public virtual bool IsManual public override string ToString() => this.Code; } + diff --git a/src/_Configuration/Framework.Configuration.Domain/TargetSystem/TargetSystem.cs b/src/_Configuration/Framework.Configuration.Domain/TargetSystem/TargetSystem.cs index 46719bce1..b149f5457 100644 --- a/src/_Configuration/Framework.Configuration.Domain/TargetSystem/TargetSystem.cs +++ b/src/_Configuration/Framework.Configuration.Domain/TargetSystem/TargetSystem.cs @@ -78,3 +78,4 @@ public virtual bool SubscriptionEnabled #endregion } + diff --git a/src/_Configuration/Framework.Configuration.Domain/TargetSystem/Type/DomainType.cs b/src/_Configuration/Framework.Configuration.Domain/TargetSystem/Type/DomainType.cs index 84ad90341..f6923486a 100644 --- a/src/_Configuration/Framework.Configuration.Domain/TargetSystem/Type/DomainType.cs +++ b/src/_Configuration/Framework.Configuration.Domain/TargetSystem/Type/DomainType.cs @@ -69,3 +69,4 @@ public DomainType(TargetSystem targetSystem) ICollection IMaster.Details => (ICollection)this.EventOperations; } + diff --git a/src/_Configuration/Framework.Configuration.Domain/TargetSystem/Type/DomainTypeEventOperation.cs b/src/_Configuration/Framework.Configuration.Domain/TargetSystem/Type/DomainTypeEventOperation.cs index 13c4ae27a..76bf9069d 100644 --- a/src/_Configuration/Framework.Configuration.Domain/TargetSystem/Type/DomainTypeEventOperation.cs +++ b/src/_Configuration/Framework.Configuration.Domain/TargetSystem/Type/DomainTypeEventOperation.cs @@ -35,3 +35,4 @@ public DomainTypeEventOperation(DomainType domainType) DomainType IDetail.Master => this.DomainType; } + diff --git a/src/_Configuration/Framework.Configuration.Domain/__Base/AuditPersistentDomainObjectBase.cs b/src/_Configuration/Framework.Configuration.Domain/__Base/AuditPersistentDomainObjectBase.cs index 38796f30d..d4a019795 100644 --- a/src/_Configuration/Framework.Configuration.Domain/__Base/AuditPersistentDomainObjectBase.cs +++ b/src/_Configuration/Framework.Configuration.Domain/__Base/AuditPersistentDomainObjectBase.cs @@ -24,7 +24,7 @@ protected AuditPersistentDomainObjectBase() } protected AuditPersistentDomainObjectBase(Guid id) - : base (id) + : base(id) { } @@ -71,3 +71,4 @@ public virtual string? CreatedBy internal protected set => this.createdBy = value.TrimNull(); } } + diff --git a/src/_Configuration/Framework.Configuration.Domain/__Base/BaseDirectory.cs b/src/_Configuration/Framework.Configuration.Domain/__Base/BaseDirectory.cs index 1b969deac..87fbe5d71 100644 --- a/src/_Configuration/Framework.Configuration.Domain/__Base/BaseDirectory.cs +++ b/src/_Configuration/Framework.Configuration.Domain/__Base/BaseDirectory.cs @@ -25,3 +25,4 @@ public virtual string Name public override string ToString() => this.Name; } + diff --git a/src/_Configuration/Framework.Configuration.Domain/__Base/PersistentDomainObjectBase.cs b/src/_Configuration/Framework.Configuration.Domain/__Base/PersistentDomainObjectBase.cs index 15874ae24..186ab1f1b 100644 --- a/src/_Configuration/Framework.Configuration.Domain/__Base/PersistentDomainObjectBase.cs +++ b/src/_Configuration/Framework.Configuration.Domain/__Base/PersistentDomainObjectBase.cs @@ -16,7 +16,7 @@ protected PersistentDomainObjectBase() } protected PersistentDomainObjectBase(Guid id) - : this () => + : this() => this.id = id; #endregion @@ -45,3 +45,4 @@ public virtual Guid Id public override int GetHashCode() => this.Id.IsDefault() ? base.GetHashCode() : this.Id.GetHashCode(); } + diff --git a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/ConfigurationMappingSettings.cs b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/ConfigurationMappingSettings.cs index 42c2ee0ee..74f918733 100644 --- a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/ConfigurationMappingSettings.cs +++ b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/ConfigurationMappingSettings.cs @@ -12,3 +12,4 @@ public ConfigurationMappingSettings() { } } + diff --git a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/Base/ConfigurationBaseMap.cs b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/Base/ConfigurationBaseMap.cs index d5f41ad07..1daf980d4 100644 --- a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/Base/ConfigurationBaseMap.cs +++ b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/Base/ConfigurationBaseMap.cs @@ -21,3 +21,4 @@ protected ConfigurationBaseMap() this.Map(x => x.ModifyDate); } } + diff --git a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainObjectEventMap.cs b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainObjectEventMap.cs index 4a9bec546..4d0e5c32a 100644 --- a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainObjectEventMap.cs +++ b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainObjectEventMap.cs @@ -19,3 +19,4 @@ public DomainObjectEventMap() this.References(x => x.Operation).Column($"{nameof(DomainObjectEvent.Operation)}Id"); } } + diff --git a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainObjectModificationMap.cs b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainObjectModificationMap.cs index 347c2ced7..83650b275 100644 --- a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainObjectModificationMap.cs +++ b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainObjectModificationMap.cs @@ -22,3 +22,4 @@ public DomainObjectModificationMap() this.Version(x => x.Version).Generated.Never().Not.Nullable(); } } + diff --git a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainObjectNotificationMap.cs b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainObjectNotificationMap.cs index d3ddcdf18..9840875e2 100644 --- a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainObjectNotificationMap.cs +++ b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainObjectNotificationMap.cs @@ -14,3 +14,4 @@ public DomainObjectNotificationMap() this.Map(x => x.Status); } } + diff --git a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainTypeEventOperationMap.cs b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainTypeEventOperationMap.cs index 6fddb72dc..d723b867c 100644 --- a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainTypeEventOperationMap.cs +++ b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainTypeEventOperationMap.cs @@ -15,3 +15,4 @@ public DomainTypeEventOperationMap() .Not.Nullable(); } } + diff --git a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainTypeMap.cs b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainTypeMap.cs index b9ef63f6f..fccfe284e 100644 --- a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainTypeMap.cs +++ b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/DomainTypeMap.cs @@ -17,3 +17,4 @@ public DomainTypeMap() this.HasMany(x => x.EventOperations).AsSet().Inverse().Cascade.AllDeleteOrphan(); } } + diff --git a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/SentMessageMap.cs b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/SentMessageMap.cs index 9b48e5275..6aa066dcb 100644 --- a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/SentMessageMap.cs +++ b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/SentMessageMap.cs @@ -19,3 +19,4 @@ public SentMessageMap() this.Map(x => x.To).Length(int.MaxValue); } } + diff --git a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/SequenceMap.cs b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/SequenceMap.cs index c12b5b97c..6400d66b4 100644 --- a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/SequenceMap.cs +++ b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/SequenceMap.cs @@ -11,3 +11,4 @@ public SequenceMap() this.Map(x => x.Number); } } + diff --git a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/SystemConstantMap.cs b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/SystemConstantMap.cs index 7ada40ceb..0f128f9c7 100644 --- a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/SystemConstantMap.cs +++ b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/SystemConstantMap.cs @@ -14,3 +14,4 @@ public SystemConstantMap() this.References(x => x.Type).Column($"{nameof(SystemConstant.Type)}Id").Not.Nullable(); } } + diff --git a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/TargetSystemMap.cs b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/TargetSystemMap.cs index eb606ffef..4d807dd42 100644 --- a/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/TargetSystemMap.cs +++ b/src/_Configuration/Framework.Configuration.Generated.DAL.NHibernate/Mapping/TargetSystemMap.cs @@ -15,3 +15,4 @@ public TargetSystemMap() this.HasMany(x => x.DomainTypes).AsSet().Inverse().Cascade.AllDeleteOrphan(); } } + diff --git a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/BLL/BLLGeneratorConfiguration.cs b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/BLL/BLLGeneratorConfiguration.cs index ab665ea17..5a2befe0d 100644 --- a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/BLL/BLLGeneratorConfiguration.cs +++ b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/BLL/BLLGeneratorConfiguration.cs @@ -7,3 +7,4 @@ public class BLLGeneratorConfiguration(ConfigurationGenerationEnvironment enviro { public override bool GenerateBllConstructor(Type domainType) => !new[] { typeof(DomainObjectModification), typeof(SystemConstant) }.Contains(domainType) && base.GenerateBllConstructor(domainType); } + diff --git a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/BLLCore/BLLCoreGeneratorConfiguration.cs b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/BLLCore/BLLCoreGeneratorConfiguration.cs index 4c71c568c..a5eb9f099 100644 --- a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/BLLCore/BLLCoreGeneratorConfiguration.cs +++ b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/BLLCore/BLLCoreGeneratorConfiguration.cs @@ -10,3 +10,4 @@ public partial class BLLCoreGeneratorConfiguration(ConfigurationGenerationEnviro public override Type CreateModelType { get; } = typeof(DomainObjectCreateModel<>); } + diff --git a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/ConfigurationGenerationEnvironment.Impl.cs b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/ConfigurationGenerationEnvironment.Impl.cs index 9ff07753b..6b14e363e 100644 --- a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/ConfigurationGenerationEnvironment.Impl.cs +++ b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/ConfigurationGenerationEnvironment.Impl.cs @@ -19,3 +19,4 @@ public partial class ConfigurationGenerationEnvironment : IServerDTOGeneratorConfiguration IServerDTOGeneratorConfigurationContainer.ServerDTO => this.ServerDTO; } + diff --git a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/ConfigurationGenerationEnvironment.cs b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/ConfigurationGenerationEnvironment.cs index 35471a299..e3159ebec 100644 --- a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/ConfigurationGenerationEnvironment.cs +++ b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/ConfigurationGenerationEnvironment.cs @@ -104,3 +104,4 @@ protected override IEnumerable GetExtendedAttributeSour public static readonly ConfigurationGenerationEnvironment Default = new(new DatabaseName("", "configuration")); } + diff --git a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/DTO/ServerDTOGeneratorConfiguration.cs b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/DTO/ServerDTOGeneratorConfiguration.cs index e60e3c01c..50df6c01a 100644 --- a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/DTO/ServerDTOGeneratorConfiguration.cs +++ b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/DTO/ServerDTOGeneratorConfiguration.cs @@ -21,3 +21,4 @@ public class ServerDTOGeneratorConfiguration(ConfigurationGenerationEnvironment protected override IGeneratePolicy CreateGeneratePolicy() => new DTORoleGeneratePolicy(DTORole.Client); } + diff --git a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/Services/Main/MainServiceGeneratorConfiguration.cs b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/Services/Main/MainServiceGeneratorConfiguration.cs index 339852312..74bf99e01 100644 --- a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/Services/Main/MainServiceGeneratorConfiguration.cs +++ b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/Services/Main/MainServiceGeneratorConfiguration.cs @@ -6,3 +6,4 @@ public class MainServiceGeneratorConfiguration(ConfigurationGenerationEnvironmen { public override string ImplementClassName { get; } = "ConfigurationFacade"; } + diff --git a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/Services/QueryService/QueryServiceGeneratorConfiguration.cs b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/Services/QueryService/QueryServiceGeneratorConfiguration.cs index fab7607d4..d9086a4d4 100644 --- a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/Services/QueryService/QueryServiceGeneratorConfiguration.cs +++ b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/Services/QueryService/QueryServiceGeneratorConfiguration.cs @@ -3,3 +3,4 @@ namespace Framework.Configuration.TestGenerate.Configurations.Services.QueryService; public class QueryServiceGeneratorConfiguration(ConfigurationGenerationEnvironment environment) : QueryGeneratorConfigurationBase(environment); + diff --git a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/Services/WebApi/MainControllerConfiguration.cs b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/Services/WebApi/MainControllerConfiguration.cs index 14ea432d3..b1b8682d1 100644 --- a/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/Services/WebApi/MainControllerConfiguration.cs +++ b/src/_Configuration/Framework.Configuration.TestGenerate/Configurations/Services/WebApi/MainControllerConfiguration.cs @@ -8,3 +8,4 @@ public class MainControllerConfiguration(ConfigurationGenerationEnvironment envi public override string ImplementClassName { get; } = "ConfigMainController"; } + diff --git a/src/_Configuration/Framework.Configuration.TestGenerate/GeneratorsBase.cs b/src/_Configuration/Framework.Configuration.TestGenerate/GeneratorsBase.cs index 4caea21ef..5822083e8 100644 --- a/src/_Configuration/Framework.Configuration.TestGenerate/GeneratorsBase.cs +++ b/src/_Configuration/Framework.Configuration.TestGenerate/GeneratorsBase.cs @@ -11,3 +11,4 @@ public abstract class GeneratorsBase protected abstract string GeneratePath { get; } } + diff --git a/src/_Configuration/Framework.Configuration.TestGenerate/ServerGenerators.DB.cs b/src/_Configuration/Framework.Configuration.TestGenerate/ServerGenerators.DB.cs index a6158e6ea..b8ddd6a4b 100644 --- a/src/_Configuration/Framework.Configuration.TestGenerate/ServerGenerators.DB.cs +++ b/src/_Configuration/Framework.Configuration.TestGenerate/ServerGenerators.DB.cs @@ -50,3 +50,4 @@ public string GenerateDB( return lines; } } + diff --git a/src/_Configuration/Framework.Configuration.TestGenerate/ServerGenerators.Initialize.cs b/src/_Configuration/Framework.Configuration.TestGenerate/ServerGenerators.Initialize.cs index 1cb5343e8..c00a8bab2 100644 --- a/src/_Configuration/Framework.Configuration.TestGenerate/ServerGenerators.Initialize.cs +++ b/src/_Configuration/Framework.Configuration.TestGenerate/ServerGenerators.Initialize.cs @@ -8,3 +8,4 @@ public partial class ServerGenerators(ConfigurationGenerationEnvironment? enviro protected override string GeneratePath => this.FrameworkPath + @"/src/_Configuration"; } + diff --git a/src/_Configuration/Framework.Configuration.TestGenerate/ServerGenerators.cs b/src/_Configuration/Framework.Configuration.TestGenerate/ServerGenerators.cs index ec3159588..d85e6effa 100644 --- a/src/_Configuration/Framework.Configuration.TestGenerate/ServerGenerators.cs +++ b/src/_Configuration/Framework.Configuration.TestGenerate/ServerGenerators.cs @@ -3,7 +3,6 @@ using Framework.CodeGeneration.DTOGenerator.Server; using Framework.CodeGeneration.Extensions; using Framework.CodeGeneration.WebApiGenerator.SingleController; - using Framework.FileGeneration; namespace Framework.Configuration.TestGenerate; @@ -67,3 +66,4 @@ private IEnumerable GenerateMainController() yield return generator.GenerateSingle(outputPath, "Configuration.Generated", this.CheckOutService); } } + diff --git a/src/_Configuration/Framework.Configuration.WebApi/ConfigMainController.cs b/src/_Configuration/Framework.Configuration.WebApi/ConfigMainController.cs index 8f74290e0..779409bc6 100644 --- a/src/_Configuration/Framework.Configuration.WebApi/ConfigMainController.cs +++ b/src/_Configuration/Framework.Configuration.WebApi/ConfigMainController.cs @@ -1,8 +1,8 @@ using Framework.Configuration.Generated.DTO; using Framework.Infrastructure; - using IConfigurationBLLContext = Framework.Configuration.BLL.IConfigurationBLLContext; namespace Framework.Configuration.WebApi; public abstract partial class ConfigMainController : ApiControllerBase; + diff --git a/src/_Configuration/Framework.Configuration.WebApi/Impl/DomainTypeService.cs b/src/_Configuration/Framework.Configuration.WebApi/Impl/DomainTypeService.cs index 142d0f50b..66cac9588 100644 --- a/src/_Configuration/Framework.Configuration.WebApi/Impl/DomainTypeService.cs +++ b/src/_Configuration/Framework.Configuration.WebApi/Impl/DomainTypeService.cs @@ -1,7 +1,7 @@ -using Framework.Configuration.Generated.DTO; -using Framework.Database; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using Framework.Configuration.Generated.DTO; +using Framework.Database; using Microsoft.AspNetCore.Mvc; @@ -26,3 +26,4 @@ public void ForceDomainTypeEvent(DomainTypeEventModelStrictDTO domainTypeEventMo }); } } + diff --git a/src/_Configuration/Framework.Configuration.WebApi/Impl/QueueService.cs b/src/_Configuration/Framework.Configuration.WebApi/Impl/QueueService.cs index c56b86b72..d03c0f00d 100644 --- a/src/_Configuration/Framework.Configuration.WebApi/Impl/QueueService.cs +++ b/src/_Configuration/Framework.Configuration.WebApi/Impl/QueueService.cs @@ -1,9 +1,10 @@ -using Framework.Configuration.Generated.DTO; +using Anch.SecuritySystem; + +using Framework.Configuration.Generated.DTO; using Framework.Core; using Framework.Database; using Microsoft.AspNetCore.Mvc; -using Anch.SecuritySystem; // ReSharper disable once CheckNamespace namespace Framework.Configuration.WebApi; @@ -59,3 +60,4 @@ public QueueProcessingStateSimpleDTO GetNotificationQueueProcessingState() => return evaluateData.Context.Logics.DomainObjectNotification.GetProcessingState().ToSimpleDTO(evaluateData.MappingService); }); } + diff --git a/src/_SampleSystem/SampleSystem.AuditDAL.NHibernate/SampleSystemSystemAuditMappingSettings.cs b/src/_SampleSystem/SampleSystem.AuditDAL.NHibernate/SampleSystemSystemAuditMappingSettings.cs index 7c6967bd0..aee3ac038 100644 --- a/src/_SampleSystem/SampleSystem.AuditDAL.NHibernate/SampleSystemSystemAuditMappingSettings.cs +++ b/src/_SampleSystem/SampleSystem.AuditDAL.NHibernate/SampleSystemSystemAuditMappingSettings.cs @@ -9,3 +9,4 @@ public record SampleSystemSystemAuditMappingSettings(DatabaseName DatabaseName) : MappingSettings( typeof(SampleSystemSystemAuditMappingSettings).Assembly, DatabaseName); + diff --git a/src/_SampleSystem/SampleSystem.AuditDAL.NHibernate/SampleSystemSystemRevisionAuditMappingSettings.cs b/src/_SampleSystem/SampleSystem.AuditDAL.NHibernate/SampleSystemSystemRevisionAuditMappingSettings.cs index f635acfe8..388b1257a 100644 --- a/src/_SampleSystem/SampleSystem.AuditDAL.NHibernate/SampleSystemSystemRevisionAuditMappingSettings.cs +++ b/src/_SampleSystem/SampleSystem.AuditDAL.NHibernate/SampleSystemSystemRevisionAuditMappingSettings.cs @@ -9,3 +9,4 @@ public record SampleSystemSystemRevisionAuditMappingSettings(DatabaseName Databa : MappingSettings( typeof(SystemAuditRevisionPersistentDomainObjectBase).Assembly, DatabaseName); + diff --git a/src/_SampleSystem/SampleSystem.AuditDomain/__Base/SystemAuditPersistentDomainObjectBase.cs b/src/_SampleSystem/SampleSystem.AuditDomain/__Base/SystemAuditPersistentDomainObjectBase.cs index 733bbf33e..434447665 100644 --- a/src/_SampleSystem/SampleSystem.AuditDomain/__Base/SystemAuditPersistentDomainObjectBase.cs +++ b/src/_SampleSystem/SampleSystem.AuditDomain/__Base/SystemAuditPersistentDomainObjectBase.cs @@ -40,3 +40,4 @@ public virtual AuditIdentifier Identifier public virtual DateTime? ModifyDate => this.modifyDate; } + diff --git a/src/_SampleSystem/SampleSystem.AuditDomain/__Base/SystemAuditRevisionPersistentDomainObjectBase.cs b/src/_SampleSystem/SampleSystem.AuditDomain/__Base/SystemAuditRevisionPersistentDomainObjectBase.cs index 972502a16..998b3d55a 100644 --- a/src/_SampleSystem/SampleSystem.AuditDomain/__Base/SystemAuditRevisionPersistentDomainObjectBase.cs +++ b/src/_SampleSystem/SampleSystem.AuditDomain/__Base/SystemAuditRevisionPersistentDomainObjectBase.cs @@ -13,3 +13,4 @@ protected SystemAuditRevisionPersistentDomainObjectBase() public virtual long Id => this.id; } + diff --git a/src/_SampleSystem/SampleSystem.BLL.Core/IExampleServiceForRepository.cs b/src/_SampleSystem/SampleSystem.BLL.Core/IExampleServiceForRepository.cs index f2cc37201..be1c69f82 100644 --- a/src/_SampleSystem/SampleSystem.BLL.Core/IExampleServiceForRepository.cs +++ b/src/_SampleSystem/SampleSystem.BLL.Core/IExampleServiceForRepository.cs @@ -7,3 +7,4 @@ public interface IExampleServiceForRepository { Task<(List Employees, List BusinessUnits)> LoadPair(CancellationToken cancellationToken = default); } + diff --git a/src/_SampleSystem/SampleSystem.BLL.Core/ISampleSystemBLLContext.cs b/src/_SampleSystem/SampleSystem.BLL.Core/ISampleSystemBLLContext.cs index a4bf4e599..9e7fc42a1 100644 --- a/src/_SampleSystem/SampleSystem.BLL.Core/ISampleSystemBLLContext.cs +++ b/src/_SampleSystem/SampleSystem.BLL.Core/ISampleSystemBLLContext.cs @@ -1,16 +1,15 @@ -using Framework.Authorization.BLL; +using Anch.OData; +using Anch.SecuritySystem.SecurityAccessor; +using Anch.SecuritySystem.UserSource; + +using Framework.Authorization.BLL; using Framework.BLL; using Framework.Configuration.BLL; using Framework.Validation; -using Anch.OData; - using SampleSystem.Domain; using SampleSystem.Domain.Employee; -using Anch.SecuritySystem.SecurityAccessor; -using Anch.SecuritySystem.UserSource; - namespace SampleSystem.BLL; public partial interface ISampleSystemBLLContext : @@ -27,3 +26,4 @@ public partial interface ISampleSystemBLLContext : ISelectOperationParser SelectOperationParser { get; } } + diff --git a/src/_SampleSystem/SampleSystem.BLL.Core/_Generated/SampleSystem.Generated.cs b/src/_SampleSystem/SampleSystem.BLL.Core/_Generated/SampleSystem.Generated.cs index e25ecf30a..6dc91f454 100644 --- a/src/_SampleSystem/SampleSystem.BLL.Core/_Generated/SampleSystem.Generated.cs +++ b/src/_SampleSystem/SampleSystem.BLL.Core/_Generated/SampleSystem.Generated.cs @@ -1007,4 +1007,8 @@ public partial interface ITestImmutableObjBLL : Framework.BLL.IDefaultSecurityDo public partial interface ITestImmutableObjBLLFactory : Framework.BLL.ISecurityBLLFactory { } + + public partial interface ISampleSystemValidator : Framework.Validation.IValidator + { + } } diff --git a/src/_SampleSystem/SampleSystem.BLL/Base/SecurityDomainBLLBase.cs b/src/_SampleSystem/SampleSystem.BLL/Base/SecurityDomainBLLBase.cs index eb4895978..df3ab7e63 100644 --- a/src/_SampleSystem/SampleSystem.BLL/Base/SecurityDomainBLLBase.cs +++ b/src/_SampleSystem/SampleSystem.BLL/Base/SecurityDomainBLLBase.cs @@ -1,4 +1,5 @@ using Framework.Validation; + using SampleSystem.Domain.Validation; // ReSharper disable once CheckNamespace @@ -51,3 +52,4 @@ public override void Save(TDomainObject value) base.Save(value); } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/BusinessUnitProgramClassBLL.cs b/src/_SampleSystem/SampleSystem.BLL/BusinessUnitProgramClassBLL.cs index 0588c3df1..f0a8249ee 100644 --- a/src/_SampleSystem/SampleSystem.BLL/BusinessUnitProgramClassBLL.cs +++ b/src/_SampleSystem/SampleSystem.BLL/BusinessUnitProgramClassBLL.cs @@ -1,12 +1,10 @@ using System.Linq.Expressions; using Anch.GenericQueryable.Fetching; - using Anch.OData.Domain; using SampleSystem.Domain.BU; using SampleSystem.Domain.Models.Filters; - using BusinessUnitProgramClass = SampleSystem.Domain.Projections.BusinessUnitProgramClass; namespace SampleSystem.BLL; @@ -51,3 +49,4 @@ private Expression> GetFilter(BusinessUnitP return z => childQueryable.Contains(z.Id); } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/Command/CreateClassA/CreateClassAEventHandler.cs b/src/_SampleSystem/SampleSystem.BLL/Command/CreateClassA/CreateClassAEventHandler.cs index 26d2d4014..76d9434fe 100644 --- a/src/_SampleSystem/SampleSystem.BLL/Command/CreateClassA/CreateClassAEventHandler.cs +++ b/src/_SampleSystem/SampleSystem.BLL/Command/CreateClassA/CreateClassAEventHandler.cs @@ -22,3 +22,4 @@ public async Task Handle(CreateClassAEvent request, CancellationToken cancellati await Task.Delay(10000, cancellationToken); } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/Command/CreateClassA/Intergation/ClassACreatedEvent.cs b/src/_SampleSystem/SampleSystem.BLL/Command/CreateClassA/Intergation/ClassACreatedEvent.cs index fcf7968e3..823f6e58f 100644 --- a/src/_SampleSystem/SampleSystem.BLL/Command/CreateClassA/Intergation/ClassACreatedEvent.cs +++ b/src/_SampleSystem/SampleSystem.BLL/Command/CreateClassA/Intergation/ClassACreatedEvent.cs @@ -3,3 +3,4 @@ namespace SampleSystem.BLL.Command.CreateClassA.Intergation; public record ClassACreatedEvent(Guid Id) : IIntegrationEvent; + diff --git a/src/_SampleSystem/SampleSystem.BLL/Command/CreateClassA/Intergation/ClassACreatedEventHandler.cs b/src/_SampleSystem/SampleSystem.BLL/Command/CreateClassA/Intergation/ClassACreatedEventHandler.cs index dbb5da50c..8202786e6 100644 --- a/src/_SampleSystem/SampleSystem.BLL/Command/CreateClassA/Intergation/ClassACreatedEventHandler.cs +++ b/src/_SampleSystem/SampleSystem.BLL/Command/CreateClassA/Intergation/ClassACreatedEventHandler.cs @@ -15,3 +15,4 @@ public async Task Handle(ClassACreatedEvent request, CancellationToken cancellat await repo.RemoveAsync(classA, cancellationToken); } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/Command/CreateIntegrationEvent/CreateIntegrationEventCommand.cs b/src/_SampleSystem/SampleSystem.BLL/Command/CreateIntegrationEvent/CreateIntegrationEventCommand.cs index a5962b707..5f465e925 100644 --- a/src/_SampleSystem/SampleSystem.BLL/Command/CreateIntegrationEvent/CreateIntegrationEventCommand.cs +++ b/src/_SampleSystem/SampleSystem.BLL/Command/CreateIntegrationEvent/CreateIntegrationEventCommand.cs @@ -3,3 +3,4 @@ namespace SampleSystem.BLL.Command.CreateIntegrationEvent; public record CreateIntegrationEventCommand : IRequest; + diff --git a/src/_SampleSystem/SampleSystem.BLL/Command/CreateIntegrationEvent/CreateIntegrationEventHandler.cs b/src/_SampleSystem/SampleSystem.BLL/Command/CreateIntegrationEvent/CreateIntegrationEventHandler.cs index aaf5e129c..2d19deaca 100644 --- a/src/_SampleSystem/SampleSystem.BLL/Command/CreateIntegrationEvent/CreateIntegrationEventHandler.cs +++ b/src/_SampleSystem/SampleSystem.BLL/Command/CreateIntegrationEvent/CreateIntegrationEventHandler.cs @@ -18,3 +18,4 @@ public async Task Handle(CreateIntegrationEventCommand request, CancellationToke await eventPublisher.PublishAsync(new TestIntegrationEvent(country.Id), cancellationToken); } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/Command/CreateManagementUnitFluentMapping/CreateManagementUnitFluentMappingCommand.cs b/src/_SampleSystem/SampleSystem.BLL/Command/CreateManagementUnitFluentMapping/CreateManagementUnitFluentMappingCommand.cs index 091dc68bc..f95abe7aa 100644 --- a/src/_SampleSystem/SampleSystem.BLL/Command/CreateManagementUnitFluentMapping/CreateManagementUnitFluentMappingCommand.cs +++ b/src/_SampleSystem/SampleSystem.BLL/Command/CreateManagementUnitFluentMapping/CreateManagementUnitFluentMappingCommand.cs @@ -5,3 +5,4 @@ namespace SampleSystem.BLL.Command.CreateManagementUnitFluentMapping; public record CreateManagementUnitFluentMappingCommand(string Name, Period Period) : IRequest; + diff --git a/src/_SampleSystem/SampleSystem.BLL/Command/CreateManagementUnitFluentMapping/CreateManagementUnitFluentMappingHandler.cs b/src/_SampleSystem/SampleSystem.BLL/Command/CreateManagementUnitFluentMapping/CreateManagementUnitFluentMappingHandler.cs index d82299f57..174d216c0 100644 --- a/src/_SampleSystem/SampleSystem.BLL/Command/CreateManagementUnitFluentMapping/CreateManagementUnitFluentMappingHandler.cs +++ b/src/_SampleSystem/SampleSystem.BLL/Command/CreateManagementUnitFluentMapping/CreateManagementUnitFluentMappingHandler.cs @@ -15,3 +15,4 @@ public async Task Handle(CreateManagementUnitFluentMappingCommand request, return mu.Id; } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/Command/ProcessIntegrationEvent/ProcessIntegrationEventHandler.cs b/src/_SampleSystem/SampleSystem.BLL/Command/ProcessIntegrationEvent/ProcessIntegrationEventHandler.cs index 949429b91..5e78749a2 100644 --- a/src/_SampleSystem/SampleSystem.BLL/Command/ProcessIntegrationEvent/ProcessIntegrationEventHandler.cs +++ b/src/_SampleSystem/SampleSystem.BLL/Command/ProcessIntegrationEvent/ProcessIntegrationEventHandler.cs @@ -13,3 +13,4 @@ public Task Handle(TestIntegrationEvent request, CancellationToken cancellationT return Task.CompletedTask; } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/Command/ProcessIntegrationEvent/TestIntegrationEvent.cs b/src/_SampleSystem/SampleSystem.BLL/Command/ProcessIntegrationEvent/TestIntegrationEvent.cs index 7144e1939..85d18a565 100644 --- a/src/_SampleSystem/SampleSystem.BLL/Command/ProcessIntegrationEvent/TestIntegrationEvent.cs +++ b/src/_SampleSystem/SampleSystem.BLL/Command/ProcessIntegrationEvent/TestIntegrationEvent.cs @@ -3,3 +3,4 @@ namespace SampleSystem.BLL.Command.ProcessIntegrationEvent; public record TestIntegrationEvent(Guid CountryId) : IIntegrationEvent; + diff --git a/src/_SampleSystem/SampleSystem.BLL/CountryBLL.cs b/src/_SampleSystem/SampleSystem.BLL/CountryBLL.cs index a7d83880b..e6076fa42 100644 --- a/src/_SampleSystem/SampleSystem.BLL/CountryBLL.cs +++ b/src/_SampleSystem/SampleSystem.BLL/CountryBLL.cs @@ -1,13 +1,14 @@ -using SampleSystem.Domain.Directories; +using Anch.SecuritySystem.Providers; -using Anch.SecuritySystem.Providers; +using SampleSystem.Domain.Directories; namespace SampleSystem.BLL; public partial class CountryBLL( ISampleSystemBLLContext context, ISecurityProvider securityProvider) - : SecurityDomainBLLBase(context, securityProvider) + : SecurityDomainBLLBase(context, securityProvider) { // Manual BLL Constructor example. For configuration see BLLGeneratorConfiguration.cs } + diff --git a/src/_SampleSystem/SampleSystem.BLL/EmployeeBLL.cs b/src/_SampleSystem/SampleSystem.BLL/EmployeeBLL.cs index 180690a84..4316c686f 100644 --- a/src/_SampleSystem/SampleSystem.BLL/EmployeeBLL.cs +++ b/src/_SampleSystem/SampleSystem.BLL/EmployeeBLL.cs @@ -1,11 +1,10 @@ using Anch.GenericQueryable.Fetching; -using SampleSystem.Domain.Models.Filters; - using Framework.BLL; using SampleSystem.Domain.Employee; using SampleSystem.Domain.Models.Change; +using SampleSystem.Domain.Models.Filters; using SampleSystem.Domain.Models.Integration; namespace SampleSystem.BLL; @@ -58,3 +57,4 @@ public Employee ComplexChange(EmployeeComplexChangeModel changeModel) return changeModel.PrimaryChangingObject; } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/ExampleServiceForRepository.cs b/src/_SampleSystem/SampleSystem.BLL/ExampleServiceForRepository.cs index 391cdbabf..f179c3d44 100644 --- a/src/_SampleSystem/SampleSystem.BLL/ExampleServiceForRepository.cs +++ b/src/_SampleSystem/SampleSystem.BLL/ExampleServiceForRepository.cs @@ -1,9 +1,8 @@ -using Framework.Application.Repository; - -using Anch.GenericQueryable; - +using Anch.GenericQueryable; using Anch.SecuritySystem; +using Framework.Application.Repository; + using SampleSystem.Domain.BU; using SampleSystem.Domain.Employee; @@ -35,3 +34,4 @@ public class ExampleServiceForRepository( return (employees.ToList(), businessUnits.ToList()); } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/IntegrationVersionContainer1BLL.cs b/src/_SampleSystem/SampleSystem.BLL/IntegrationVersionContainer1BLL.cs index 8f3671f41..12ff2b5e5 100644 --- a/src/_SampleSystem/SampleSystem.BLL/IntegrationVersionContainer1BLL.cs +++ b/src/_SampleSystem/SampleSystem.BLL/IntegrationVersionContainer1BLL.cs @@ -14,3 +14,4 @@ public IntegrationVersionContainer1 IntegrationSave(IntegrationVersionContainer1 return integrationSaveModel.SavingObject; } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/SampleSystemBLLContext.cs b/src/_SampleSystem/SampleSystem.BLL/SampleSystemBLLContext.cs index 19695aedc..8bb1aa5b3 100644 --- a/src/_SampleSystem/SampleSystem.BLL/SampleSystemBLLContext.cs +++ b/src/_SampleSystem/SampleSystem.BLL/SampleSystemBLLContext.cs @@ -1,4 +1,10 @@ -using Framework.Application.Events; +using Anch.HierarchicalExpand; +using Anch.OData; +using Anch.SecuritySystem.AccessDenied; +using Anch.SecuritySystem.SecurityAccessor; +using Anch.SecuritySystem.UserSource; + +using Framework.Application.Events; using Framework.Authorization.BLL; using Framework.BLL; using Framework.BLL.Services; @@ -6,18 +12,11 @@ using Framework.Tracking; using Framework.Validation; -using Anch.HierarchicalExpand; - using Microsoft.Extensions.DependencyInjection; -using Anch.OData; using SampleSystem.Domain; using SampleSystem.Domain.Employee; -using Anch.SecuritySystem.AccessDenied; -using Anch.SecuritySystem.SecurityAccessor; -using Anch.SecuritySystem.UserSource; - namespace SampleSystem.BLL; public partial class SampleSystemBLLContext( @@ -58,3 +57,4 @@ public partial class SampleSystemBLLContext( public IValidator Validator { get; } = validator; } + diff --git a/src/_SampleSystem/SampleSystem.BLL/SampleSystemException.cs b/src/_SampleSystem/SampleSystem.BLL/SampleSystemException.cs index 1f5d76c64..2d06c9139 100644 --- a/src/_SampleSystem/SampleSystem.BLL/SampleSystemException.cs +++ b/src/_SampleSystem/SampleSystem.BLL/SampleSystemException.cs @@ -54,3 +54,4 @@ protected SampleSystemException(SerializationInfo info, StreamingContext context { } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/SampleSystemSystemConstant.cs b/src/_SampleSystem/SampleSystem.BLL/SampleSystemSystemConstant.cs index 66d4c91cb..d412a1ddb 100644 --- a/src/_SampleSystem/SampleSystem.BLL/SampleSystemSystemConstant.cs +++ b/src/_SampleSystem/SampleSystem.BLL/SampleSystemSystemConstant.cs @@ -12,3 +12,4 @@ public static class SampleSystemSystemConstant public static readonly ApplicationVariable SampleStringConstant = new(nameof(SampleStringConstant), "HelloWorld") { Description = nameof(SampleStringConstant) }; } + diff --git a/src/_SampleSystem/SampleSystem.BLL/TestBusinessUnitBLL.cs b/src/_SampleSystem/SampleSystem.BLL/TestBusinessUnitBLL.cs index 92f55250e..7597da867 100644 --- a/src/_SampleSystem/SampleSystem.BLL/TestBusinessUnitBLL.cs +++ b/src/_SampleSystem/SampleSystem.BLL/TestBusinessUnitBLL.cs @@ -1,11 +1,9 @@ -using Framework.BLL.Domain.Persistent; - -using Anch.GenericQueryable.Fetching; - +using Anch.GenericQueryable.Fetching; using Anch.OData.Domain; -using SampleSystem.Domain.Models.Filters; +using Framework.BLL.Domain.Persistent; +using SampleSystem.Domain.Models.Filters; using TestBusinessUnit = SampleSystem.Domain.Projections.TestBusinessUnit; namespace SampleSystem.BLL; @@ -18,3 +16,4 @@ public SelectOperationResult> GetTreeBy FetchRule fetchs) => this.GetTreeByOData(selectOperation, fetchs); } + diff --git a/src/_SampleSystem/SampleSystem.BLL/TestEmployeeBLL.cs b/src/_SampleSystem/SampleSystem.BLL/TestEmployeeBLL.cs index af06a9b29..d5fffecad 100644 --- a/src/_SampleSystem/SampleSystem.BLL/TestEmployeeBLL.cs +++ b/src/_SampleSystem/SampleSystem.BLL/TestEmployeeBLL.cs @@ -1,5 +1,4 @@ using Anch.GenericQueryable.Fetching; - using Anch.OData.Domain; using SampleSystem.Domain.Models.Filters; @@ -42,3 +41,4 @@ public SelectOperationResult GetObjectsByOData( return this.GetObjectsByOData(nextSelectOperation, fetchs); } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/TestLegacyEmployeeBLL.cs b/src/_SampleSystem/SampleSystem.BLL/TestLegacyEmployeeBLL.cs index 2997705ef..55975bd88 100644 --- a/src/_SampleSystem/SampleSystem.BLL/TestLegacyEmployeeBLL.cs +++ b/src/_SampleSystem/SampleSystem.BLL/TestLegacyEmployeeBLL.cs @@ -9,3 +9,4 @@ public partial class TestLegacyEmployeeBLL { public List GetListBy(EmployeeFilterModel filter, FetchRule fetchs) => throw new NotImplementedException(); } + diff --git a/src/_SampleSystem/SampleSystem.BLL/Validators/EmployeeExternalIdValidator.cs b/src/_SampleSystem/SampleSystem.BLL/Validators/EmployeeExternalIdValidator.cs index 286c77a96..adc6de6e7 100644 --- a/src/_SampleSystem/SampleSystem.BLL/Validators/EmployeeExternalIdValidator.cs +++ b/src/_SampleSystem/SampleSystem.BLL/Validators/EmployeeExternalIdValidator.cs @@ -30,3 +30,4 @@ public ValidationResult GetValidationResult(IPropertyValidationContext> GetEmployee_E yield return new EmployeeExternalIdValidator(); } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/Validators/SampleSystemValidator.Employee.cs b/src/_SampleSystem/SampleSystem.BLL/Validators/SampleSystemValidator.Employee.cs index a364d5af4..31d341222 100644 --- a/src/_SampleSystem/SampleSystem.BLL/Validators/SampleSystemValidator.Employee.cs +++ b/src/_SampleSystem/SampleSystem.BLL/Validators/SampleSystemValidator.Employee.cs @@ -1,5 +1,6 @@ using Framework.Validation; using Framework.Validation.Map; + using SampleSystem.Domain.Employee; using SampleSystem.Domain.Validation; @@ -20,3 +21,4 @@ protected override ValidationResult GetEmployeeValidationResult(Employee source, return base.GetEmployeeValidationResult(source, operationContext, ownerState); } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/_Generated/SampleSystem.Validator.Generated.cs b/src/_SampleSystem/SampleSystem.BLL/_Generated/SampleSystem.Validator.Generated.cs index 1d36a8ad3..b0b42b10f 100644 --- a/src/_SampleSystem/SampleSystem.BLL/_Generated/SampleSystem.Validator.Generated.cs +++ b/src/_SampleSystem/SampleSystem.BLL/_Generated/SampleSystem.Validator.Generated.cs @@ -661,8 +661,4 @@ public SampleSystemValidator(SampleSystem.BLL.ISampleSystemBLLContext context, S { } } - - public partial interface ISampleSystemValidator : Framework.Validation.IValidator - { - } } diff --git a/src/_SampleSystem/SampleSystem.BLL/_Query/GetEmployees/GetEmployeesHandler.cs b/src/_SampleSystem/SampleSystem.BLL/_Query/GetEmployees/GetEmployeesHandler.cs index 9cb2a254b..2314f232b 100644 --- a/src/_SampleSystem/SampleSystem.BLL/_Query/GetEmployees/GetEmployeesHandler.cs +++ b/src/_SampleSystem/SampleSystem.BLL/_Query/GetEmployees/GetEmployeesHandler.cs @@ -1,6 +1,6 @@ -using MediatR; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using MediatR; namespace SampleSystem.BLL._Query.GetEmployees; @@ -15,3 +15,4 @@ public async Task Handle(GetEmployeesQuery request, Canc return result.Select(x => new GetEmployeesResponse(x.Id, x.NameEng.FullName)).ToArray(); } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/_Query/GetEmployees/GetEmployeesQuery.cs b/src/_SampleSystem/SampleSystem.BLL/_Query/GetEmployees/GetEmployeesQuery.cs index 983c27d21..dfddfe8dd 100644 --- a/src/_SampleSystem/SampleSystem.BLL/_Query/GetEmployees/GetEmployeesQuery.cs +++ b/src/_SampleSystem/SampleSystem.BLL/_Query/GetEmployees/GetEmployeesQuery.cs @@ -3,3 +3,4 @@ namespace SampleSystem.BLL._Query.GetEmployees; public record GetEmployeesQuery : IRequest; + diff --git a/src/_SampleSystem/SampleSystem.BLL/_Query/GetManagementUnitFluentMappings/GetManagementUnitFluentMappingsHandler.cs b/src/_SampleSystem/SampleSystem.BLL/_Query/GetManagementUnitFluentMappings/GetManagementUnitFluentMappingsHandler.cs index f0e9a57b3..f1da9a695 100644 --- a/src/_SampleSystem/SampleSystem.BLL/_Query/GetManagementUnitFluentMappings/GetManagementUnitFluentMappingsHandler.cs +++ b/src/_SampleSystem/SampleSystem.BLL/_Query/GetManagementUnitFluentMappings/GetManagementUnitFluentMappingsHandler.cs @@ -1,6 +1,6 @@ -using MediatR; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using MediatR; namespace SampleSystem.BLL._Query.GetManagementUnitFluentMappings; @@ -21,3 +21,4 @@ public async Task Handle( return result; } } + diff --git a/src/_SampleSystem/SampleSystem.BLL/_Query/GetManagementUnitFluentMappings/GetManagementUnitFluentMappingsQuery.cs b/src/_SampleSystem/SampleSystem.BLL/_Query/GetManagementUnitFluentMappings/GetManagementUnitFluentMappingsQuery.cs index 8dc808bba..eb34b129b 100644 --- a/src/_SampleSystem/SampleSystem.BLL/_Query/GetManagementUnitFluentMappings/GetManagementUnitFluentMappingsQuery.cs +++ b/src/_SampleSystem/SampleSystem.BLL/_Query/GetManagementUnitFluentMappings/GetManagementUnitFluentMappingsQuery.cs @@ -3,3 +3,4 @@ namespace SampleSystem.BLL._Query.GetManagementUnitFluentMappings; public record GetManagementUnitFluentMappingsQuery : IRequest; + diff --git a/src/_SampleSystem/SampleSystem.BLL/_Query/GetManagementUnitFluentMappings/GetManagementUnitFluentMappingsResponse.cs b/src/_SampleSystem/SampleSystem.BLL/_Query/GetManagementUnitFluentMappings/GetManagementUnitFluentMappingsResponse.cs index 14773aff2..ece07577e 100644 --- a/src/_SampleSystem/SampleSystem.BLL/_Query/GetManagementUnitFluentMappings/GetManagementUnitFluentMappingsResponse.cs +++ b/src/_SampleSystem/SampleSystem.BLL/_Query/GetManagementUnitFluentMappings/GetManagementUnitFluentMappingsResponse.cs @@ -1,6 +1,6 @@ using Framework.Core; - namespace SampleSystem.BLL._Query.GetManagementUnitFluentMappings; public record GetManagementUnitFluentMappingsResponse(Guid Id, string Name, Guid? ParentId, Period Period); + diff --git a/src/_SampleSystem/SampleSystem.Domain.ManualProjections/TestManualEmployeeProjection.cs b/src/_SampleSystem/SampleSystem.Domain.ManualProjections/TestManualEmployeeProjection.cs index 30cb16073..f1154bd1b 100644 --- a/src/_SampleSystem/SampleSystem.Domain.ManualProjections/TestManualEmployeeProjection.cs +++ b/src/_SampleSystem/SampleSystem.Domain.ManualProjections/TestManualEmployeeProjection.cs @@ -21,3 +21,4 @@ public class TestManualEmployeeProjection : PersistentDomainObjectBase [CustomSerialization(CustomSerializationMode.Ignore)] public virtual Guid? CoreBusinessUnitId => this.coreBusinessUnitId; } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Models/Change/EmployeeComplexChangeModel.cs b/src/_SampleSystem/SampleSystem.Domain.Models/Change/EmployeeComplexChangeModel.cs index 017c42ea7..493969d9b 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Models/Change/EmployeeComplexChangeModel.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Models/Change/EmployeeComplexChangeModel.cs @@ -6,3 +6,4 @@ public class EmployeeComplexChangeModel : DomainObjectComplexChangeModel : DomainObjectBase, [Required] public TDomainObject ChangingObject { get; set; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Models/Change/_Base/DomainObjectComplexChangeModel.cs b/src/_SampleSystem/SampleSystem.Domain.Models/Change/_Base/DomainObjectComplexChangeModel.cs index c58a8a685..99dbf4173 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Models/Change/_Base/DomainObjectComplexChangeModel.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Models/Change/_Base/DomainObjectComplexChangeModel.cs @@ -17,3 +17,4 @@ public abstract class DomainObjectComplexChangeModel : DomainObje [Required] public List SecondaryChangingObjects { get; set; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Models/Change/_Base/DomainObjectMassChangeModel.cs b/src/_SampleSystem/SampleSystem.Domain.Models/Change/_Base/DomainObjectMassChangeModel.cs index 1f25c8df9..749959641 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Models/Change/_Base/DomainObjectMassChangeModel.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Models/Change/_Base/DomainObjectMassChangeModel.cs @@ -17,3 +17,4 @@ public abstract class DomainObjectMassChangeModel : DomainObjectB IEnumerable IDomainObjectMassChangeModel.ChangingObjects => this.ChangingObjects; } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Models/Create/_Base/TestUnpersistentObject.cs b/src/_SampleSystem/SampleSystem.Domain.Models/Create/_Base/TestUnpersistentObject.cs index 52c603c2d..cb5ec9242 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Models/Create/_Base/TestUnpersistentObject.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Models/Create/_Base/TestUnpersistentObject.cs @@ -10,3 +10,4 @@ public class TestUnpersistentObject : DomainObjectBase public int Value2 { get; set; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Models/Filters/EmployeeFilterModel.cs b/src/_SampleSystem/SampleSystem.Domain.Models/Filters/EmployeeFilterModel.cs index 011258304..73a8806cb 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Models/Filters/EmployeeFilterModel.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Models/Filters/EmployeeFilterModel.cs @@ -6,3 +6,4 @@ namespace SampleSystem.Domain.Models.Filters; [ViewDomainObject(typeof(Employee.Employee))] public class EmployeeFilterModel : DomainObjectContextFilterModel; + diff --git a/src/_SampleSystem/SampleSystem.Domain.Models/Filters/Projection/TestEmployeeFilter.cs b/src/_SampleSystem/SampleSystem.Domain.Models/Filters/Projection/TestEmployeeFilter.cs index 5cae5ebcc..1cfa3581b 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Models/Filters/Projection/TestEmployeeFilter.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Models/Filters/Projection/TestEmployeeFilter.cs @@ -15,3 +15,4 @@ public BusinessUnit BusinessUnit set; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Models/Filters/Root/BusinessUnitRootFilterModel.cs b/src/_SampleSystem/SampleSystem.Domain.Models/Filters/Root/BusinessUnitRootFilterModel.cs index 0b0f221b9..64a6a90ad 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Models/Filters/Root/BusinessUnitRootFilterModel.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Models/Filters/Root/BusinessUnitRootFilterModel.cs @@ -51,3 +51,4 @@ public class BusinessUnitRootFilterModel : DomainObjectRootFilterModel public Period[] ArrayPeriods { get; set; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Models/Filters/Root/EmployeeRootFilterModel.cs b/src/_SampleSystem/SampleSystem.Domain.Models/Filters/Root/EmployeeRootFilterModel.cs index 7d5c7b1e9..6f70b266f 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Models/Filters/Root/EmployeeRootFilterModel.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Models/Filters/Root/EmployeeRootFilterModel.cs @@ -3,3 +3,4 @@ namespace SampleSystem.Domain.Models.Filters.Root; public class EmployeeRootFilterModel : DomainObjectRootFilterModel; + diff --git a/src/_SampleSystem/SampleSystem.Domain.Models/Filters/_Base/DomainObjectFilterModel.cs b/src/_SampleSystem/SampleSystem.Domain.Models/Filters/_Base/DomainObjectFilterModel.cs index f0525ba54..7c5d8c848 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Models/Filters/_Base/DomainObjectFilterModel.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Models/Filters/_Base/DomainObjectFilterModel.cs @@ -9,3 +9,4 @@ public abstract class DomainObjectFilterModel : DomainObjectBase, { public abstract Expression> ToFilterExpression(); } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Models/Filters/_Base/DomainObjectRootFilterModel.cs b/src/_SampleSystem/SampleSystem.Domain.Models/Filters/_Base/DomainObjectRootFilterModel.cs index 2f3adc443..2b9d8f788 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Models/Filters/_Base/DomainObjectRootFilterModel.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Models/Filters/_Base/DomainObjectRootFilterModel.cs @@ -7,3 +7,4 @@ public abstract class DomainObjectRootFilterModel : DomainObjectF { public override Expression> ToFilterExpression() => _ => true; } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Models/Integration/EmployeeCustomIntegrationSaveModel.cs b/src/_SampleSystem/SampleSystem.Domain.Models/Integration/EmployeeCustomIntegrationSaveModel.cs index ebe2938e8..e97f87d17 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Models/Integration/EmployeeCustomIntegrationSaveModel.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Models/Integration/EmployeeCustomIntegrationSaveModel.cs @@ -15,3 +15,4 @@ public override Employee.Employee SavingObject set => base.SavingObject = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Models/Integration/IntegrationVersionContainer1CustomIntegrationSaveModel.cs b/src/_SampleSystem/SampleSystem.Domain.Models/Integration/IntegrationVersionContainer1CustomIntegrationSaveModel.cs index 2cf71316e..c0898ff56 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Models/Integration/IntegrationVersionContainer1CustomIntegrationSaveModel.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Models/Integration/IntegrationVersionContainer1CustomIntegrationSaveModel.cs @@ -14,3 +14,4 @@ public string CustomName set; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Models/Integration/_Base/DomainObjectIntegrationSaveModel.cs b/src/_SampleSystem/SampleSystem.Domain.Models/Integration/_Base/DomainObjectIntegrationSaveModel.cs index 89057a49b..8bc9009b1 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Models/Integration/_Base/DomainObjectIntegrationSaveModel.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Models/Integration/_Base/DomainObjectIntegrationSaveModel.cs @@ -9,3 +9,4 @@ public abstract class DomainObjectIntegrationSaveModel : DomainOb [Required] public virtual TDomainObject SavingObject { get; set; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Projections/NonPersistentContainer.cs b/src/_SampleSystem/SampleSystem.Domain.Projections/NonPersistentContainer.cs index c8f12b7d7..d259a76bc 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Projections/NonPersistentContainer.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Projections/NonPersistentContainer.cs @@ -12,3 +12,4 @@ public partial class NonPersistentContainer public override string TestString { get; set; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Projections/TestBusinessUnit.cs b/src/_SampleSystem/SampleSystem.Domain.Projections/TestBusinessUnit.cs index 95e6c78da..3b63a15e4 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Projections/TestBusinessUnit.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Projections/TestBusinessUnit.cs @@ -21,3 +21,4 @@ public override string CalcProp public override string Employees => Enumerable.OrderBy(this.BusinessUnitEmployeeRoles, link => link.Employee.NameEngFirstName).Join(",", link => link.Employee.NameEngFirstName); } + diff --git a/src/_SampleSystem/SampleSystem.Domain.Projections/TestLocationCollectionProperties.cs b/src/_SampleSystem/SampleSystem.Domain.Projections/TestLocationCollectionProperties.cs index 97d64e944..dd7bd44a0 100644 --- a/src/_SampleSystem/SampleSystem.Domain.Projections/TestLocationCollectionProperties.cs +++ b/src/_SampleSystem/SampleSystem.Domain.Projections/TestLocationCollectionProperties.cs @@ -12,3 +12,4 @@ public partial class TestLocationCollectionProperties public override string[] Security_Codes { get; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/AnotherSqlParserTestObj.cs b/src/_SampleSystem/SampleSystem.Domain/AnotherSqlParserTestObj.cs index aa42eabf7..77a73d155 100644 --- a/src/_SampleSystem/SampleSystem.Domain/AnotherSqlParserTestObj.cs +++ b/src/_SampleSystem/SampleSystem.Domain/AnotherSqlParserTestObj.cs @@ -25,3 +25,4 @@ public virtual string UniqueColumn set => this.uniqueColumn = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Ariba/RevenueDocumentAribaStatus.cs b/src/_SampleSystem/SampleSystem.Domain/Ariba/RevenueDocumentAribaStatus.cs index c4a1e5df8..322b494f9 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Ariba/RevenueDocumentAribaStatus.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Ariba/RevenueDocumentAribaStatus.cs @@ -63,3 +63,4 @@ public DateTime? Date public override int GetHashCode() => this.type.GetHashCode() ^ this.date.GetHashCode() ^ this.description.GetHashCode(); } + diff --git a/src/_SampleSystem/SampleSystem.Domain/AuthPerformanceObject.cs b/src/_SampleSystem/SampleSystem.Domain/AuthPerformanceObject.cs index 0f957ac67..01ec760ac 100644 --- a/src/_SampleSystem/SampleSystem.Domain/AuthPerformanceObject.cs +++ b/src/_SampleSystem/SampleSystem.Domain/AuthPerformanceObject.cs @@ -23,3 +23,4 @@ public class AuthPerformanceObject : AuditPersistentDomainObjectBase public virtual Employee.Employee? Employee { get => this.employee; set => this.employee = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnit.LegacySecurity.cs b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnit.LegacySecurity.cs index 0f8cd9694..a6f21be21 100644 --- a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnit.LegacySecurity.cs +++ b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnit.LegacySecurity.cs @@ -1,7 +1,7 @@ -using Framework.BLL.Domain.Attributes; -using Framework.BLL.Domain.Persistent.Attributes; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using Framework.BLL.Domain.Attributes; +using Framework.BLL.Domain.Persistent.Attributes; namespace SampleSystem.Domain.BU; @@ -17,3 +17,4 @@ public partial class BusinessUnit : IBusinessUnitSecurityElement [ExpandPath("")] BusinessUnit IBusinessUnitSecurityElement.BusinessUnit => this; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnit.cs b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnit.cs index 5d65a455f..3fb5527d5 100644 --- a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnit.cs +++ b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnit.cs @@ -1,4 +1,5 @@ using Anch.Core; +using Anch.SecuritySystem; using Framework.BLL.Domain.Serialization; using Framework.BLL.Domain.ServiceRole; @@ -6,13 +7,12 @@ using Framework.Relations; using Framework.Restriction; using Framework.Validation.Attributes; + using SampleSystem.Domain.Directories; using SampleSystem.Domain.Enums; using SampleSystem.Domain.MU; using SampleSystem.Domain.Projects; -using Anch.SecuritySystem; - namespace SampleSystem.Domain.BU; [BLLViewRole, BLLSaveRole(AllowCreate = false)] @@ -348,3 +348,4 @@ public virtual BusinessUnit? Parent ? this : this.Parent.Maybe(z => z.GetParentByTypeIds(businessUnitTypesIds)); } + diff --git a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitAncestorLink.cs b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitAncestorLink.cs index 150ff4764..eab1ac306 100644 --- a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitAncestorLink.cs +++ b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitAncestorLink.cs @@ -26,3 +26,4 @@ public virtual BusinessUnit Child set => this.child = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitEmployeeRole.cs b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitEmployeeRole.cs index dd497ff10..0d05ddcad 100644 --- a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitEmployeeRole.cs +++ b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitEmployeeRole.cs @@ -59,9 +59,10 @@ public static BusinessUnitEmployeeRole Create( } return new BusinessUnitEmployeeRole(businessUnit) - { - Employee = employee, - Role = role - }; + { + Employee = employee, + Role = role + }; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitHrDepartment.cs b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitHrDepartment.cs index c6f34da2d..46fb50b95 100644 --- a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitHrDepartment.cs +++ b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitHrDepartment.cs @@ -40,3 +40,4 @@ public virtual HRDepartment.HRDepartment HRDepartment HRDepartment.HRDepartment IDetail.Master => this.hRDepartment; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitManagerCommissionLink.cs b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitManagerCommissionLink.cs index 63d9b122b..d62b68b33 100644 --- a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitManagerCommissionLink.cs +++ b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitManagerCommissionLink.cs @@ -95,3 +95,4 @@ public virtual Period Period public override string ToString() => $"BusinessUnit: {this.BusinessUnit}, Manager: {this.Manager}, Period: {this.Period}"; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitToAncestorChildView.cs b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitToAncestorChildView.cs index 456275e16..1ca7a28c6 100644 --- a/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitToAncestorChildView.cs +++ b/src/_SampleSystem/SampleSystem.Domain/BU/BusinessUnitToAncestorChildView.cs @@ -14,3 +14,4 @@ public class BusinessUnitToAncestorChildView : AuditPersistentDomainObjectBase public virtual BusinessUnit Source => this.source; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/BU/CommonUnitBase.cs b/src/_SampleSystem/SampleSystem.Domain/BU/CommonUnitBase.cs index a98fdd4ee..1f2d0a363 100644 --- a/src/_SampleSystem/SampleSystem.Domain/BU/CommonUnitBase.cs +++ b/src/_SampleSystem/SampleSystem.Domain/BU/CommonUnitBase.cs @@ -12,3 +12,4 @@ public virtual BusinessUnitStatus BusinessUnitStatus set => this.businessUnitStatus = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/BU/IMiniBusinessUnit.cs b/src/_SampleSystem/SampleSystem.Domain/BU/IMiniBusinessUnit.cs index 27765c686..cb924d22a 100644 --- a/src/_SampleSystem/SampleSystem.Domain/BU/IMiniBusinessUnit.cs +++ b/src/_SampleSystem/SampleSystem.Domain/BU/IMiniBusinessUnit.cs @@ -6,3 +6,4 @@ namespace SampleSystem.Domain.BU; [ProjectionContract(typeof(BusinessUnit))] public interface IMiniBusinessUnit : IIdentityObject, IVisualIdentityObject, IPeriodObject; + diff --git a/src/_SampleSystem/SampleSystem.Domain/BU/IUnit.cs b/src/_SampleSystem/SampleSystem.Domain/BU/IUnit.cs index db32bf5a4..b86d72ef1 100644 --- a/src/_SampleSystem/SampleSystem.Domain/BU/IUnit.cs +++ b/src/_SampleSystem/SampleSystem.Domain/BU/IUnit.cs @@ -7,3 +7,4 @@ public interface IUnit : IVisualIdentityObject { TUnit CurrentObject { get; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/Address.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/Address.cs index a5acd9c33..0bcdb755a 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/Address.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/Address.cs @@ -77,3 +77,4 @@ public virtual string Street LegalEntityBase IDetail.Master => this.LegalEntity; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitType.VisualProjection.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitType.VisualProjection.cs index efcf9c0ac..a0cbc0161 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitType.VisualProjection.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitType.VisualProjection.cs @@ -3,3 +3,4 @@ namespace SampleSystem.Domain.Directories; public partial class BusinessUnitType : IBusinessUnitTypeVisualProjection; + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitType.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitType.cs index 2468dce13..4b7c247dc 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitType.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitType.cs @@ -169,3 +169,4 @@ public virtual bool CanBeLinkedToClient ICollection IMaster.Details => (ICollection)this.PossibleFinancialProjectTypes; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitTypeLinkWithPossibleFinancialProjectType.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitTypeLinkWithPossibleFinancialProjectType.cs index 7c019a4ad..338618804 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitTypeLinkWithPossibleFinancialProjectType.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitTypeLinkWithPossibleFinancialProjectType.cs @@ -42,3 +42,4 @@ public virtual FinancialProjectType FinancialProjectType BusinessUnitType IDetail.Master => this.businessUnitType; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitTypeLinkWithPossibleParent.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitTypeLinkWithPossibleParent.cs index ba3db6841..57776b17b 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitTypeLinkWithPossibleParent.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitTypeLinkWithPossibleParent.cs @@ -40,3 +40,4 @@ public virtual BusinessUnitType PossibleParent BusinessUnitType IDetail.Master => this.businessUnitType; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitTypeLinkWithTransferTo.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitTypeLinkWithTransferTo.cs index c464c657a..cf8e70662 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitTypeLinkWithTransferTo.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/BusinessUnitTypeLinkWithTransferTo.cs @@ -40,3 +40,4 @@ public virtual BusinessUnitType TransferTo BusinessUnitType IDetail.Master => this.businessUnitType; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/CompanyLegalEntity.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/CompanyLegalEntity.cs index 1565eed49..7b145664a 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/CompanyLegalEntity.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/CompanyLegalEntity.cs @@ -50,3 +50,4 @@ public override bool Active set => base.Active = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/Country.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/Country.cs index f0f8d3266..75d18d98a 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/Country.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/Country.cs @@ -34,3 +34,4 @@ public virtual string Culture set => this.culture = value.TrimNull(); } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/LegalEntityBase.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/LegalEntityBase.cs index b03c24372..36a16bd51 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/LegalEntityBase.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/LegalEntityBase.cs @@ -43,3 +43,4 @@ public virtual string NameEnglish ICollection
IMaster
.Details => (ICollection
)this.Addresses; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/Location.LegacySecurity.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/Location.LegacySecurity.cs index d589c7464..866323d91 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/Location.LegacySecurity.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/Location.LegacySecurity.cs @@ -1,6 +1,6 @@ -using Framework.BLL.Domain.Attributes; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using Framework.BLL.Domain.Attributes; namespace SampleSystem.Domain.Directories; @@ -10,3 +10,4 @@ public interface ILocationSecurityElement { TLocation Location { get; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/Location.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/Location.cs index 36e4f8554..ec235bcd6 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/Location.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/Location.cs @@ -1,4 +1,6 @@ -using Framework.BLL.Domain.Fetching; +using Anch.SecuritySystem; + +using Framework.BLL.Domain.Fetching; using Framework.BLL.Domain.Serialization; using Framework.BLL.Domain.ServiceRole; using Framework.Relations; @@ -6,8 +8,6 @@ using SampleSystem.Domain.Enums; -using Anch.SecuritySystem; - namespace SampleSystem.Domain.Directories; [BLLViewRole, BLLSaveRole, BLLRemoveRole] @@ -120,3 +120,4 @@ public override bool Active ICollection IMaster.Details => (ICollection)this.Children; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/LocationAncestorLink.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/LocationAncestorLink.cs index d64ace532..2084ba870 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/LocationAncestorLink.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/LocationAncestorLink.cs @@ -26,3 +26,4 @@ public virtual Location Child set => this.child = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/LocationToAncestorChildView.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/LocationToAncestorChildView.cs index 7d34d163f..cd85de8e8 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/LocationToAncestorChildView.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/LocationToAncestorChildView.cs @@ -14,3 +14,4 @@ public class LocationToAncestorChildView : AuditPersistentDomainObjectBase public virtual Location Source => this.source; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Directories/TestObjForNestedBase.cs b/src/_SampleSystem/SampleSystem.Domain/Directories/TestObjForNestedBase.cs index de437d12e..904f0816a 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Directories/TestObjForNestedBase.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Directories/TestObjForNestedBase.cs @@ -12,3 +12,4 @@ public virtual Period Period set => this.period = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/Employee.LegacySecurity.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/Employee.LegacySecurity.cs index ad6e1475d..381a49375 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/Employee.LegacySecurity.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/Employee.LegacySecurity.cs @@ -1,12 +1,12 @@ -using Framework.BLL.Domain.Attributes; +using Anch.SecuritySystem; + +using Framework.BLL.Domain.Attributes; using Framework.BLL.Domain.Persistent.Attributes; using SampleSystem.Domain.BU; using SampleSystem.Domain.Directories; using SampleSystem.Domain.HRDepartment; -using Anch.SecuritySystem; - namespace SampleSystem.Domain.Employee; [SecurityNode] @@ -43,3 +43,4 @@ public partial class Employee : IEmployeeSecurity.Department => this.HRDepartment; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/Employee.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/Employee.cs index 2cde3891e..5bafe8306 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/Employee.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/Employee.cs @@ -1,4 +1,5 @@ using Anch.Core; +using Anch.SecuritySystem; using Framework.BLL.Domain.DTO; using Framework.BLL.Domain.Fetching; @@ -18,8 +19,6 @@ using SampleSystem.Domain.Inline; using SampleSystem.Domain.MU; -using Anch.SecuritySystem; - namespace SampleSystem.Domain.Employee; [UniqueGroup(UseDbEvaluation = true)] @@ -34,7 +33,7 @@ public partial class Employee : IMaster, IMaster, ISecurityContext//, - //IEmployee + //IEmployee { private readonly ICollection employeePhotos = new List(); @@ -393,3 +392,4 @@ public virtual int Age public override string ToString() => this.Pin + " - " + this.NameNative; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeCellPhone.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeCellPhone.cs index d125adb99..ad65b6473 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeCellPhone.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeCellPhone.cs @@ -12,3 +12,4 @@ protected EmployeeCellPhone() { } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeCellPhoneBase.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeCellPhoneBase.cs index a07a36856..71981b7c3 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeCellPhoneBase.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeCellPhoneBase.cs @@ -69,3 +69,4 @@ public virtual string FullNumber Employee IDetail.Master => this.employee; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeInformation.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeInformation.cs index 678594086..66fb7803c 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeInformation.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeInformation.cs @@ -16,3 +16,4 @@ public virtual string PersonalEmail set => this.personalEmail = value.TrimNull(); } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeePersonalCellPhone.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeePersonalCellPhone.cs index 0a35d4855..ca39eb554 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeePersonalCellPhone.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeePersonalCellPhone.cs @@ -12,3 +12,4 @@ protected EmployeePersonalCellPhone() { } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeePhoto.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeePhoto.cs index 66e6dfd70..103cd614a 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeePhoto.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeePhoto.cs @@ -64,3 +64,4 @@ public virtual byte[] Data Employee IDetail.Master => this.Employee; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeePosition.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeePosition.cs index 1bfcb5cba..99d707c66 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeePosition.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeePosition.cs @@ -36,3 +36,4 @@ public virtual string EnglishName set => this.englishName = value.TrimNull(); } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeRegistrationType.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeRegistrationType.cs index e1ab37170..629cda704 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeRegistrationType.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeRegistrationType.cs @@ -15,3 +15,4 @@ public virtual long ExternalId set => this.externalId = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeRole.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeRole.cs index 563a11fea..03ddd2938 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeRole.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeRole.cs @@ -6,3 +6,4 @@ namespace SampleSystem.Domain.Employee; [BLLViewRole] [UniqueGroup] public class EmployeeRole : BaseDirectory; + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeRoleDegree.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeRoleDegree.cs index 5ecc5126d..f3cd0885d 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeRoleDegree.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeRoleDegree.cs @@ -6,3 +6,4 @@ namespace SampleSystem.Domain.Employee; [BLLViewRole] [UniqueGroup] public class EmployeeRoleDegree : BaseDirectory; + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeSpecialization.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeSpecialization.cs index 4678489af..8608aa027 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeSpecialization.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/EmployeeSpecialization.cs @@ -6,3 +6,4 @@ namespace SampleSystem.Domain.Employee; [BLLViewRole] [UniqueGroup] public class EmployeeSpecialization : BaseDirectory; + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/EmpoloyeeLink/EmployeeAndEmployeeSpecializationLink.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/EmpoloyeeLink/EmployeeAndEmployeeSpecializationLink.cs index 280aba8f1..54eccc756 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/EmpoloyeeLink/EmployeeAndEmployeeSpecializationLink.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/EmpoloyeeLink/EmployeeAndEmployeeSpecializationLink.cs @@ -42,3 +42,4 @@ public virtual Employee Employee Employee IDetail.Master => this.Employee; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/EmpoloyeeLink/EmployeeToEmployeeLink.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/EmpoloyeeLink/EmployeeToEmployeeLink.cs index b444c9336..418978d06 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/EmpoloyeeLink/EmployeeToEmployeeLink.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/EmpoloyeeLink/EmployeeToEmployeeLink.cs @@ -48,3 +48,4 @@ public virtual EmployeeLinkType EmployeeLinkType Employee IDetail.Master => this.owner; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/IMRequest.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/IMRequest.cs index ed163f6c1..c2bac0d4d 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/IMRequest.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/IMRequest.cs @@ -29,3 +29,4 @@ public virtual IMRequestDetail OneToOneDetail set => this.oneToOneDetail = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/Information.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/Information.cs index d2eca68c0..5a46c161a 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/Information.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/Information.cs @@ -17,3 +17,4 @@ public virtual string Email set => this.email = value.TrimNull(); } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/Insurance.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/Insurance.cs index abd690a03..1f885ce61 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/Insurance.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/Insurance.cs @@ -22,3 +22,4 @@ public class Insurance : DomainObjectBase public bool UseFullAnnualRemainder { get; set; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/InsuranceDetail.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/InsuranceDetail.cs index f01869a07..bf9c87ada 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/InsuranceDetail.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/InsuranceDetail.cs @@ -74,3 +74,4 @@ public virtual string ResidentalAddress set => this.residentalAddress = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/RoleRoleDegreeLink.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/RoleRoleDegreeLink.cs index e4a9f18cf..2aa7e18ad 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/RoleRoleDegreeLink.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/RoleRoleDegreeLink.cs @@ -36,3 +36,4 @@ public virtual EmployeeRole AnotherRole set => this.anotherRole = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Employee/TestRestrictionObject.cs b/src/_SampleSystem/SampleSystem.Domain/Employee/TestRestrictionObject.cs index b715ce521..c7a8b8ea3 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Employee/TestRestrictionObject.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Employee/TestRestrictionObject.cs @@ -23,3 +23,4 @@ public virtual BusinessUnit BusinessUnit set => this.businessUnit = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/EnversBug1676/Location1676.cs b/src/_SampleSystem/SampleSystem.Domain/EnversBug1676/Location1676.cs index 695693656..2ac8c752b 100644 --- a/src/_SampleSystem/SampleSystem.Domain/EnversBug1676/Location1676.cs +++ b/src/_SampleSystem/SampleSystem.Domain/EnversBug1676/Location1676.cs @@ -21,3 +21,4 @@ public virtual Coefficient1676 Coefficient public virtual IEnumerable Calendar => this.calendar; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/EnversBug1676/WorkingCalendar1676.cs b/src/_SampleSystem/SampleSystem.Domain/EnversBug1676/WorkingCalendar1676.cs index 58b7b5c9b..eb782e5b4 100644 --- a/src/_SampleSystem/SampleSystem.Domain/EnversBug1676/WorkingCalendar1676.cs +++ b/src/_SampleSystem/SampleSystem.Domain/EnversBug1676/WorkingCalendar1676.cs @@ -15,3 +15,4 @@ protected WorkingCalendar1676() public virtual Location1676 Location => this.location; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/ExternalPrincipal/Principal.cs b/src/_SampleSystem/SampleSystem.Domain/ExternalPrincipal/Principal.cs index 95aa04b77..b6b51c406 100644 --- a/src/_SampleSystem/SampleSystem.Domain/ExternalPrincipal/Principal.cs +++ b/src/_SampleSystem/SampleSystem.Domain/ExternalPrincipal/Principal.cs @@ -21,3 +21,4 @@ public virtual string ExternalId set => this.externalId = value.TrimNull(); } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/ForUpdate/Example1.cs b/src/_SampleSystem/SampleSystem.Domain/ForUpdate/Example1.cs index 401f5541b..0bac585d2 100644 --- a/src/_SampleSystem/SampleSystem.Domain/ForUpdate/Example1.cs +++ b/src/_SampleSystem/SampleSystem.Domain/ForUpdate/Example1.cs @@ -3,7 +3,7 @@ namespace SampleSystem.Domain.ForUpdate; -[BLLViewRole, BLLSaveRole(SaveType = BLLSaveType.Both )] +[BLLViewRole, BLLSaveRole(SaveType = BLLSaveType.Both)] public class Example1 : AuditPersistentDomainObjectBase, IMaster { private readonly ICollection items2 = new HashSet(); @@ -36,3 +36,4 @@ public virtual Guid Field3 ICollection IMaster.Details => (ICollection)this.Items2; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/ForUpdate/Example2.cs b/src/_SampleSystem/SampleSystem.Domain/ForUpdate/Example2.cs index 42daa7625..a8455f08c 100644 --- a/src/_SampleSystem/SampleSystem.Domain/ForUpdate/Example2.cs +++ b/src/_SampleSystem/SampleSystem.Domain/ForUpdate/Example2.cs @@ -37,3 +37,4 @@ public virtual Guid Field2 Example1 IDetail.Master => this.Parent; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartment.LegacySecurity.cs b/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartment.LegacySecurity.cs index 94333eeae..6ee930f6c 100644 --- a/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartment.LegacySecurity.cs +++ b/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartment.LegacySecurity.cs @@ -1,8 +1,8 @@ -using Framework.BLL.Domain.Attributes; +using Anch.SecuritySystem; -using SampleSystem.Domain.Directories; +using Framework.BLL.Domain.Attributes; -using Anch.SecuritySystem; +using SampleSystem.Domain.Directories; namespace SampleSystem.Domain.HRDepartment; @@ -18,3 +18,4 @@ public interface IDepartmentSecurityElement : ID where TLocation : ISecurityContext; public partial class HRDepartment : ILocationSecurityElement; + diff --git a/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartment.cs b/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartment.cs index f71104cc3..15e64e07d 100644 --- a/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartment.cs +++ b/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartment.cs @@ -169,3 +169,4 @@ public virtual bool CurrentUserHasInspectorRoles(ICurrentUser currentUser) return HRDepartmentEmployeeRoleType.None != inspectorRoleType; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartmentBase.cs b/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartmentBase.cs index 1b01cc9fa..562cfe0b3 100644 --- a/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartmentBase.cs +++ b/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartmentBase.cs @@ -3,6 +3,7 @@ using Framework.Restriction; using Framework.Validation; using Framework.Validation.Attributes; + using SampleSystem.Domain.Directories; using SampleSystem.Domain.Validation; @@ -103,3 +104,4 @@ public virtual long ExternalId set => this.externalId = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartmentEmployeePosition.cs b/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartmentEmployeePosition.cs index d11951c20..48d4a74d4 100644 --- a/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartmentEmployeePosition.cs +++ b/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartmentEmployeePosition.cs @@ -36,3 +36,4 @@ public virtual HRDepartment HrDepartment HRDepartment IDetail.Master => this.hrDepartment; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartmentRoleEmployee.cs b/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartmentRoleEmployee.cs index db783ea30..010fadfc7 100644 --- a/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartmentRoleEmployee.cs +++ b/src/_SampleSystem/SampleSystem.Domain/HRDepartment/HRDepartmentRoleEmployee.cs @@ -41,3 +41,4 @@ public virtual HRDepartmentEmployeeRoleType HRDepartmentEmployeeRoleType HRDepartment IDetail.Master => this.hRDepartment; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Inline/Fio.cs b/src/_SampleSystem/SampleSystem.Domain/Inline/Fio.cs index 129df041b..254890503 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Inline/Fio.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Inline/Fio.cs @@ -42,3 +42,4 @@ public bool Equals(Fio other) => public static bool operator !=(Fio v1, Fio v2) => !(v1 == v2); } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Inline/FioShort.cs b/src/_SampleSystem/SampleSystem.Domain/Inline/FioShort.cs index 789dfeac6..24267b105 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Inline/FioShort.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Inline/FioShort.cs @@ -55,7 +55,7 @@ private set public override string ToString() => this.FullName; - public FioShort Clone () => this.MemberwiseClone() as FioShort; + public FioShort Clone() => this.MemberwiseClone() as FioShort; object ICloneable.Clone() => this.Clone(); @@ -72,3 +72,4 @@ public bool Equals(FioShort other) => public static bool operator !=(FioShort v1, FioShort v2) => !(v1 == v2); } + diff --git a/src/_SampleSystem/SampleSystem.Domain/IntegrationVersions/ExternalDomainObject.cs b/src/_SampleSystem/SampleSystem.Domain/IntegrationVersions/ExternalDomainObject.cs index 645456efd..9239bac92 100644 --- a/src/_SampleSystem/SampleSystem.Domain/IntegrationVersions/ExternalDomainObject.cs +++ b/src/_SampleSystem/SampleSystem.Domain/IntegrationVersions/ExternalDomainObject.cs @@ -15,3 +15,4 @@ public virtual long IntegrationVersion set => this.integrationVersion = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/IntegrationVersions/IntegrationVersionContainer1.cs b/src/_SampleSystem/SampleSystem.Domain/IntegrationVersions/IntegrationVersionContainer1.cs index 6aa124f42..d8772710d 100644 --- a/src/_SampleSystem/SampleSystem.Domain/IntegrationVersions/IntegrationVersionContainer1.cs +++ b/src/_SampleSystem/SampleSystem.Domain/IntegrationVersions/IntegrationVersionContainer1.cs @@ -14,3 +14,4 @@ public virtual string Name set => this.name = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/IntegrationVersions/IntegrationVersionContainer2.cs b/src/_SampleSystem/SampleSystem.Domain/IntegrationVersions/IntegrationVersionContainer2.cs index c265dee95..23c8d63a6 100644 --- a/src/_SampleSystem/SampleSystem.Domain/IntegrationVersions/IntegrationVersionContainer2.cs +++ b/src/_SampleSystem/SampleSystem.Domain/IntegrationVersions/IntegrationVersionContainer2.cs @@ -23,3 +23,4 @@ public override long IntegrationVersion set => base.IntegrationVersion = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnit.cs b/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnit.cs index 03fab1fb4..f289827b1 100644 --- a/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnit.cs +++ b/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnit.cs @@ -1,11 +1,12 @@ -using Framework.BLL.Domain.Serialization; +using Anch.SecuritySystem; + +using Framework.BLL.Domain.Serialization; using Framework.BLL.Domain.ServiceRole; using Framework.Core; using Framework.Relations; using Framework.Restriction; -using SampleSystem.Domain.BU; -using Anch.SecuritySystem; +using SampleSystem.Domain.BU; namespace SampleSystem.Domain.MU; @@ -81,3 +82,4 @@ public virtual ManagementUnit? Parent public static bool operator !=(ManagementUnit left, IUnit right) => !Equals(left, right); } + diff --git a/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitAncestorLink.cs b/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitAncestorLink.cs index 9c13637dd..7a1504c42 100644 --- a/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitAncestorLink.cs +++ b/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitAncestorLink.cs @@ -21,3 +21,4 @@ public virtual ManagementUnit Child set => this.child = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitAndBusinessUnitLink.cs b/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitAndBusinessUnitLink.cs index 08c942f87..e9e703dd3 100644 --- a/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitAndBusinessUnitLink.cs +++ b/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitAndBusinessUnitLink.cs @@ -81,3 +81,4 @@ public virtual BusinessUnit BusinessUnit string IVisualIdentityObject.Name => this.BusinessUnit.Maybe(x => x.Name) + "-" + this.ManagementUnit.Maybe(x => x.Name); } + diff --git a/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitAndHRDepartmentLink.cs b/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitAndHRDepartmentLink.cs index a0748473a..c6d6b0097 100644 --- a/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitAndHRDepartmentLink.cs +++ b/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitAndHRDepartmentLink.cs @@ -68,3 +68,4 @@ public virtual ManagementUnit ManagementUnit string IVisualIdentityObject.Name => this.HRDepartment.Maybe(x => x.Name) + "-" + this.ManagementUnit.Maybe(x => x.Name); } + diff --git a/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitToAncestorChildView.cs b/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitToAncestorChildView.cs index fc85810eb..7544f4c81 100644 --- a/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitToAncestorChildView.cs +++ b/src/_SampleSystem/SampleSystem.Domain/MU/ManagementUnitToAncestorChildView.cs @@ -12,3 +12,4 @@ public class ManagementUnitToAncestorChildView : AuditPersistentDomainObjectBase public virtual ManagementUnit Source => this.source; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/NLock/GenericNamedLock.cs b/src/_SampleSystem/SampleSystem.Domain/NLock/GenericNamedLock.cs index aad88dd15..ef57f09a9 100644 --- a/src/_SampleSystem/SampleSystem.Domain/NLock/GenericNamedLock.cs +++ b/src/_SampleSystem/SampleSystem.Domain/NLock/GenericNamedLock.cs @@ -6,3 +6,4 @@ namespace SampleSystem.Domain.NLock; [UniqueGroup] [NotAuditedClass] public class GenericNamedLock : BaseDirectory; + diff --git a/src/_SampleSystem/SampleSystem.Domain/NhFluentMapping/ManagementUnitFluentMapping.cs b/src/_SampleSystem/SampleSystem.Domain/NhFluentMapping/ManagementUnitFluentMapping.cs index 67cb8971f..f5fbd10ce 100644 --- a/src/_SampleSystem/SampleSystem.Domain/NhFluentMapping/ManagementUnitFluentMapping.cs +++ b/src/_SampleSystem/SampleSystem.Domain/NhFluentMapping/ManagementUnitFluentMapping.cs @@ -1,10 +1,11 @@ -using Framework.BLL.Domain.Serialization; +using Anch.SecuritySystem; + +using Framework.BLL.Domain.Serialization; using Framework.BLL.Domain.ServiceRole; using Framework.Core; using Framework.Database.Mapping; -using SampleSystem.Domain.BU; -using Anch.SecuritySystem; +using SampleSystem.Domain.BU; namespace SampleSystem.Domain.NhFluentMapping; @@ -59,3 +60,4 @@ public virtual ManagementUnitFluentMapping Parent ManagementUnitFluentMapping IUnit.CurrentObject => this; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/NhFluentMapping/MuComponent.cs b/src/_SampleSystem/SampleSystem.Domain/NhFluentMapping/MuComponent.cs index 0af1dbf9a..0b0fc3005 100644 --- a/src/_SampleSystem/SampleSystem.Domain/NhFluentMapping/MuComponent.cs +++ b/src/_SampleSystem/SampleSystem.Domain/NhFluentMapping/MuComponent.cs @@ -21,3 +21,4 @@ public virtual Employee.Employee AuthorizedLuxoftSignatory set => this.authorizedLuxoftSignatory = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/NhFluentMapping/PureFluentMappingObject.cs b/src/_SampleSystem/SampleSystem.Domain/NhFluentMapping/PureFluentMappingObject.cs index bcfffa31d..6a50141d2 100644 --- a/src/_SampleSystem/SampleSystem.Domain/NhFluentMapping/PureFluentMappingObject.cs +++ b/src/_SampleSystem/SampleSystem.Domain/NhFluentMapping/PureFluentMappingObject.cs @@ -30,3 +30,4 @@ public virtual Period Period456 set => this.period456 = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Projections/IBusinessUnitGridProjection.cs b/src/_SampleSystem/SampleSystem.Domain/Projections/IBusinessUnitGridProjection.cs index 3dee2c4a3..c36c10199 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Projections/IBusinessUnitGridProjection.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Projections/IBusinessUnitGridProjection.cs @@ -13,3 +13,4 @@ public interface IBusinessUnitGridProjection : IIdentityObject, IVisualIde { IBusinessUnitTypeVisualProjection BusinessUnitType { get; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/Projections/IBusinessUnitTypeVisualProjection.cs b/src/_SampleSystem/SampleSystem.Domain/Projections/IBusinessUnitTypeVisualProjection.cs index 54a696321..dc9720901 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Projections/IBusinessUnitTypeVisualProjection.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Projections/IBusinessUnitTypeVisualProjection.cs @@ -9,3 +9,4 @@ namespace SampleSystem.Domain.Projections; [BLLProjectionViewRole] [ProjectionContract(typeof(BusinessUnitType))] public interface IBusinessUnitTypeVisualProjection : IIdentityObject, IVisualIdentityObject; + diff --git a/src/_SampleSystem/SampleSystem.Domain/Projects/Project.cs b/src/_SampleSystem/SampleSystem.Domain/Projects/Project.cs index b952b6578..a716f0f76 100644 --- a/src/_SampleSystem/SampleSystem.Domain/Projects/Project.cs +++ b/src/_SampleSystem/SampleSystem.Domain/Projects/Project.cs @@ -8,6 +8,7 @@ using Framework.Relations; using Framework.Restriction; using Framework.Validation.Attributes; + using SampleSystem.Domain.BU; using SampleSystem.Domain.Enums; using SampleSystem.Domain.Validation; @@ -113,3 +114,4 @@ public virtual DateTime? PlannedEndDate public virtual DateTime GetCurrentDate() => DateTime.Today; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/SqlParserTestObj.cs b/src/_SampleSystem/SampleSystem.Domain/SqlParserTestObj.cs index 82e09bde0..130cb9515 100644 --- a/src/_SampleSystem/SampleSystem.Domain/SqlParserTestObj.cs +++ b/src/_SampleSystem/SampleSystem.Domain/SqlParserTestObj.cs @@ -27,3 +27,4 @@ public virtual string UniqueColumn set => this.uniqueColumn = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/SqlParserTestObjContainer.cs b/src/_SampleSystem/SampleSystem.Domain/SqlParserTestObjContainer.cs index fb6ac4aa6..a49d560b3 100644 --- a/src/_SampleSystem/SampleSystem.Domain/SqlParserTestObjContainer.cs +++ b/src/_SampleSystem/SampleSystem.Domain/SqlParserTestObjContainer.cs @@ -17,3 +17,4 @@ public virtual SqlParserTestObj IncludedObject set => this.includedObject = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestCustomContextSecurityObj.cs b/src/_SampleSystem/SampleSystem.Domain/TestCustomContextSecurityObj.cs index 77b444465..5753a29af 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestCustomContextSecurityObj.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestCustomContextSecurityObj.cs @@ -4,3 +4,4 @@ namespace SampleSystem.Domain; [BLLViewRole] public class TestCustomContextSecurityObj : BaseDirectory; + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestDefaultFieldsMappingObj.cs b/src/_SampleSystem/SampleSystem.Domain/TestDefaultFieldsMappingObj.cs index 6d89d04ca..5e17604a4 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestDefaultFieldsMappingObj.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestDefaultFieldsMappingObj.cs @@ -19,3 +19,4 @@ public class TestDefaultFieldsMappingObj : DomainObjectBase [DefaultValue(EnumDefaultVal)] public DayOfWeek EnumVal { get; set; } = EnumDefaultVal; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestRootSecurityObj.cs b/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestRootSecurityObj.cs index 8affe67db..40adb7e28 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestRootSecurityObj.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestRootSecurityObj.cs @@ -40,3 +40,4 @@ public virtual Location Location ICollection IMaster.Details => (ICollection)this.Items; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecurityObjItem.cs b/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecurityObjItem.cs index c6ed28acd..65c154745 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecurityObjItem.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecurityObjItem.cs @@ -44,3 +44,4 @@ public TestSecurityObjItem(TestRootSecurityObj master) TestRootSecurityObj IDetail.Master => this.FirstMaster; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecuritySubObjItem.cs b/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecuritySubObjItem.cs index a0f1dd6e9..b6f17f545 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecuritySubObjItem.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecuritySubObjItem.cs @@ -26,3 +26,4 @@ public TestSecuritySubObjItem(TestSecurityObjItem master) TestSecurityObjItem IDetail.Master => this.InnerMaster; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecuritySubObjItem2.cs b/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecuritySubObjItem2.cs index 7502c898f..d38582735 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecuritySubObjItem2.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecuritySubObjItem2.cs @@ -30,3 +30,4 @@ public TestSecuritySubObjItem2(TestSecurityObjItem master) TestSecurityObjItem IDetail.Master => this.InnerMaster; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecuritySubObjItem3.cs b/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecuritySubObjItem3.cs index 5a4f667fa..ac00284ef 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecuritySubObjItem3.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestDependency/TestSecuritySubObjItem3.cs @@ -25,3 +25,4 @@ public TestSecuritySubObjItem3(TestSecurityObjItem master) TestSecurityObjItem IDetail.Master => this.InnerMaster; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestDeserializedAuth/TestItemAuthObject.cs b/src/_SampleSystem/SampleSystem.Domain/TestDeserializedAuth/TestItemAuthObject.cs index f9c7ec188..65b590202 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestDeserializedAuth/TestItemAuthObject.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestDeserializedAuth/TestItemAuthObject.cs @@ -36,3 +36,4 @@ public virtual ManagementUnit ManagementUnit set => this.managementUnit = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestDeserializedAuth/TestPerformanceObject.cs b/src/_SampleSystem/SampleSystem.Domain/TestDeserializedAuth/TestPerformanceObject.cs index 35b535256..29741b689 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestDeserializedAuth/TestPerformanceObject.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestDeserializedAuth/TestPerformanceObject.cs @@ -39,3 +39,4 @@ public virtual ManagementUnit ManagementUnit set => this.managementUnit = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestDeserializedAuth/TestPlainAuthObject.cs b/src/_SampleSystem/SampleSystem.Domain/TestDeserializedAuth/TestPlainAuthObject.cs index 6d772067f..43a1efc8c 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestDeserializedAuth/TestPlainAuthObject.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestDeserializedAuth/TestPlainAuthObject.cs @@ -31,3 +31,4 @@ public virtual Employee.Employee Employee ICollection IMaster.Details => (ICollection)this.Items; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestForceAbstract/ClassA.cs b/src/_SampleSystem/SampleSystem.Domain/TestForceAbstract/ClassA.cs index c29905ab5..82a9b3339 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestForceAbstract/ClassA.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestForceAbstract/ClassA.cs @@ -17,3 +17,4 @@ public virtual int Value public virtual IEnumerable Child => this.child; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestForceAbstract/ConcreteClassA.cs b/src/_SampleSystem/SampleSystem.Domain/TestForceAbstract/ConcreteClassA.cs index 61fcc7782..eaf53fe03 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestForceAbstract/ConcreteClassA.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestForceAbstract/ConcreteClassA.cs @@ -16,3 +16,4 @@ public virtual int Age } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestImmutableObj.cs b/src/_SampleSystem/SampleSystem.Domain/TestImmutableObj.cs index 93fa8c009..313e85603 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestImmutableObj.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestImmutableObj.cs @@ -26,3 +26,4 @@ public virtual Employee.Employee TestImmutableRefProperty set => this.testImmutableRefProperty = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestObj.cs b/src/_SampleSystem/SampleSystem.Domain/TestObj.cs index 2a62295d6..dbe50184c 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestObj.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestObj.cs @@ -1,5 +1,6 @@ using Framework.Restriction; using Framework.Validation; + using SampleSystem.Domain.Inline; using SampleSystem.Domain.Validation; @@ -8,7 +9,8 @@ namespace SampleSystem.Domain; public class TestObj : DomainObjectBase { [Required] - [RestrictionExtension(typeof(RequiredAttribute), CustomError = "aaaa", OperationContext = (int)SampleSystemOperationContext.Save )] + [RestrictionExtension(typeof(RequiredAttribute), CustomError = "aaaa", OperationContext = (int)SampleSystemOperationContext.Save)] public Fio FS { get; set; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestRelativeEmployeeChildObject.cs b/src/_SampleSystem/SampleSystem.Domain/TestRelativeEmployeeChildObject.cs index 0f3645b88..28cfcfc22 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestRelativeEmployeeChildObject.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestRelativeEmployeeChildObject.cs @@ -26,3 +26,4 @@ public virtual Employee.Employee Employee set => this.employee = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/TestRelativeEmployeeParentObject.cs b/src/_SampleSystem/SampleSystem.Domain/TestRelativeEmployeeParentObject.cs index 305183a91..8a53e2485 100644 --- a/src/_SampleSystem/SampleSystem.Domain/TestRelativeEmployeeParentObject.cs +++ b/src/_SampleSystem/SampleSystem.Domain/TestRelativeEmployeeParentObject.cs @@ -10,3 +10,4 @@ public class TestRelativeEmployeeParentObject : AuditPersistentDomainObjectBase, ICollection IMaster.Details => (ICollection)this.Children; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/UniqueByParent/ChildEntity.cs b/src/_SampleSystem/SampleSystem.Domain/UniqueByParent/ChildEntity.cs index 3e12ea233..a61cb6456 100644 --- a/src/_SampleSystem/SampleSystem.Domain/UniqueByParent/ChildEntity.cs +++ b/src/_SampleSystem/SampleSystem.Domain/UniqueByParent/ChildEntity.cs @@ -10,3 +10,4 @@ public class ChildEntity : AuditPersistentDomainObjectBase [UniqueElement(nameof(Parent))] public virtual ParentEntity Parent => this.parent; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/__Base/AuditPersistentDomainObjectBase.cs b/src/_SampleSystem/SampleSystem.Domain/__Base/AuditPersistentDomainObjectBase.cs index 08fb5c68f..c1849172f 100644 --- a/src/_SampleSystem/SampleSystem.Domain/__Base/AuditPersistentDomainObjectBase.cs +++ b/src/_SampleSystem/SampleSystem.Domain/__Base/AuditPersistentDomainObjectBase.cs @@ -81,3 +81,4 @@ public virtual long Version set => this.version = value; } } + diff --git a/src/_SampleSystem/SampleSystem.Domain/__Base/BaseDirectory.cs b/src/_SampleSystem/SampleSystem.Domain/__Base/BaseDirectory.cs index 1acf4fed2..0af2237e0 100644 --- a/src/_SampleSystem/SampleSystem.Domain/__Base/BaseDirectory.cs +++ b/src/_SampleSystem/SampleSystem.Domain/__Base/BaseDirectory.cs @@ -27,3 +27,4 @@ public virtual string Name public override string ToString() => this.Name; } + diff --git a/src/_SampleSystem/SampleSystem.Domain/__Base/PersistentDomainObjectBase.cs b/src/_SampleSystem/SampleSystem.Domain/__Base/PersistentDomainObjectBase.cs index e359cb7ce..351dd46a8 100644 --- a/src/_SampleSystem/SampleSystem.Domain/__Base/PersistentDomainObjectBase.cs +++ b/src/_SampleSystem/SampleSystem.Domain/__Base/PersistentDomainObjectBase.cs @@ -51,3 +51,4 @@ public virtual bool Equals(PersistentDomainObjectBase? obj) => public override int GetHashCode() => this.Id.IsDefault() ? base.GetHashCode() : this.Id.GetHashCode(); } + diff --git a/src/_SampleSystem/SampleSystem.EventMetadata/SampleSystemDomainObjectEventMetadata.cs b/src/_SampleSystem/SampleSystem.EventMetadata/SampleSystemDomainObjectEventMetadata.cs index 0cfdf2a32..41a529db0 100644 --- a/src/_SampleSystem/SampleSystem.EventMetadata/SampleSystemDomainObjectEventMetadata.cs +++ b/src/_SampleSystem/SampleSystem.EventMetadata/SampleSystemDomainObjectEventMetadata.cs @@ -18,3 +18,4 @@ public override IEnumerable GetEventOperations(Type domainType) } } } + diff --git a/src/_SampleSystem/SampleSystem.EventMetadata/SampleSystemEventOperation.cs b/src/_SampleSystem/SampleSystem.EventMetadata/SampleSystemEventOperation.cs index c1c56a74e..bf65240aa 100644 --- a/src/_SampleSystem/SampleSystem.EventMetadata/SampleSystemEventOperation.cs +++ b/src/_SampleSystem/SampleSystem.EventMetadata/SampleSystemEventOperation.cs @@ -4,5 +4,6 @@ namespace SampleSystem.EventMetadata; public static class SampleSystemEventOperation { - public static EventOperation CustomAction { get; } = new (nameof(CustomAction)); + public static EventOperation CustomAction { get; } = new(nameof(CustomAction)); } + diff --git a/src/_SampleSystem/SampleSystem.Events/ExampleSampleSystemAribaEventsSubscriptionManager.cs b/src/_SampleSystem/SampleSystem.Events/ExampleSampleSystemAribaEventsSubscriptionManager.cs index be03fe15f..1b74887dd 100644 --- a/src/_SampleSystem/SampleSystem.Events/ExampleSampleSystemAribaEventsSubscriptionManager.cs +++ b/src/_SampleSystem/SampleSystem.Events/ExampleSampleSystemAribaEventsSubscriptionManager.cs @@ -10,3 +10,4 @@ public class ExampleSampleSystemAribaEventsSubscriptionManager(SampleSystemCusto { public override void Subscribe() => this.SubscribeForSaveOperation(); } + diff --git a/src/_SampleSystem/SampleSystem.Events/ExampleSampleSystemEventsSubscriptionManager.cs b/src/_SampleSystem/SampleSystem.Events/ExampleSampleSystemEventsSubscriptionManager.cs index d4e56c8d3..9ea80335b 100644 --- a/src/_SampleSystem/SampleSystem.Events/ExampleSampleSystemEventsSubscriptionManager.cs +++ b/src/_SampleSystem/SampleSystem.Events/ExampleSampleSystemEventsSubscriptionManager.cs @@ -25,3 +25,4 @@ public override void Subscribe() (domainObject, _) => new EmployeeCustomEventModelSaveEventDTO(mappingService, new EmployeeCustomEventModel(domainObject))); } } + diff --git a/src/_SampleSystem/SampleSystem.Events/SampleSystemCustomAribaLocalDBEventMessageSender.cs b/src/_SampleSystem/SampleSystem.Events/SampleSystemCustomAribaLocalDBEventMessageSender.cs index ad7584d87..9aeb35c03 100644 --- a/src/_SampleSystem/SampleSystem.Events/SampleSystemCustomAribaLocalDBEventMessageSender.cs +++ b/src/_SampleSystem/SampleSystem.Events/SampleSystemCustomAribaLocalDBEventMessageSender.cs @@ -16,3 +16,4 @@ public class SampleSystemCustomAribaLocalDBEventMessageSender( configurationContext, currentRevisionService, new LocalDBEventMessageSenderSettings() { QueueTag = "ariba" }); + diff --git a/src/_SampleSystem/SampleSystem.Generated.DAL.NHibernate/FluentMapping/ManagementUnitFluentMappingMap.cs b/src/_SampleSystem/SampleSystem.Generated.DAL.NHibernate/FluentMapping/ManagementUnitFluentMappingMap.cs index a8d0cbf9c..af85ca497 100644 --- a/src/_SampleSystem/SampleSystem.Generated.DAL.NHibernate/FluentMapping/ManagementUnitFluentMappingMap.cs +++ b/src/_SampleSystem/SampleSystem.Generated.DAL.NHibernate/FluentMapping/ManagementUnitFluentMappingMap.cs @@ -65,3 +65,4 @@ public ManagementUnitFluentMappingMap() */ } + diff --git a/src/_SampleSystem/SampleSystem.Generated.DAL.NHibernate/FluentMapping/PureFluentMappingObjectClassMap.cs b/src/_SampleSystem/SampleSystem.Generated.DAL.NHibernate/FluentMapping/PureFluentMappingObjectClassMap.cs index 50e802f2f..a0aa3d1ec 100644 --- a/src/_SampleSystem/SampleSystem.Generated.DAL.NHibernate/FluentMapping/PureFluentMappingObjectClassMap.cs +++ b/src/_SampleSystem/SampleSystem.Generated.DAL.NHibernate/FluentMapping/PureFluentMappingObjectClassMap.cs @@ -28,3 +28,4 @@ public PureFluentMappingObjectClassMap() .Access.CamelCaseField(); } } + diff --git a/src/_SampleSystem/SampleSystem.Generated.DAL.NHibernate/SampleSystemMappingSettings.cs b/src/_SampleSystem/SampleSystem.Generated.DAL.NHibernate/SampleSystemMappingSettings.cs index c7c121de0..e8ab9ff6d 100644 --- a/src/_SampleSystem/SampleSystem.Generated.DAL.NHibernate/SampleSystemMappingSettings.cs +++ b/src/_SampleSystem/SampleSystem.Generated.DAL.NHibernate/SampleSystemMappingSettings.cs @@ -25,3 +25,4 @@ public SampleSystemMappingSettings( { } } + diff --git a/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityGroup.cs b/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityGroup.cs index 6865172ed..11a83c5c1 100644 --- a/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityGroup.cs +++ b/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityGroup.cs @@ -6,3 +6,4 @@ public static class SampleSystemSecurityGroup { public static DomainSecurityRule.SecurityRuleHeader TestGroup { get; } = new(nameof(TestGroup)); } + diff --git a/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityOperation.cs b/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityOperation.cs index 852dacd3f..0c1a940b1 100644 --- a/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityOperation.cs +++ b/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityOperation.cs @@ -156,3 +156,4 @@ public static class SampleSystemSecurityOperation #endregion } + diff --git a/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityRole.cs b/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityRole.cs index e61b547b6..dcbca6d73 100644 --- a/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityRole.cs +++ b/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityRole.cs @@ -32,3 +32,4 @@ public static class SampleSystemSecurityRole public static SecurityRole TestPerformance { get; } = new(nameof(TestPerformance)); } + diff --git a/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityRule.cs b/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityRule.cs index f80a24065..b9e035ab7 100644 --- a/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityRule.cs +++ b/src/_SampleSystem/SampleSystem.Security.Abstract/SampleSystemSecurityRule.cs @@ -8,3 +8,4 @@ public static class SampleSystemSecurityRule public static DomainSecurityRule.SecurityRuleHeader TestRoleGroup { get; } = new(nameof(TestRoleGroup)); } + diff --git a/src/_SampleSystem/SampleSystem.Security/SampleSystemClientDomainModeSecurityRuleSource.cs b/src/_SampleSystem/SampleSystem.Security/SampleSystemClientDomainModeSecurityRuleSource.cs index 0f6913253..b6b6436db 100644 --- a/src/_SampleSystem/SampleSystem.Security/SampleSystemClientDomainModeSecurityRuleSource.cs +++ b/src/_SampleSystem/SampleSystem.Security/SampleSystemClientDomainModeSecurityRuleSource.cs @@ -1,6 +1,6 @@ -using SampleSystem.Domain; +using Anch.SecuritySystem.SecurityRuleInfo; -using Anch.SecuritySystem.SecurityRuleInfo; +using SampleSystem.Domain; namespace SampleSystem.Security; @@ -9,3 +9,4 @@ public class SampleSystemClientDomainModeSecurityRuleSource(IEnumerable base.Allowed(info) && typeof(PersistentDomainObjectBase).IsAssignableFrom(info.SecurityRule.DomainType); } + diff --git a/src/_SampleSystem/SampleSystem.Security/SampleSystemDomainSecurityServiceExtensions.cs b/src/_SampleSystem/SampleSystem.Security/SampleSystemDomainSecurityServiceExtensions.cs index f931f2608..6402d3fe0 100644 --- a/src/_SampleSystem/SampleSystem.Security/SampleSystemDomainSecurityServiceExtensions.cs +++ b/src/_SampleSystem/SampleSystem.Security/SampleSystemDomainSecurityServiceExtensions.cs @@ -1,4 +1,7 @@ -using Framework.Infrastructure.DependencyInjection; +using Anch.SecuritySystem; +using Anch.SecuritySystem.DependencyInjection; + +using Framework.Infrastructure.DependencyInjection; using SampleSystem.Domain; using SampleSystem.Domain.BU; @@ -16,9 +19,6 @@ using SampleSystem.Domain.TestDeserializedAuth; using SampleSystem.Security.Services; -using Anch.SecuritySystem; -using Anch.SecuritySystem.DependencyInjection; - namespace SampleSystem.Security; public static class SampleSystemDomainSecurityServiceExtensions @@ -171,3 +171,4 @@ private ISecuritySystemSetup RegisterLegacyProjectionDomainSecurityServices() => .AddDomainSecurity(b => b.SetUntypedDependency()); } } + diff --git a/src/_SampleSystem/SampleSystem.Security/SampleSystemSecuritySystemExtensions.cs b/src/_SampleSystem/SampleSystem.Security/SampleSystemSecuritySystemExtensions.cs index 131540190..e846aa94f 100644 --- a/src/_SampleSystem/SampleSystem.Security/SampleSystemSecuritySystemExtensions.cs +++ b/src/_SampleSystem/SampleSystem.Security/SampleSystemSecuritySystemExtensions.cs @@ -1,10 +1,9 @@ -using Framework.Core; - +using Anch.HierarchicalExpand; using Anch.SecuritySystem; using Anch.SecuritySystem.DependencyInjection; using Anch.SecuritySystem.VirtualPermission.DependencyInjection; -using Anch.HierarchicalExpand; +using Framework.Core; using SampleSystem.Domain.BU; using SampleSystem.Domain.Directories; @@ -54,7 +53,8 @@ public ISecuritySystemSetup AddSecurityRoles() => SampleSystemSecurityRole.SeManager, new SecurityRoleInfo(new Guid("dbf3556d-7106-4175-b5e4-a32d00bd857a")) { - Children = [SampleSystemSecurityRole.TestVirtualRole], Operations = [SampleSystemSecurityOperation.BusinessUnitEdit] + Children = [SampleSystemSecurityRole.TestVirtualRole], + Operations = [SampleSystemSecurityOperation.BusinessUnitEdit] }) .AddSecurityRole( @@ -125,7 +125,7 @@ public ISecuritySystemSetup AddSecurityRoles() => SecurityRole.Administrator, new SecurityRoleInfo(new Guid("d9c1d2f0-0c2f-49ab-bb0b-de13a456169e")) { - Operations = [..typeof(SampleSystemSecurityOperation).GetStaticPropertyValueList()] + Operations = [.. typeof(SampleSystemSecurityOperation).GetStaticPropertyValueList()] }); public ISecuritySystemSetup AddSecurityRules() @@ -161,3 +161,4 @@ public ISecuritySystemSetup AddVirtualPermissions() => v => v.AddFilter(link => link.Role == BusinessUnitEmployeeRoleType.Manager))); } } + diff --git a/src/_SampleSystem/SampleSystem.Security/Services/SampleSystemTestCustomContextSecurityObjSecurityService.cs b/src/_SampleSystem/SampleSystem.Security/Services/SampleSystemTestCustomContextSecurityObjSecurityService.cs index 8466c69fd..6da36a898 100644 --- a/src/_SampleSystem/SampleSystem.Security/Services/SampleSystemTestCustomContextSecurityObjSecurityService.cs +++ b/src/_SampleSystem/SampleSystem.Security/Services/SampleSystemTestCustomContextSecurityObjSecurityService.cs @@ -1,13 +1,13 @@ using Anch.SecuritySystem; - -using SampleSystem.Domain; - using Anch.SecuritySystem.DomainServices; using Anch.SecuritySystem.Providers; +using SampleSystem.Domain; + namespace SampleSystem.Security.Services; public class SampleSystemTestCustomContextSecurityObjSecurityService : DomainSecurityServiceBase { protected override ISecurityProvider CreateSecurityProvider(SecurityRule securityRule) => new AccessDeniedSecurityProvider(); } + diff --git a/src/_SampleSystem/SampleSystem.ServiceEnvironment.NHibernate/DependencyInjection/SampleSystemNHibernateExtension.cs b/src/_SampleSystem/SampleSystem.ServiceEnvironment.NHibernate/DependencyInjection/SampleSystemNHibernateExtension.cs index cd464f87f..4c1840c5d 100644 --- a/src/_SampleSystem/SampleSystem.ServiceEnvironment.NHibernate/DependencyInjection/SampleSystemNHibernateExtension.cs +++ b/src/_SampleSystem/SampleSystem.ServiceEnvironment.NHibernate/DependencyInjection/SampleSystemNHibernateExtension.cs @@ -39,3 +39,4 @@ public void AddServices(IServiceCollection services) .AddMapping(new SampleSystemMappingSettings(appDatabase)))); } } + diff --git a/src/_SampleSystem/SampleSystem.ServiceEnvironment/DependencyInjection/SampleSystemApplicationExtensions.cs b/src/_SampleSystem/SampleSystem.ServiceEnvironment/DependencyInjection/SampleSystemApplicationExtensions.cs index 4c05aef67..b944137ec 100644 --- a/src/_SampleSystem/SampleSystem.ServiceEnvironment/DependencyInjection/SampleSystemApplicationExtensions.cs +++ b/src/_SampleSystem/SampleSystem.ServiceEnvironment/DependencyInjection/SampleSystemApplicationExtensions.cs @@ -50,3 +50,4 @@ private IServiceCollection AddApplicationNotification(IConfiguration configurati } } } + diff --git a/src/_SampleSystem/SampleSystem.ServiceEnvironment/DependencyInjection/SampleSystemFrameworkExtensions.cs b/src/_SampleSystem/SampleSystem.ServiceEnvironment/DependencyInjection/SampleSystemFrameworkExtensions.cs index 73700baa1..bc04b76ec 100644 --- a/src/_SampleSystem/SampleSystem.ServiceEnvironment/DependencyInjection/SampleSystemFrameworkExtensions.cs +++ b/src/_SampleSystem/SampleSystem.ServiceEnvironment/DependencyInjection/SampleSystemFrameworkExtensions.cs @@ -63,3 +63,4 @@ public IBssFrameworkSetup AddSupportLegacyServices() => settings.SetDTOMapping(); } } + diff --git a/src/_SampleSystem/SampleSystem.ServiceEnvironment/DependencyInjection/SampleSystemGeneralDependencyInjectionExtensions.cs b/src/_SampleSystem/SampleSystem.ServiceEnvironment/DependencyInjection/SampleSystemGeneralDependencyInjectionExtensions.cs index 7836eb85e..84e159103 100644 --- a/src/_SampleSystem/SampleSystem.ServiceEnvironment/DependencyInjection/SampleSystemGeneralDependencyInjectionExtensions.cs +++ b/src/_SampleSystem/SampleSystem.ServiceEnvironment/DependencyInjection/SampleSystemGeneralDependencyInjectionExtensions.cs @@ -70,3 +70,4 @@ public static IServiceCollection AddGeneralDependencyInjection( .AddGeneralApplicationServices(configuration, hostEnvironment); } + diff --git a/src/_SampleSystem/SampleSystem.ServiceEnvironment/ExampleFaultDALListener.cs b/src/_SampleSystem/SampleSystem.ServiceEnvironment/ExampleFaultDALListener.cs index 478402e16..8de58fa2d 100644 --- a/src/_SampleSystem/SampleSystem.ServiceEnvironment/ExampleFaultDALListener.cs +++ b/src/_SampleSystem/SampleSystem.ServiceEnvironment/ExampleFaultDALListener.cs @@ -18,3 +18,4 @@ public class ExampleFaultDALListenerSettings { public bool Raise { get; set; } } + diff --git a/src/_SampleSystem/SampleSystem.ServiceEnvironment/Jobs/SampleJob.cs b/src/_SampleSystem/SampleSystem.ServiceEnvironment/Jobs/SampleJob.cs index a91a02725..cd4908f7e 100644 --- a/src/_SampleSystem/SampleSystem.ServiceEnvironment/Jobs/SampleJob.cs +++ b/src/_SampleSystem/SampleSystem.ServiceEnvironment/Jobs/SampleJob.cs @@ -1,4 +1,5 @@ using Anch.Core.Auth; +using Anch.SecuritySystem.Attributes; using Framework.Application.Jobs; using Framework.Application.Repository; @@ -9,8 +10,6 @@ using SampleSystem.Domain; -using Anch.SecuritySystem.Attributes; - namespace SampleSystem.ServiceEnvironment.Jobs; [DisableConcurrentExecution(timeoutInSeconds: 1000)] @@ -25,3 +24,4 @@ public async Task ExecuteAsync(CancellationToken cancellationToken) await testRepository.SaveAsync(new TestJobObject(), cancellationToken); } } + diff --git a/src/_SampleSystem/SampleSystem.ServiceEnvironment/SampleSystemInitializer.cs b/src/_SampleSystem/SampleSystem.ServiceEnvironment/SampleSystemInitializer.cs index c64eac137..bb990ed42 100644 --- a/src/_SampleSystem/SampleSystem.ServiceEnvironment/SampleSystemInitializer.cs +++ b/src/_SampleSystem/SampleSystem.ServiceEnvironment/SampleSystemInitializer.cs @@ -1,4 +1,5 @@ using Anch.Core; +using Anch.SecuritySystem.GeneralPermission.Initialize; using Framework.Application.Lock; using Framework.Configuration.BLL; @@ -7,8 +8,6 @@ using Microsoft.Extensions.DependencyInjection; -using Anch.SecuritySystem.GeneralPermission.Initialize; - namespace SampleSystem.ServiceEnvironment; public class SampleSystemInitializer( @@ -35,3 +34,4 @@ await sessionEvaluator.EvaluateAsync( DBSessionMode.Write, serviceProvider => serviceProvider.GetRequiredService().Initialize(cancellationToken)); } + diff --git a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Country/Create/CountryCreateSubscription.cs b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Country/Create/CountryCreateSubscription.cs index 7d8b55b5f..49abbb3e1 100644 --- a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Country/Create/CountryCreateSubscription.cs +++ b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Country/Create/CountryCreateSubscription.cs @@ -10,7 +10,7 @@ public class CountryCreateSubscription : Subscription> GetTo( yield return new("tester@luxoft.com", versions); } } + diff --git a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/DomainChangedByRecipients/NotPersistentCustomModel/CustomNotificationModel.cs b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/DomainChangedByRecipients/NotPersistentCustomModel/CustomNotificationModel.cs index 7786dcea1..dfbce661b 100644 --- a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/DomainChangedByRecipients/NotPersistentCustomModel/CustomNotificationModel.cs +++ b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/DomainChangedByRecipients/NotPersistentCustomModel/CustomNotificationModel.cs @@ -12,3 +12,4 @@ public class CustomNotificationModel(IServiceProvider serviceProvider, Domain.Di public int LocationsCount { get; } = serviceProvider.GetRequiredService().GetQueryable().Count(x => x.Country == country); } + diff --git a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/DomainChangedByRecipients/NotPersistentCustomModel/Subscription.cs b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/DomainChangedByRecipients/NotPersistentCustomModel/Subscription.cs index 0dd09605e..c5eb8cef6 100644 --- a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/DomainChangedByRecipients/NotPersistentCustomModel/Subscription.cs +++ b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/DomainChangedByRecipients/NotPersistentCustomModel/Subscription.cs @@ -38,3 +38,4 @@ public override IEnumerable GetAttachments(IServiceProvider serviceP yield return new(new MemoryStream(Encoding.UTF8.GetBytes("Hello world!")), AttachmentName); } } + diff --git a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Employee/Update/EmployeeUpdateSubscription.cs b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Employee/Update/EmployeeUpdateSubscription.cs index 605e5be14..bff1a7af5 100644 --- a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Employee/Update/EmployeeUpdateSubscription.cs +++ b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Employee/Update/EmployeeUpdateSubscription.cs @@ -29,3 +29,4 @@ public class EmployeeUpdateSubscription : Subscription GetAttachments(IServiceProvider _, DomainObjectVersions versions) { yield return new System.Net.Mail.Attachment(new MemoryStream(Encoding.UTF8.GetBytes("Hello world!")), AttachmentName) - { - // If ContentId not set .NET generate new GUID https://github.com/Microsoft/referencesource/blob/master/System/net/System/Net/mail/Attachment.cs - ContentId = "testId@luxoft.com" - }; + { + // If ContentId not set .NET generate new GUID https://github.com/Microsoft/referencesource/blob/master/System/net/System/Net/mail/Attachment.cs + ContentId = "testId@luxoft.com" + }; } } + diff --git a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/AttachmentInline/AttachmentInlineSubscription.cs b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/AttachmentInline/AttachmentInlineSubscription.cs index a0bbb9d5f..f7d0fd43c 100644 --- a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/AttachmentInline/AttachmentInlineSubscription.cs +++ b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/AttachmentInline/AttachmentInlineSubscription.cs @@ -12,7 +12,7 @@ public class AttachmentInlineSubscription : Subscription> GetTo(IServiceProvider _, DomainObjectVersions versions) { @@ -27,9 +27,10 @@ public class AttachmentInlineSubscription : Subscription GetAttachments(IServiceProvider _, DomainObjectVersions versions) { yield return new(new MemoryStream(Encoding.UTF8.GetBytes("Hello world!")), AttachmentName) - { - // If ContentId not set .NET generate new GUID https://github.com/Microsoft/referencesource/blob/master/System/net/System/Net/mail/Attachment.cs - ContentId = "testId@luxoft.com" - }; + { + // If ContentId not set .NET generate new GUID https://github.com/Microsoft/referencesource/blob/master/System/net/System/Net/mail/Attachment.cs + ContentId = "testId@luxoft.com" + }; } } + diff --git a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/AttachmentTemplateEvaluator/AttachmentTemplateEvaluatorSubscription.cs b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/AttachmentTemplateEvaluator/AttachmentTemplateEvaluatorSubscription.cs index 781506bed..4fca90f2f 100644 --- a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/AttachmentTemplateEvaluator/AttachmentTemplateEvaluatorSubscription.cs +++ b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/AttachmentTemplateEvaluator/AttachmentTemplateEvaluatorSubscription.cs @@ -31,3 +31,4 @@ public class AttachmentTemplateEvaluatorSubscription : Subscription : RazorTemplate protected string GetEmployeeName(Domain.Employee.Employee employee) => employee.NameNative.FullName; } + diff --git a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/RazerInheritance/RazorInheritanceSubscription.cs b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/RazerInheritance/RazorInheritanceSubscription.cs index 95f5c7fbc..70b60777c 100644 --- a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/RazerInheritance/RazorInheritanceSubscription.cs +++ b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/RazerInheritance/RazorInheritanceSubscription.cs @@ -10,7 +10,7 @@ namespace SampleSystem.Subscriptions.Metadata.Examples.RazerInheritance; /// public class RazorInheritanceSubscription : Subscription { - public override MailAddress Sender { get; } = new ("RazorInheritanceSubscription@luxoft.com", "SampleSystem"); + public override MailAddress Sender { get; } = new("RazorInheritanceSubscription@luxoft.com", "SampleSystem"); public override DomainObjectChangeType DomainObjectChangeType { get; } = DomainObjectChangeType.Update; @@ -24,3 +24,4 @@ public class RazorInheritanceSubscription : Subscription public override void Execute() => this.Writer.Write($"String.Concat it is good choice for {this.Current!.NameNative.FullName.Trim()}."); } + diff --git a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/RazerTemplateImpl/RazorTemplateImplSubscription.cs b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/RazerTemplateImpl/RazorTemplateImplSubscription.cs index af0566f67..4b06dfafc 100644 --- a/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/RazerTemplateImpl/RazorTemplateImplSubscription.cs +++ b/src/_SampleSystem/SampleSystem.Subscriptions.Metadata/Examples/RazerTemplateImpl/RazorTemplateImplSubscription.cs @@ -24,3 +24,4 @@ public class RazorTemplateImplSubscription : Subscription va return ValidationResult.Success; } } + diff --git a/src/_SampleSystem/SampleSystem.Validation/EmployeeValidatorAttribute.cs b/src/_SampleSystem/SampleSystem.Validation/EmployeeValidatorAttribute.cs index 6943ce160..7a9ea799d 100644 --- a/src/_SampleSystem/SampleSystem.Validation/EmployeeValidatorAttribute.cs +++ b/src/_SampleSystem/SampleSystem.Validation/EmployeeValidatorAttribute.cs @@ -7,3 +7,4 @@ public sealed class EmployeeValidatorAttribute : ClassValidatorAttribute { public override IClassValidator CreateValidator() => new EmployeeValidator(); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Controllers/TestSecurityController.cs b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Controllers/TestSecurityController.cs index db7a46500..8001b89dd 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Controllers/TestSecurityController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Controllers/TestSecurityController.cs @@ -1,14 +1,13 @@ -using Framework.Application.Repository; +using Anch.GenericQueryable; +using Anch.SecuritySystem; +using Anch.SecuritySystem.UserSource; -using Anch.GenericQueryable; +using Framework.Application.Repository; using Microsoft.AspNetCore.Mvc; using SampleSystem.WebApiCore.Domain; -using Anch.SecuritySystem; -using Anch.SecuritySystem.UserSource; - namespace SampleSystem.WebApiCore.Controllers; [Route("api/[controller]/[action]")] @@ -61,3 +60,4 @@ public BusinessUnitDto(BusinessUnit businessUnit) { } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/AppDbContext.cs b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/AppDbContext.cs index 146bb936a..76ef09ca0 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/AppDbContext.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/AppDbContext.cs @@ -1,5 +1,6 @@ -using Framework.Database; -using Anch.GenericQueryable.EntityFramework; +using Anch.GenericQueryable.EntityFramework; + +using Framework.Database; using Microsoft.EntityFrameworkCore; @@ -27,3 +28,4 @@ protected override void OnConfiguring(DbContextOptionsBuilder options) options.AddInterceptors(new GeneralQueryExpressionInterceptor(expressionVisitorContainer)); } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/GeneralQueryExpressionInterceptor.cs b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/GeneralQueryExpressionInterceptor.cs index 4724e44e8..f57f27b9c 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/GeneralQueryExpressionInterceptor.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/GeneralQueryExpressionInterceptor.cs @@ -1,4 +1,5 @@ using System.Linq.Expressions; + using Framework.Database; using Microsoft.EntityFrameworkCore.Diagnostics; @@ -9,3 +10,4 @@ public class GeneralQueryExpressionInterceptor(IExpressionVisitorContainer expre { public Expression QueryCompilationStarting(Expression queryExpression, QueryExpressionEventData eventData) => expressionVisitorContainer.Visitor.Visit(queryExpression); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/SampleSystemDomainSecurityServiceExtensions.cs b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/SampleSystemDomainSecurityServiceExtensions.cs index b42c23eb7..f9c27d68c 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/SampleSystemDomainSecurityServiceExtensions.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/SampleSystemDomainSecurityServiceExtensions.cs @@ -1,9 +1,9 @@ -using SampleSystem.WebApiCore.Domain; -using SampleSystem.WebApiCore.Security; - -using Anch.SecuritySystem; +using Anch.SecuritySystem; using Anch.SecuritySystem.DependencyInjection; +using SampleSystem.WebApiCore.Domain; +using SampleSystem.WebApiCore.Security; + namespace SampleSystem.WebApiCore.DependencyInjection; public static class SampleSystemDomainSecurityServiceExtensions @@ -19,3 +19,4 @@ public static ISecuritySystemSetup AddDomainSecurityServices(this ISecuritySyste employee => employee.CoreBusinessUnit, true)); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/SampleSystemGeneralDependencyInjectionExtensions.cs b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/SampleSystemGeneralDependencyInjectionExtensions.cs index b5e0fc046..8fb81489c 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/SampleSystemGeneralDependencyInjectionExtensions.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/SampleSystemGeneralDependencyInjectionExtensions.cs @@ -1,4 +1,5 @@ using Anch.DependencyInjection; +using Anch.SecuritySystem; using Framework.Database.EntityFramework.DependencyInjection; using Framework.Infrastructure.DependencyInjection; @@ -7,8 +8,6 @@ using SampleSystem.WebApiCore.Domain; -using Anch.SecuritySystem; - namespace SampleSystem.WebApiCore.DependencyInjection; public static class SampleSystemGeneralDependencyInjectionExtensions @@ -39,3 +38,4 @@ public static IServiceCollection AddGeneralDependencyInjection(this IServiceColl .AddHttpContextAccessor() .AddLogging(); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/SampleSystemSecuritySystemExtensions.cs b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/SampleSystemSecuritySystemExtensions.cs index 17c5efab1..fd7c2fb03 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/SampleSystemSecuritySystemExtensions.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/DependencyInjection/SampleSystemSecuritySystemExtensions.cs @@ -1,10 +1,10 @@ -using SampleSystem.WebApiCore.Domain; -using SampleSystem.WebApiCore.Security; - -using Anch.SecuritySystem; +using Anch.SecuritySystem; using Anch.SecuritySystem.DependencyInjection; using Anch.SecuritySystem.VirtualPermission.DependencyInjection; +using SampleSystem.WebApiCore.Domain; +using SampleSystem.WebApiCore.Security; + namespace SampleSystem.WebApiCore.DependencyInjection; public static class SampleSystemSecuritySystemExtensions @@ -32,3 +32,4 @@ public static ISecuritySystemSetup AddVirtualPermissions(this ISecuritySystemSet SampleSystemSecurityRole.SeManager, v => v.AddFilter(link => link.Role == BusinessUnitEmployeeRoleType.Manager))); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Domain/BusinessUnit.cs b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Domain/BusinessUnit.cs index 38476037f..d89aa3428 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Domain/BusinessUnit.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Domain/BusinessUnit.cs @@ -13,3 +13,4 @@ public class BusinessUnit : ISecurityContext public virtual BusinessUnit? Parent { get; set; } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Domain/BusinessUnitEmployeeRole.cs b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Domain/BusinessUnitEmployeeRole.cs index acfa96590..e95c168d3 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Domain/BusinessUnitEmployeeRole.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Domain/BusinessUnitEmployeeRole.cs @@ -15,3 +15,4 @@ public class BusinessUnitEmployeeRole : IIdentityObject public BusinessUnitEmployeeRoleType Role { get; set; } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Domain/Employee.cs b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Domain/Employee.cs index 3d8231134..1a45ae6a5 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Domain/Employee.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Domain/Employee.cs @@ -15,3 +15,4 @@ public class Employee : IIdentityObject public virtual BusinessUnit? CoreBusinessUnit { get; set; } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Program.cs b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Program.cs index 6d4154b66..2bc12e710 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Program.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Program.cs @@ -1,9 +1,10 @@ -using Bss.Platform.Api.Documentation; +using Anch.DependencyInjection; +using Anch.SecuritySystem.Configurator; + +using Bss.Platform.Api.Documentation; using Bss.Platform.Api.Middlewares; using Bss.Platform.Logging; -using Anch.DependencyInjection; - using Framework.Infrastructure.JsonConverter; using Framework.Infrastructure.Middleware; using Framework.Infrastructure.Swagger; @@ -13,8 +14,6 @@ using SampleSystem.WebApiCore.DependencyInjection; -using Anch.SecuritySystem.Configurator; - namespace SampleSystem.WebApiCore; public static class Program @@ -89,3 +88,4 @@ public static async Task Main(string[] args) await app.RunAsync(); } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Security/SampleSystemSecurityRole.cs b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Security/SampleSystemSecurityRole.cs index bb958c1d8..1b7927d92 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Security/SampleSystemSecurityRole.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore.EntityFramework/Security/SampleSystemSecurityRole.cs @@ -6,3 +6,4 @@ public static class SampleSystemSecurityRole { public static SecurityRole SeManager { get; } = new("SE Manager"); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore.NHibernate/Program.cs b/src/_SampleSystem/SampleSystem.WebApiCore.NHibernate/Program.cs index 910948662..5f273343d 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore.NHibernate/Program.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore.NHibernate/Program.cs @@ -6,3 +6,4 @@ public static class Program { private static Task Main(string[] args) => GenericProgram.Main(args, new SampleSystemNHibernateExtension()); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Auth/OperationController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Auth/OperationController.cs index a595bbde3..93073ef8b 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Auth/OperationController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Auth/OperationController.cs @@ -1,6 +1,6 @@ -using Microsoft.AspNetCore.Mvc; +using Anch.SecuritySystem.AvailableSecurity; -using Anch.SecuritySystem.AvailableSecurity; +using Microsoft.AspNetCore.Mvc; // ReSharper disable once CheckNamespace namespace Authorization.WebApi.Controllers; @@ -16,3 +16,4 @@ await availableSecurityOperationSource .Select(op => op.Name) .ToListAsync(cancellationToken); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Auth/PrincipalController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Auth/PrincipalController.cs index 38ca2625d..94b70fb90 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Auth/PrincipalController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Auth/PrincipalController.cs @@ -14,3 +14,4 @@ public PrincipalFullDTO GetCurrentPrincipal() => this.Evaluate(DBSessionMode.Read, evaluateData => LambdaHelper.ToFullDTO((Principal)evaluateData.Context.Authorization.CurrentPrincipalSource.CurrentUser, evaluateData.MappingService)); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Auth/SecurityRuleController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Auth/SecurityRuleController.cs index 529a37141..456651fb2 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Auth/SecurityRuleController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Auth/SecurityRuleController.cs @@ -1,6 +1,6 @@ -using Microsoft.AspNetCore.Mvc; +using Anch.SecuritySystem.AvailableSecurity; -using Anch.SecuritySystem.AvailableSecurity; +using Microsoft.AspNetCore.Mvc; // ReSharper disable once CheckNamespace namespace Authorization.WebApi.Controllers; @@ -15,3 +15,4 @@ await availableClientSecurityRuleSource.GetAvailableSecurityRules() .Select(sr => sr.Name) .ToListAsync(cancellationToken); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/AuthMainController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/AuthMainController.cs index 1a5153a70..4e7042116 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/AuthMainController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/AuthMainController.cs @@ -1,11 +1,12 @@ -using Framework.Authorization.Domain; +using Anch.SecuritySystem; + +using Framework.Authorization.Domain; using Framework.Authorization.Generated.DTO; using Framework.BLL; using Framework.BLL.DTOMapping.Domain; using Framework.Database; using Microsoft.AspNetCore.Mvc; -using Anch.SecuritySystem; namespace SampleSystem.WebApiCore.Controllers.Main; @@ -56,3 +57,4 @@ public SavePermissionAutoRequest(PrincipalIdentityDTO principalIdent, Permission public PermissionStrictDTO PermissionDTO { get; set; } } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/AuthenticationController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/AuthenticationController.cs index e91f335fc..9d7b45512 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/AuthenticationController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/AuthenticationController.cs @@ -9,3 +9,4 @@ public class AuthenticationController : ControllerBase [HttpGet] public bool IsAuthenticated() => this.HttpContext.User.Identity!.IsAuthenticated; } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/BusinessUnitAuditController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/BusinessUnitAuditController.cs index 8675136b9..9f649cef9 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/BusinessUnitAuditController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/BusinessUnitAuditController.cs @@ -1,6 +1,7 @@ using Framework.Database; using Microsoft.AspNetCore.Mvc; + using SampleSystem.AuditDomain; using SampleSystem.Generated.DTO; @@ -18,3 +19,4 @@ public class BusinessUnitAuditController(IAsyncDal dal) return (auditBu.Revision.Author, auditBu.Revision.Id, new BusinessUnitIdentityDTO(auditBu.Id)); } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/BusinessUnitController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/BusinessUnitController.cs index f3c30519f..e1703c3c3 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/BusinessUnitController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/BusinessUnitController.cs @@ -1,13 +1,15 @@ -using Framework.BLL; +using Anch.OData.Domain; + +using Framework.BLL; using Framework.BLL.Domain.DTO; using Framework.BLL.Domain.Persistent; using Framework.Database; using Microsoft.AspNetCore.Mvc; -using Anch.OData.Domain; using SampleSystem.Domain.BU; using SampleSystem.Generated.DTO; + using SelectOperationResultExtensions = Framework.BLL.OData.SelectOperationResultExtensions; namespace SampleSystem.WebApiCore.Controllers.Main; @@ -41,3 +43,4 @@ public SelectOperationResult> GetFul return SelectOperationResultExtensions.ChangeItem(odataTree, x => LambdaHelper.ToFullDTO((BusinessUnit)x, evaluateData.MappingService)); }); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/ClassAAsyncController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/ClassAAsyncController.cs index de6179a83..f6b2a91b1 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/ClassAAsyncController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/ClassAAsyncController.cs @@ -1,7 +1,7 @@ -using Framework.Application.Repository; -using Framework.Database; +using Anch.GenericQueryable; -using Anch.GenericQueryable; +using Framework.Application.Repository; +using Framework.Database; using MediatR; @@ -35,3 +35,4 @@ public async Task CreateClassA(int value, bool withSession, CancellationToken ca await mediator.Send(new CreateClassAEvent(value), cancellationToken); } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/CurrentUserController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/CurrentUserController.cs index 842b19e9d..1bcf9d82b 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/CurrentUserController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/CurrentUserController.cs @@ -11,3 +11,4 @@ public class CurrentUserController(ICurrentUser currentUser) : ControllerBase [HttpGet] public string GetCurrentUserName() => currentUser.Name; } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/EmployeeAsyncController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/EmployeeAsyncController.cs index 8d8716ba1..e8569b509 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/EmployeeAsyncController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/EmployeeAsyncController.cs @@ -1,11 +1,11 @@ using Anch.Core.Auth; +using Anch.GenericQueryable; using Framework.Application.Repository; using Framework.Database; -using Anch.GenericQueryable; - using Microsoft.AspNetCore.Mvc; + using SampleSystem.Domain.Employee; using SampleSystem.Generated.DTO; @@ -35,3 +35,4 @@ public async Task GetCurrentEmployee(CancellationToken cancel return employees.Single().ToSimpleDTO(mappingService); } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/FaultDALListenerController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/FaultDALListenerController.cs index 46c13540b..7eac52b98 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/FaultDALListenerController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/FaultDALListenerController.cs @@ -1,12 +1,14 @@ using System.Runtime.CompilerServices; +using Anch.SecuritySystem.Attributes; + using Framework.Application.Repository; using Framework.Database; using Microsoft.AspNetCore.Mvc; + using SampleSystem.Domain; using SampleSystem.ServiceEnvironment; -using Anch.SecuritySystem.Attributes; namespace SampleSystem.WebApiCore.Controllers.Main; @@ -46,3 +48,4 @@ public async IAsyncEnumerable TestFault2(bool raiseError, [EnumeratorCancel yield return 234; } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/ImpersonateController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/ImpersonateController.cs index 5dff8fe99..0b1017a89 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/ImpersonateController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/ImpersonateController.cs @@ -1,11 +1,12 @@ -using Framework.Application; +using Anch.GenericQueryable; + +using Framework.Application; using Framework.Application.Repository; using Framework.Database; -using Anch.GenericQueryable; - using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; + using SampleSystem.Domain; using SampleSystem.Generated.DTO; @@ -46,3 +47,4 @@ await dbSessionEvaluator.EvaluateAsync( return result.ToSimpleDTOList(mappingService); }); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/InitializationController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/InitializationController.cs index e4f12402f..a540b55d9 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/InitializationController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/InitializationController.cs @@ -1,6 +1,7 @@ using Framework.Database; using Microsoft.AspNetCore.Mvc; + using SampleSystem.ServiceEnvironment; namespace SampleSystem.WebApiCore.Controllers.Main; @@ -20,3 +21,4 @@ public async Task RunInitialize(CancellationToken cancellationToken) await service.InitializeAsync(cancellationToken); } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/IntegrationController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/IntegrationController.cs index 9f05f623f..c09123f2c 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/IntegrationController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/IntegrationController.cs @@ -1,10 +1,12 @@ -using Framework.Authorization.Generated.DTO; +using Anch.SecuritySystem; + +using Framework.Authorization.Generated.DTO; using Framework.Core.TypeResolving; using Framework.Infrastructure.Integration; using Microsoft.AspNetCore.Mvc; + using SampleSystem.Generated.DTO; -using Anch.SecuritySystem; namespace SampleSystem.WebApiCore.Controllers.Main; @@ -30,3 +32,4 @@ protected override IReadOnlyCollection GetAuthEventDTOTypes() => .Where(z => typeof(Framework.Authorization.Generated.DTO.EventDTOBase).IsAssignableFrom(z)) .ToList(); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/MediatrController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/MediatrController.cs index 237152536..5b340076c 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/MediatrController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/MediatrController.cs @@ -4,6 +4,7 @@ using MediatR; using Microsoft.AspNetCore.Mvc; + using SampleSystem.BLL; using SampleSystem.BLL._Query.GetEmployees; using SampleSystem.BLL._Query.GetManagementUnitFluentMappings; @@ -41,3 +42,4 @@ public void CreateIntegrationEvent() => DBSessionMode.Write, _ => mediator.Send(new CreateIntegrationEventCommand()).GetAwaiter().GetResult()); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/NoSecurityController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/NoSecurityController.cs index 2032f7d00..b4faf888e 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/NoSecurityController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/NoSecurityController.cs @@ -1,12 +1,13 @@ -using Framework.Application.Repository; -using Framework.Database; +using Anch.GenericQueryable; +using Anch.SecuritySystem; -using Anch.GenericQueryable; +using Framework.Application.Repository; +using Framework.Database; using Microsoft.AspNetCore.Mvc; + using SampleSystem.Domain; using SampleSystem.Generated.DTO; -using Anch.SecuritySystem; namespace SampleSystem.WebApiCore.Controllers.Main; @@ -51,3 +52,4 @@ public async Task> GetFullList(CancellationTok return result.ToIdentityDTOList(); } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/PeriodController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/PeriodController.cs index 9753fd041..0a9cd0415 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/PeriodController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/PeriodController.cs @@ -11,3 +11,4 @@ public class PeriodController(TimeProvider timeProvider) : ControllerBase [HttpGet] public Period GetCurrentMonth() => timeProvider.GetCurrentMonth(); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/TestAsyncController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/TestAsyncController.cs index ce12dbcf9..0da946e28 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/TestAsyncController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/TestAsyncController.cs @@ -1,12 +1,13 @@ -using Framework.Application.Repository; -using Framework.Database; +using Anch.GenericQueryable; +using Anch.SecuritySystem.Attributes; -using Anch.GenericQueryable; +using Framework.Application.Repository; +using Framework.Database; using Microsoft.AspNetCore.Mvc; + using SampleSystem.Domain.Directories; using SampleSystem.Generated.DTO; -using Anch.SecuritySystem.Attributes; namespace SampleSystem.WebApiCore.Controllers.Main; @@ -49,3 +50,4 @@ public async Task TestDelay(CancellationToken cancellationToken = default) return 123; } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/TestRepositoryController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/TestRepositoryController.cs index 6f581ce25..070798418 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/TestRepositoryController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/TestRepositoryController.cs @@ -1,6 +1,7 @@ using Framework.Database; using Microsoft.AspNetCore.Mvc; + using SampleSystem.BLL; using SampleSystem.Generated.DTO; @@ -19,3 +20,4 @@ public class TestRepositoryController(IExampleServiceForRepository exampleServic return (pair.Employees.ToIdentityDTOList(), pair.BusinessUnits.ToIdentityDTOList()); } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/TestSequenceController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/TestSequenceController.cs index 57c9df400..afa60b94e 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/TestSequenceController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/TestSequenceController.cs @@ -20,3 +20,4 @@ public long Check() return nextNumber; } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/ValuesController.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/ValuesController.cs index a8b229c24..32fda62d7 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/ValuesController.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Controllers/Main/ValuesController.cs @@ -32,3 +32,4 @@ public void Delete(int id) { } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/GenericProgram.cs b/src/_SampleSystem/SampleSystem.WebApiCore/GenericProgram.cs index 51d475f3a..173e2b60d 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/GenericProgram.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/GenericProgram.cs @@ -1,10 +1,12 @@ -using Bss.Platform.Api.Documentation; +using Anch.DependencyInjection; +using Anch.SecuritySystem.Configurator; +using Anch.SecuritySystem.Configurator.Interfaces; + +using Bss.Platform.Api.Documentation; using Bss.Platform.Api.Middlewares; using Bss.Platform.Events; using Bss.Platform.Logging; -using Anch.DependencyInjection; - using Framework.Configuration.BLL.Jobs; using Framework.Configurator; using Framework.Infrastructure.DependencyInjection; @@ -28,9 +30,6 @@ using SampleSystem.ServiceEnvironment.Jobs; using SampleSystem.WebApiCore.Services; -using Anch.SecuritySystem.Configurator; -using Anch.SecuritySystem.Configurator.Interfaces; - namespace SampleSystem.WebApiCore; public static class GenericProgram @@ -120,3 +119,4 @@ public static async Task Main(string[] args, IBssFrameworkExtension extension) await app.RunAsync(); } } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Services/IntegrationEventProcessor.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Services/IntegrationEventProcessor.cs index b870d0b9b..56476d373 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Services/IntegrationEventProcessor.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Services/IntegrationEventProcessor.cs @@ -20,3 +20,4 @@ public Task ProcessAsync(IIntegrationEvent @event, CancellationToken cancellatio return null!; }); } + diff --git a/src/_SampleSystem/SampleSystem.WebApiCore/Services/SampleConfiguratorIntegrationEvents.cs b/src/_SampleSystem/SampleSystem.WebApiCore/Services/SampleConfiguratorIntegrationEvents.cs index 9617d2a07..31be9c8cc 100644 --- a/src/_SampleSystem/SampleSystem.WebApiCore/Services/SampleConfiguratorIntegrationEvents.cs +++ b/src/_SampleSystem/SampleSystem.WebApiCore/Services/SampleConfiguratorIntegrationEvents.cs @@ -1,10 +1,10 @@ -using Framework.Application.Domain; +using Anch.SecuritySystem.Configurator.Interfaces; + +using Framework.Application.Domain; using Framework.Database; using Microsoft.Extensions.Logging; -using Anch.SecuritySystem.Configurator.Interfaces; - namespace SampleSystem.WebApiCore.Services; public class SampleConfiguratorIntegrationEvents(ILogger logger, ICurrentRevisionService currentRevisionService) : IConfiguratorIntegrationEvents @@ -26,3 +26,4 @@ public Task PrincipalCreatedAsync(object principal, CancellationToken cancellati public Task PermissionChangedAsync(object permission, CancellationToken cancellationToken) => Task.CompletedTask; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CheckGenTests/CsprojValidationTests.cs b/src/_SampleSystem/_Tests/SampleSystem.CheckGenTests/CsprojValidationTests.cs index c19cf4712..0922eab20 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CheckGenTests/CsprojValidationTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CheckGenTests/CsprojValidationTests.cs @@ -137,3 +137,4 @@ private static string FindSolutionRoot() throw new InvalidOperationException("Solution root not found"); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CheckGenTests/GenerationTests.cs b/src/_SampleSystem/_Tests/SampleSystem.CheckGenTests/GenerationTests.cs index a4832cb2f..0244fe7b5 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CheckGenTests/GenerationTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CheckGenTests/GenerationTests.cs @@ -64,3 +64,4 @@ private static string GetAggregatedMessage(IReadOnlyCollection "\t" + x.AbsolutePath).Aggregate((total, next) => total + Environment.NewLine + next) : string.Empty; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLL/BLLGeneratorConfiguration.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLL/BLLGeneratorConfiguration.cs index 64f727d6b..964a44573 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLL/BLLGeneratorConfiguration.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLL/BLLGeneratorConfiguration.cs @@ -1,6 +1,7 @@ using System.Reflection; using Framework.CodeGeneration.BLLGenerator.Configuration; + using SampleSystem.Domain.Directories; using SampleSystem.Domain.Employee; using SampleSystem.Domain.Validation; @@ -24,3 +25,4 @@ public override bool GenerateBllConstructor(Type domainType) => public override bool SquashPropertyValidators(PropertyInfo property) => property != typeof(Employee).GetProperty(nameof(Employee.ExternalId)); } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLLCore/BLLCoreGeneratorConfiguration.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLLCore/BLLCoreGeneratorConfiguration.cs index b2d047f6f..be716859b 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLLCore/BLLCoreGeneratorConfiguration.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLLCore/BLLCoreGeneratorConfiguration.cs @@ -30,3 +30,4 @@ public class BLLCoreGeneratorConfiguration(ServerGenerationEnvironment environme /// public override bool UseDbUniquenessEvaluation { get; } = false; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLLCore/SampleSystemBLLCoreFileGenerator.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLLCore/SampleSystemBLLCoreFileGenerator.cs index 1ae33d4e2..d84dced4e 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLLCore/SampleSystemBLLCoreFileGenerator.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLLCore/SampleSystemBLLCoreFileGenerator.cs @@ -24,3 +24,4 @@ protected override IEnumerable GetInternalFileGenerators() } } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLLCore/SampleSystemBLLInterfaceFileFactory.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLLCore/SampleSystemBLLInterfaceFileFactory.cs index e3e4ac012..07d233491 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLLCore/SampleSystemBLLInterfaceFileFactory.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/BLLCore/SampleSystemBLLInterfaceFileFactory.cs @@ -20,7 +20,7 @@ protected override IEnumerable GetMembers() { foreach (var member in base.GetMembers()) { - yield return member; + yield return member; } foreach (var complexChangeModelType in this.Configuration.Environment.GetModelTypes(this.DomainType, this.Configuration.ComplexChangeModelType)) @@ -30,14 +30,15 @@ protected override IEnumerable GetMembers() complexChangeModelType.CheckDirectMode(DirectMode.In, true); yield return new CodeMemberMethod - { - Name = methodName, - ReturnType = this.DomainType.ToTypeReference(), - Parameters = + { + Name = methodName, + ReturnType = this.DomainType.ToTypeReference(), + Parameters = { complexChangeModelType.ToTypeReference().ToParameterDeclarationExpression("changeModel") } - }; + }; } } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DAL/DALGeneratorConfiguration.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DAL/DALGeneratorConfiguration.cs index 4a0c39b64..7768f5fea 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DAL/DALGeneratorConfiguration.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DAL/DALGeneratorConfiguration.cs @@ -31,3 +31,4 @@ protected override AssemblyMetadata CreateAssemblyMetadata(Assembly assembly) private (Type fromType, string propertyName)[] GetIgnoreFields() => []; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/FullRefCodeTypeReferenceService.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/FullRefCodeTypeReferenceService.cs index 6b4e87129..945d800a4 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/FullRefCodeTypeReferenceService.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/FullRefCodeTypeReferenceService.cs @@ -7,3 +7,4 @@ namespace SampleSystem.CodeGenerate.Configurations.DTO; public class FullRefCodeTypeReferenceService(TConfiguration configuration) : FixedCodeTypeReferenceService(configuration, BaseFileType.FullDTO, SampleSystemFileType.FullRefDTO) where TConfiguration : class, IDTOGeneratorConfiguration; + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/GeneratorConfigurationExtensions.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/GeneratorConfigurationExtensions.cs index 3d56a3d1c..8f50cd2eb 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/GeneratorConfigurationExtensions.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/GeneratorConfigurationExtensions.cs @@ -24,3 +24,4 @@ public static IEnumerable GetSimpleRefFullDetailDTOProperties(TConfiguration configu { public override MainDTOFileType FileType { get; } = SampleSystemFileType.FullRefDTO; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/FileFactory/DefaultSimpleRefFullDetailDTOFileFactory.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/FileFactory/DefaultSimpleRefFullDetailDTOFileFactory.cs index 333720a19..44ea55f2b 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/FileFactory/DefaultSimpleRefFullDetailDTOFileFactory.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/FileFactory/DefaultSimpleRefFullDetailDTOFileFactory.cs @@ -10,3 +10,4 @@ public class DefaultSimpleRefFullDetailDTOFileFactory(TConfigura { public override MainDTOFileType FileType { get; } = SampleSystemFileType.SimpleRefFullDetailDTO; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/SampleSystemEventDTORoleGeneratePolicy.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/SampleSystemEventDTORoleGeneratePolicy.cs index b3ed43208..ecae7b95b 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/SampleSystemEventDTORoleGeneratePolicy.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/SampleSystemEventDTORoleGeneratePolicy.cs @@ -16,3 +16,4 @@ public bool Used(Type domainType, RoleFileType identity) return false; } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/SampleSystemServerDependencyGeneratePolicy.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/SampleSystemServerDependencyGeneratePolicy.cs index 91ebb673d..0240d7a98 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/SampleSystemServerDependencyGeneratePolicy.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/SampleSystemServerDependencyGeneratePolicy.cs @@ -42,3 +42,4 @@ protected override bool InternalUsed(Type domainType, RoleFileType fileType) } } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/SampleSystemServerFileGenerator.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/SampleSystemServerFileGenerator.cs index 6e959f340..c25a42415 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/SampleSystemServerFileGenerator.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/SampleSystemServerFileGenerator.cs @@ -24,3 +24,4 @@ protected override IEnumerable> GetDTOFileGenerato } } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/ServerDTOGeneratorConfiguration.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/ServerDTOGeneratorConfiguration.cs index 412376573..dbb3a7be2 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/ServerDTOGeneratorConfiguration.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/DTO/Server/ServerDTOGeneratorConfiguration.cs @@ -96,3 +96,4 @@ protected override IEnumerable GetInternalDomainTypeProperties(Typ } } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Projection/MainProjectionGeneratorConfiguration.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Projection/MainProjectionGeneratorConfiguration.cs index 6b6278aaf..f58fbc8a2 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Projection/MainProjectionGeneratorConfiguration.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Projection/MainProjectionGeneratorConfiguration.cs @@ -38,3 +38,4 @@ public override IEnumerable GetPropertyAttributeDeclar } } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/ServerGenerationEnvironment.Impl.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/ServerGenerationEnvironment.Impl.cs index b6250e2dd..ddf464238 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/ServerGenerationEnvironment.Impl.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/ServerGenerationEnvironment.Impl.cs @@ -20,3 +20,4 @@ public partial class ServerGenerationEnvironment : IServerDTOGeneratorConfiguration IServerDTOGeneratorConfigurationContainer.ServerDTO => this.ServerDTO; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/ServerGenerationEnvironment.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/ServerGenerationEnvironment.cs index 7db812de3..67236cdd5 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/ServerGenerationEnvironment.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/ServerGenerationEnvironment.cs @@ -1,6 +1,8 @@ using System.Collections.Immutable; using System.Reflection; +using Anch.SecuritySystem; + using Framework.BLL.Domain.Attributes; using Framework.CodeGeneration.Configuration; using Framework.CodeGeneration.DTOGenerator.Audit.Configuration; @@ -30,8 +32,6 @@ using SampleSystem.Security; using SampleSystem.Validation; -using Anch.SecuritySystem; - namespace SampleSystem.CodeGenerate.Configurations; public partial class ServerGenerationEnvironment() : CodeGenerationEnvironment GetExtendedAttributeSour .Build(); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Audit/AuditDTOGeneratorConfiguration.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Audit/AuditDTOGeneratorConfiguration.cs index aff917e77..2be9f5e3c 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Audit/AuditDTOGeneratorConfiguration.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Audit/AuditDTOGeneratorConfiguration.cs @@ -11,3 +11,4 @@ public class AuditDTOGeneratorConfiguration(ServerGenerationEnvironment environm protected override IEnumerable GetDomainTypes() => base.GetDomainTypes().Where(v => !v.IsProjection()); } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Audit/AuditServiceGeneratorConfiguration.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Audit/AuditServiceGeneratorConfiguration.cs index b500f26dc..18b3673e4 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Audit/AuditServiceGeneratorConfiguration.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Audit/AuditServiceGeneratorConfiguration.cs @@ -7,3 +7,4 @@ public class AuditServiceGeneratorConfiguration(ServerGenerationEnvironment envi { protected override IEnumerable GetDomainTypes() => base.GetDomainTypes().Where(z => !z.IsProjection()); } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/CustomServiceGeneratePolicy.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/CustomServiceGeneratePolicy.cs index ee1dadc88..0ee1dfa6a 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/CustomServiceGeneratePolicy.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/CustomServiceGeneratePolicy.cs @@ -41,3 +41,4 @@ public override bool Used(Type domainType, MethodIdentity identity) return base.Used(domainType, identity); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Integration/IntegrationGeneratorConfiguration.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Integration/IntegrationGeneratorConfiguration.cs index 604309247..8c13a6eea 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Integration/IntegrationGeneratorConfiguration.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Integration/IntegrationGeneratorConfiguration.cs @@ -3,3 +3,4 @@ namespace SampleSystem.CodeGenerate.Configurations.Services.Integration; public class IntegrationGeneratorConfiguration(ServerGenerationEnvironment environment) : IntegrationGeneratorConfigurationBase(environment); + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Main/ComplexChangeMethodGenerator.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Main/ComplexChangeMethodGenerator.cs index e512e034f..480149f9b 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Main/ComplexChangeMethodGenerator.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Main/ComplexChangeMethodGenerator.cs @@ -12,6 +12,7 @@ using Framework.CodeGeneration.ServiceModelGenerator; using Framework.CodeGeneration.ServiceModelGenerator.Extensions; using Framework.CodeGeneration.ServiceModelGenerator.MethodGenerators; + using SampleSystem.Domain; using SampleSystem.Domain.Models.Change._Base; @@ -59,14 +60,14 @@ protected override IEnumerable GetFacadeMethodInternalStatements( var domainObjectsRef = changeModelDecl.ToVariableReferenceExpression().ToPropertyReference(nameof(DomainObjectComplexChangeModel.SecondaryChangingObjects)); yield return new CodeParameterDeclarationExpression { Name = "secondaryDomainObject" }.Pipe(iterator => new CodeForeachStatement - { - Source = domainObjectsRef, - Iterator = iterator, - Statements = + { + Source = domainObjectsRef, + Iterator = iterator, + Statements = { bllRefExpr.ToMethodInvokeExpression("CheckAccess", iterator.ToVariableReferenceExpression()).ToExpressionStatement() } - }); + }); yield return bllRefExpr.ToMethodInvokeExpression(this.DomainType.GetModelMethodName(this.ModelType, SampleSystemModelRole.ComplexChange, false), changeModelDecl.ToVariableReferenceExpression()) @@ -87,3 +88,4 @@ protected override object GetBLLSecurityParameter(CodeExpression evaluateDataExp return modelSecurityAttribute.SecurityRule; } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Main/MainServiceGeneratorConfiguration.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Main/MainServiceGeneratorConfiguration.cs index 810f86ba8..87b671ae0 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Main/MainServiceGeneratorConfiguration.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/Main/MainServiceGeneratorConfiguration.cs @@ -35,3 +35,4 @@ public override IEnumerable GetMethodGenerators(Type do } } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/QueryService/QueryServiceGeneratorConfiguration.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/QueryService/QueryServiceGeneratorConfiguration.cs index 8d39f4780..8eb0ffa07 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/QueryService/QueryServiceGeneratorConfiguration.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/QueryService/QueryServiceGeneratorConfiguration.cs @@ -19,3 +19,4 @@ public QueryServiceGeneratorConfiguration(ServerGenerationEnvironment environmen public override IGeneratePolicy GeneratePolicy { get; } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/SampleSystemMethodIdentityType.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/SampleSystemMethodIdentityType.cs index 61f8724d0..31a278254 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/SampleSystemMethodIdentityType.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/SampleSystemMethodIdentityType.cs @@ -10,5 +10,6 @@ public static class SampleSystemMethodIdentityType /// /// Идентификатор генерации фасадных методов по ComplexChange-модели /// - public static readonly MethodIdentityType ComplexChange = new (nameof(ComplexChange)); + public static readonly MethodIdentityType ComplexChange = new(nameof(ComplexChange)); } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/SampleSystemModelRole.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/SampleSystemModelRole.cs index 0bd729d39..17046dbb2 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/SampleSystemModelRole.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/Services/SampleSystemModelRole.cs @@ -13,3 +13,4 @@ public static class SampleSystemModelRole /// public static readonly ModelRole ComplexChange = new(nameof(ComplexChange), DirectMode.In); } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/_ProjectionSources/LegacySampleSystemProjectionSource.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/_ProjectionSources/LegacySampleSystemProjectionSource.cs index a390ef8c1..e425a0802 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/_ProjectionSources/LegacySampleSystemProjectionSource.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/_ProjectionSources/LegacySampleSystemProjectionSource.cs @@ -1,6 +1,7 @@ using Framework.Projection; using Framework.Projection.Lambda; using Framework.Projection.Lambda.ProjectionSource; + using SampleSystem.Domain.Employee; using SampleSystem.Domain.Models.Filters; @@ -18,3 +19,4 @@ public LegacySampleSystemProjectionSource() => public Projection TestLegacyEmployee { get; } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/_ProjectionSources/SampleSystemProjectionSource.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/_ProjectionSources/SampleSystemProjectionSource.cs index c8570a505..97903f973 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/_ProjectionSources/SampleSystemProjectionSource.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/Configurations/_ProjectionSources/SampleSystemProjectionSource.cs @@ -3,6 +3,7 @@ using Framework.Projection; using Framework.Projection.Lambda; using Framework.Projection.Lambda.ProjectionSource; + using SampleSystem.Domain; using SampleSystem.Domain._CustomProjectionAttribute; using SampleSystem.Domain.BU; @@ -198,3 +199,4 @@ public SampleSystemProjectionSource() public Projection TestSecurityObjItemProjection { get; } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/ServerGenerators.Initialize.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/ServerGenerators.Initialize.cs index db313e4e9..d5e040203 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/ServerGenerators.Initialize.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/ServerGenerators.Initialize.cs @@ -17,3 +17,4 @@ public partial class ServerGenerators private ICheckOutService CheckOutService { get; } = Framework.FileGeneration.Checkout.CheckOutService.Trace; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/ServerGenerators.cs b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/ServerGenerators.cs index f9c0e7f9b..131dd06f1 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/ServerGenerators.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.CodeGenerate/ServerGenerators.cs @@ -260,3 +260,4 @@ private IEnumerable GenerateDAL() return generator.Generate(TargetSystemPath + @"/SampleSystem.Generated.DAL.NHibernate/Mapping", this.CheckOutService); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/BssFluentMigrator.cs b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/BssFluentMigrator.cs index d28321876..5428599b7 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/BssFluentMigrator.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/BssFluentMigrator.cs @@ -30,3 +30,4 @@ public void Migrate() runner.MigrateUp(); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/DbGenerationOptions.cs b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/DbGenerationOptions.cs index f4d3ed288..3a58778af 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/DbGenerationOptions.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/DbGenerationOptions.cs @@ -13,3 +13,4 @@ public class DbGenerationOptions [Option('o', Required = false, HelpText = "Output script path. If set, output script file is produced")] public string OutputPath { get; set; } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/DbGeneratorTest.cs b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/DbGeneratorTest.cs index 148b42b12..fafdb3ad7 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/DbGeneratorTest.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/DbGeneratorTest.cs @@ -163,3 +163,4 @@ private MappingSettings GetMappingSettings(string serverName, DatabaseName dbNam new NHibernateSettings { FluentAssemblyList = [typeof(SampleSystemMappingSettings).Assembly] })); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/Migrations/AddLogTable.cs b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/Migrations/AddLogTable.cs index 40f194d2d..679a11cfe 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/Migrations/AddLogTable.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/Migrations/AddLogTable.cs @@ -24,3 +24,4 @@ public override void Up() => public override void Down() => this.Delete.Table("Log2"); } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/Program.cs b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/Program.cs index 585016b7a..0ef119e5a 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/Program.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/Program.cs @@ -16,3 +16,4 @@ private static void GenerateDatabase(DbGenerationOptions options) generators.GenerateDatabase(options); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/SampleSystemDBGenerator.cs b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/SampleSystemDBGenerator.cs index 35ca47694..c0418a9cf 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/SampleSystemDBGenerator.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/SampleSystemDBGenerator.cs @@ -23,3 +23,4 @@ private bool Used(DomainTypeMetadata domainTypeMetadata) return tableAttribute == null || tableAttribute.Schema == "app"; } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/UseSchemeUpdateTest.cs b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/UseSchemeUpdateTest.cs index 07228a308..c1ec56e46 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/UseSchemeUpdateTest.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.DbGenerate.NHibernate/UseSchemeUpdateTest.cs @@ -99,3 +99,4 @@ private static void CheckDataBaseAndSchemeExists(string connectionString) connection.Close(); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AsyncControllerTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AsyncControllerTests.cs index a2ad9bedd..c1b3b6be5 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AsyncControllerTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AsyncControllerTests.cs @@ -42,3 +42,4 @@ public async Task TestSaveLocationWithWriteException_ExceptionRaised(Cancellatio Assert.IsType(ex); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AuditTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AuditTests.cs index a6588bb9c..7a53b945e 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AuditTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AuditTests.cs @@ -9,7 +9,6 @@ using SampleSystem.IntegrationTests._Environment.TestData; using SampleSystem.WebApiCore.Controllers.Audit; using SampleSystem.WebApiCore.Controllers.Main; - using BusinessUnitController = SampleSystem.WebApiCore.Controllers.Audit.BusinessUnitController; namespace SampleSystem.IntegrationTests; @@ -25,13 +24,13 @@ public void GetObjectRevisions_CheckCount_Correct() var testCount = 10; var employeeStrictDto = new EmployeeStrictDTO - { - NameEng = new Fio() { FirstName = "firstName", LastName = "lastName" }, - WorkPeriod = new Period(DateTime.Now.AddDays(-1), DateTime.Now), - ValidateVirtualProp = DateTime.Now, - EducationDuration = new Period(DateTime.Now.AddYears(-5), DateTime.Now.AddYears(-2)), - ExternalId = 1 - }; + { + NameEng = new Fio() { FirstName = "firstName", LastName = "lastName" }, + WorkPeriod = new Period(DateTime.Now.AddDays(-1), DateTime.Now), + ValidateVirtualProp = DateTime.Now, + EducationDuration = new Period(DateTime.Now.AddYears(-5), DateTime.Now.AddYears(-2)), + ExternalId = 1 + }; var employeeIdentity = employeeController.Evaluate(c => c.SaveEmployee(employeeStrictDto)); @@ -58,13 +57,13 @@ public void GetObjectByRevision_CheckState_Correct() var testCount = 10; var employeeStrictDto = new EmployeeStrictDTO - { - NameEng = new Fio() { FirstName = "firstName", LastName = "lastName" }, - WorkPeriod = new Period(DateTime.Now.AddDays(-1), DateTime.Now), - ValidateVirtualProp = DateTime.Now, - EducationDuration = new Period(DateTime.Now.AddYears(-5), DateTime.Now.AddYears(-2)), - ExternalId = 1 - }; + { + NameEng = new Fio() { FirstName = "firstName", LastName = "lastName" }, + WorkPeriod = new Period(DateTime.Now.AddDays(-1), DateTime.Now), + ValidateVirtualProp = DateTime.Now, + EducationDuration = new Period(DateTime.Now.AddYears(-5), DateTime.Now.AddYears(-2)), + ExternalId = 1 + }; var employeeIdentity = employeeController.Evaluate(c => c.SaveEmployee(employeeStrictDto)); @@ -86,11 +85,11 @@ public void GetObjectByRevision_CheckState_Correct() .Skip(skip) //// .FirstOrDefault(); - var lastEmployeeState = employeeAuditController.Evaluate(c => c.GetFullEmployeeWithRevision( new GetFullEmployeeWithRevisionAutoRequest - { - EmployeeIdentity = employeeIdentity, - Revision = lastRevision.RevisionNumber - })); + var lastEmployeeState = employeeAuditController.Evaluate(c => c.GetFullEmployeeWithRevision(new GetFullEmployeeWithRevisionAutoRequest + { + EmployeeIdentity = employeeIdentity, + Revision = lastRevision.RevisionNumber + })); var expected = Enumerable.Range(-1, testCount).Skip(skip).First(); Assert.Equal($"{expected}", lastEmployeeState.NameEng.FirstName); @@ -103,22 +102,22 @@ public void GetObjectPropertyRevisions_CallNotChangeProperty_RevisionsIsOne() var employeeController = this.MainWebApi.Employee; var employeeAuditController = this.MainAuditWebApi.Employee; var employeeStrictDto = new EmployeeStrictDTO - { - NameEng = new Fio() { FirstName = "firstName", LastName = "lastName" }, - WorkPeriod = new Period(DateTime.Now.AddDays(-1), DateTime.Now), - ValidateVirtualProp = DateTime.Now, - EducationDuration = new Period(DateTime.Now.AddYears(-5), DateTime.Now.AddYears(-2)), - ExternalId = 1 - }; + { + NameEng = new Fio() { FirstName = "firstName", LastName = "lastName" }, + WorkPeriod = new Period(DateTime.Now.AddDays(-1), DateTime.Now), + ValidateVirtualProp = DateTime.Now, + EducationDuration = new Period(DateTime.Now.AddYears(-5), DateTime.Now.AddYears(-2)), + ExternalId = 1 + }; var employeeIdentity = employeeController.Evaluate(c => c.SaveEmployee(employeeStrictDto)); // Assert var propertyRevisions = employeeAuditController.Evaluate(c => c.GetEmployeePropertyRevisions(new GetEmployeePropertyRevisionsAutoRequest - { - EmployeeIdentity = employeeIdentity, - PropertyName = $"{nameof(Employee.CoreBusinessUnit)}" - })); + { + EmployeeIdentity = employeeIdentity, + PropertyName = $"{nameof(Employee.CoreBusinessUnit)}" + })); Assert.Single(propertyRevisions.RevisionInfos); } @@ -133,13 +132,13 @@ public void GetObjectPropertyRevisions_ChangePrimitiveProperty_CorrectRevisions( var emailTail = "@email.email"; var employeeStrictDto = new EmployeeStrictDTO - { - NameEng = new Fio() { FirstName = "firstName", LastName = "lastName" }, - WorkPeriod = new Period(DateTime.Now.AddDays(-1), DateTime.Now), - ValidateVirtualProp = DateTime.Now, - EducationDuration = new Period(DateTime.Now.AddYears(-5), DateTime.Now.AddYears(-2)), - ExternalId = 1 - }; + { + NameEng = new Fio() { FirstName = "firstName", LastName = "lastName" }, + WorkPeriod = new Period(DateTime.Now.AddDays(-1), DateTime.Now), + ValidateVirtualProp = DateTime.Now, + EducationDuration = new Period(DateTime.Now.AddYears(-5), DateTime.Now.AddYears(-2)), + ExternalId = 1 + }; var employeeIdentity = employeeController.Evaluate(c => c.SaveEmployee(employeeStrictDto)); @@ -154,10 +153,10 @@ public void GetObjectPropertyRevisions_ChangePrimitiveProperty_CorrectRevisions( // Assert var skip = 3; var checkPropertyRevision = employeeAuditController.Evaluate(c => c.GetEmployeePropertyRevisions(new GetEmployeePropertyRevisionsAutoRequest - { - EmployeeIdentity = employeeIdentity, - PropertyName = $"{nameof(Employee.Email)}" - })) + { + EmployeeIdentity = employeeIdentity, + PropertyName = $"{nameof(Employee.Email)}" + })) .RevisionInfos .EmptyIfNull() .OrderBy(z => z.RevisionNumber) @@ -178,13 +177,13 @@ public void GetObjectPropertyRevisions_CheckFirstRevisioins_HasAddedState() var emailTail = "@email.email"; var employeeStrictDto = new EmployeeStrictDTO - { - NameEng = new Fio() { FirstName = "firstName", LastName = "lastName" }, - WorkPeriod = new Period(DateTime.Now.AddDays(-1), DateTime.Now), - ValidateVirtualProp = DateTime.Now, - EducationDuration = new Period(DateTime.Now.AddYears(-5), DateTime.Now.AddYears(-2)), - ExternalId = 1 - }; + { + NameEng = new Fio() { FirstName = "firstName", LastName = "lastName" }, + WorkPeriod = new Period(DateTime.Now.AddDays(-1), DateTime.Now), + ValidateVirtualProp = DateTime.Now, + EducationDuration = new Period(DateTime.Now.AddYears(-5), DateTime.Now.AddYears(-2)), + ExternalId = 1 + }; var employeeIdentity = employeeController.Evaluate(c => c.SaveEmployee(employeeStrictDto)); @@ -200,10 +199,10 @@ public void GetObjectPropertyRevisions_CheckFirstRevisioins_HasAddedState() var skip = 3; var firstRevision = employeeAuditController.Evaluate(c => c.GetEmployeePropertyRevisions(new GetEmployeePropertyRevisionsAutoRequest - { - EmployeeIdentity = employeeIdentity, - PropertyName = $"{nameof(Employee.Email)}" - })) + { + EmployeeIdentity = employeeIdentity, + PropertyName = $"{nameof(Employee.Email)}" + })) .RevisionInfos .EmptyIfNull() .OrderBy(z => z.RevisionNumber) @@ -223,13 +222,13 @@ public void GetObjectPropertyRevisions_CheckAfterFirstRevisioins_AllModifiedStat var emailTail = "@email.email"; var employeeStrictDto = new EmployeeStrictDTO - { - NameEng = new Fio() { FirstName = "firstName", LastName = "lastName" }, - WorkPeriod = new Period(DateTime.Now.AddDays(-1), DateTime.Now), - ValidateVirtualProp = DateTime.Now, - EducationDuration = new Period(DateTime.Now.AddYears(-5), DateTime.Now.AddYears(-2)), - ExternalId = 1 - }; + { + NameEng = new Fio() { FirstName = "firstName", LastName = "lastName" }, + WorkPeriod = new Period(DateTime.Now.AddDays(-1), DateTime.Now), + ValidateVirtualProp = DateTime.Now, + EducationDuration = new Period(DateTime.Now.AddYears(-5), DateTime.Now.AddYears(-2)), + ExternalId = 1 + }; var employeeIdentity = employeeController.Evaluate(c => c.SaveEmployee(employeeStrictDto)); @@ -243,10 +242,10 @@ public void GetObjectPropertyRevisions_CheckAfterFirstRevisioins_AllModifiedStat // Assert var afterFirstRevisions = employeeAuditController.Evaluate(c => c.GetEmployeePropertyRevisions(new GetEmployeePropertyRevisionsAutoRequest - { - EmployeeIdentity = employeeIdentity, - PropertyName = $"{nameof(Employee.Email)}" - })) + { + EmployeeIdentity = employeeIdentity, + PropertyName = $"{nameof(Employee.Email)}" + })) .RevisionInfos .EmptyIfNull() .OrderBy(z => z.RevisionNumber) @@ -288,3 +287,4 @@ public void CrateNewBu_AuditBuLoadedFromCustomMapping() Assert.Equal(newBu, auditBu.BuIdent); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/Auth/PrincipalTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/Auth/PrincipalTests.cs index cd837f2e0..adc4e57f2 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/Auth/PrincipalTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/Auth/PrincipalTests.cs @@ -1,13 +1,12 @@ -using Framework.Authorization.Generated.DTO; +using Anch.SecuritySystem; + +using Framework.Authorization.Generated.DTO; using Framework.BLL.Exceptions; +using SampleSystem.IntegrationTests._Environment.TestData; using SampleSystem.Security; using SampleSystem.WebApiCore.Controllers.Main; -using Anch.SecuritySystem; - -using SampleSystem.IntegrationTests._Environment.TestData; - using DelegateToItemModelStrictDTO = Framework.Authorization.Generated.DTO.DelegateToItemModelStrictDTO; namespace SampleSystem.IntegrationTests.Auth; @@ -50,10 +49,10 @@ public void SavePrincipal_CheckCreateon() var businessRoleIdentity = authorizationController.Evaluate(c => c.GetSimpleBusinessRoleByName(SampleSystemSecurityRole.SecretariatNotification.Name)).Identity; var principalStrict = new PrincipalStrictDTO - { - Name = Name, - Permissions = [new PermissionStrictDTO { Role = businessRoleIdentity }] - }; + { + Name = Name, + Permissions = [new PermissionStrictDTO { Role = businessRoleIdentity }] + }; // Act var principalIdentity = this.GetAuthControllerEvaluator().Evaluate(c => c.SavePrincipal(principalStrict)); @@ -109,9 +108,9 @@ public void PermissionDelegate_CheckChanges() var newPrincipalIdentity = this.GetAuthControllerEvaluator().Evaluate(c => c.SavePrincipal(newPrincipalStrict)); var changePermissionDelegate = new ChangePermissionDelegatesModelStrictDTO - { - DelegateFromPermission = permissionIdentity, - Items = + { + DelegateFromPermission = permissionIdentity, + Items = { new DelegateToItemModelStrictDTO { @@ -119,7 +118,7 @@ public void PermissionDelegate_CheckChanges() Permission = new PermissionStrictDTO { Role = businessRoleIdentity } } } - }; + }; // Act this.GetAuthControllerEvaluator().Evaluate(c => c.ChangeDelegatePermissions(changePermissionDelegate)); @@ -189,3 +188,4 @@ public void RemovePrincipal_CheckRemoval() Assert.Matches("^Principal with id = \".*\" not found$", notFoundException.Message); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AuthPerformanceTest.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AuthPerformanceTest.cs index 7658e3a28..af581c57d 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AuthPerformanceTest.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AuthPerformanceTest.cs @@ -1,4 +1,7 @@ -using Framework.Application; +using Anch.SecuritySystem; +using Anch.Testing.Xunit; + +using Framework.Application; using Framework.Application.Repository; using Framework.Database; @@ -10,12 +13,8 @@ using SampleSystem.Domain.Employee; using SampleSystem.Domain.MU; using SampleSystem.Generated.DTO; -using SampleSystem.Security; - -using Anch.SecuritySystem; -using Anch.Testing.Xunit; - using SampleSystem.IntegrationTests._Environment.TestData; +using SampleSystem.Security; namespace SampleSystem.IntegrationTests; @@ -104,12 +103,12 @@ await this.RootServiceProvider.GetRequiredService().Evaluat foreach (var emp in this.employeeSource) { var testObj = new AuthPerformanceObject - { - BusinessUnit = fbu == null ? null : await fbuRep.LoadAsync(fbu.Value.Id), - ManagementUnit = mbu == null ? null : await mbuRep.LoadAsync(mbu.Value.Id), - Location = loc == null ? null : await locRep.LoadAsync(loc.Value.Id), - Employee = emp == null ? null : await empRep.LoadAsync(emp.Value.Id), - }; + { + BusinessUnit = fbu == null ? null : await fbuRep.LoadAsync(fbu.Value.Id), + ManagementUnit = mbu == null ? null : await mbuRep.LoadAsync(mbu.Value.Id), + Location = loc == null ? null : await locRep.LoadAsync(loc.Value.Id), + Employee = emp == null ? null : await empRep.LoadAsync(emp.Value.Id), + }; await testObjRep.SaveAsync(testObj); @@ -122,3 +121,4 @@ await this.RootServiceProvider.GetRequiredService().Evaluat return count; }); } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AuthPerformanceTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AuthPerformanceTests.cs index 0b26fd8b7..493ea3174 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AuthPerformanceTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/AuthPerformanceTests.cs @@ -1,16 +1,15 @@ -using Framework.AutomationCore.RootServiceProviderContainer; +using Anch.SecuritySystem; + +using Framework.AutomationCore.RootServiceProviderContainer; using Framework.BLL; using Framework.Core; using SampleSystem.Domain; using SampleSystem.Domain.TestDeserializedAuth; +using SampleSystem.IntegrationTests._Environment.TestData; using SampleSystem.Security; using SampleSystem.WebApiCore.Controllers.Main; -using Anch.SecuritySystem; - -using SampleSystem.IntegrationTests._Environment.TestData; - namespace SampleSystem.IntegrationTests; public class AuthPerformanceTests(IServiceProvider rootServiceProvider) : TestBase(rootServiceProvider) @@ -39,13 +38,13 @@ from locIdent in genLoc from buIdent in genBu from mbuIdent in genMbu select new TestPerformanceObject - { - Employee = ctx.Logics.Employee.GetById(emplIdent.Id), - Location = ctx.Logics.Location.GetById(locIdent.Id), - BusinessUnit = ctx.Logics.BusinessUnit.GetById(buIdent.Id), - ManagementUnit = ctx.Logics.ManagementUnit.GetById(mbuIdent.Id), - Name = Guid.NewGuid().ToString() - }; + { + Employee = ctx.Logics.Employee.GetById(emplIdent.Id), + Location = ctx.Logics.Location.GetById(locIdent.Id), + BusinessUnit = ctx.Logics.BusinessUnit.GetById(buIdent.Id), + ManagementUnit = ctx.Logics.ManagementUnit.GetById(mbuIdent.Id), + Name = Guid.NewGuid().ToString() + }; var genObjects = gebObjectsRequest.ToList(); @@ -111,3 +110,4 @@ public void CreateObjectsWithPermissions_HasAccessToAllObjects() Assert.Equal(Limit * Limit * Limit * Limit, testPerformanceObjects.Count()); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/BUProjectionTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/BUProjectionTests.cs index 7f3b9940c..97b81e3e7 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/BUProjectionTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/BUProjectionTests.cs @@ -50,9 +50,9 @@ protected override async ValueTask InitializeAsync(CancellationToken ct) var emp = context.Logics.Employee.GetById(empId.Id, true); var link = new BusinessUnitEmployeeRole(bu) - { - Employee = emp - }; + { + Employee = emp + }; } context.Logics.BusinessUnit.Save(bu); @@ -89,3 +89,4 @@ public void BusinessUnitProjectionCalcHerPropTest() Assert.Equal(expectedHer, item.HerBusinessUnit_Full); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/BusinessUnitTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/BusinessUnitTests.cs index 628157e96..061d05ebf 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/BusinessUnitTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/BusinessUnitTests.cs @@ -1,20 +1,18 @@ -using Framework.Application; +using Anch.SecuritySystem; + +using Framework.Application; using Framework.AutomationCore.RootServiceProviderContainer; +using Framework.AutomationCore.Services; using Framework.BLL.Domain.Persistent; using Framework.Core; using Framework.Database; -using Anch.SecuritySystem; - -using Framework.AutomationCore.Services; - using SampleSystem.Domain.BU; using SampleSystem.Domain.Enums; using SampleSystem.Generated.DTO; using SampleSystem.IntegrationTests._Environment.TestData; using SampleSystem.Security; using SampleSystem.WebApiCore.Controllers.MainQuery; - using BusinessUnitController = SampleSystem.WebApiCore.Controllers.Main.BusinessUnitController; namespace SampleSystem.IntegrationTests; @@ -192,3 +190,4 @@ private void CreateBigBuTree() }); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/CurrentUserManyRelativePathTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/CurrentUserManyRelativePathTests.cs index 1b473cccc..af4e54eaf 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/CurrentUserManyRelativePathTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/CurrentUserManyRelativePathTests.cs @@ -1,9 +1,9 @@ -using Framework.Application; +using Anch.SecuritySystem; + +using Framework.Application; using Framework.AutomationCore.RootServiceProviderContainer; using Framework.Database; -using Anch.SecuritySystem; - using SampleSystem.Domain; using SampleSystem.IntegrationTests._Environment.TestData; @@ -70,3 +70,4 @@ public void TestManyRelativeEmployeeObject_FilterByEmployee_ObjectFound() Assert.Equal(expectedResult, results); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/CurrentUserSingleRelativePathTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/CurrentUserSingleRelativePathTests.cs index b3f0d833f..ee4673b46 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/CurrentUserSingleRelativePathTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/CurrentUserSingleRelativePathTests.cs @@ -1,10 +1,10 @@ -using Framework.Application; -using Framework.Database; -using Framework.BLL; - -using Anch.SecuritySystem; +using Anch.SecuritySystem; using Anch.SecuritySystem.UserSource; +using Framework.Application; +using Framework.BLL; +using Framework.Database; + using Microsoft.Extensions.DependencyInjection; using SampleSystem.Domain; @@ -59,3 +59,4 @@ public static IEnumerable TestRelativeEmployeeObject_FilterByPrimaryEm [nameof(TestRelativeEmployeeObject.EmployeeRef2), 1], ]; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/CurrentUserSourceTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/CurrentUserSourceTests.cs index 97a02bd3d..6a15a371a 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/CurrentUserSourceTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/CurrentUserSourceTests.cs @@ -1,9 +1,8 @@ -using Framework.Application; -using Framework.Database; - -using Anch.SecuritySystem.UserSource; +using Anch.SecuritySystem.UserSource; +using Framework.Application; using Framework.AutomationCore.Services; +using Framework.Database; using SampleSystem.Domain.Employee; using SampleSystem.IntegrationTests._Environment.TestData; @@ -52,3 +51,4 @@ public void TryGetCurrentUserWithoutEmployee_ExceptionRaised() Assert.Equal($"{nameof(Employee)} \"{randomName}\" not found", userSourceException.Message); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/ChangeIndexesStrategyTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/ChangeIndexesStrategyTests.cs index 5a3b3e1d3..e29086487 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/ChangeIndexesStrategyTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/ChangeIndexesStrategyTests.cs @@ -1,5 +1,4 @@ using Framework.AutomationCore.Extensions; -using Framework.Database.NHibernate.DBGenerator; using Microsoft.SqlServer.Management.Smo; @@ -97,3 +96,4 @@ public void GenerateLocal_UniqueFieldForFK_NoDuplicates() Assert.DoesNotContain(changedTable.Indexes, x => x.Name == "IX_ChildEntity_parentId"); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/GenerateDBTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/GenerateDBTests.cs index 074aaba85..7fce165c2 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/GenerateDBTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/GenerateDBTests.cs @@ -1,6 +1,4 @@ using Framework.AutomationCore.Extensions; -using Framework.Database.NHibernate.DBGenerator; - using SampleSystem.DbGenerate.NHibernate; using SampleSystem.IntegrationTests._Environment; @@ -26,3 +24,4 @@ public void GenerateDB_SecondTime_ShouldNotFail() Assert.Null(ex); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/SchemeUpdateTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/SchemeUpdateTests.cs index fe6d3564d..0501e4aac 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/SchemeUpdateTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/SchemeUpdateTests.cs @@ -17,3 +17,4 @@ public void SchemeUpdate_ExistsDatabase_ShouldNotFail() Assert.Null(ex); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/UniqueGroupDatabaseScriptGeneratorTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/UniqueGroupDatabaseScriptGeneratorTests.cs index 13d4d27d2..a90a9de25 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/UniqueGroupDatabaseScriptGeneratorTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DBGeneration/UniqueGroupDatabaseScriptGeneratorTests.cs @@ -1,5 +1,4 @@ using Framework.AutomationCore.Extensions; -using Framework.Database.NHibernate.DBGenerator; using Microsoft.SqlServer.Management.Smo; @@ -54,3 +53,4 @@ public void GenerateLocal_UniqueIndexExistsWithLessColumns_RecreatesColumns() Assert.Contains(indexedColumns, x => x.Name == "roleId"); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DefaultFieldsTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DefaultFieldsTests.cs index 56bd5aeb8..260541be0 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DefaultFieldsTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DefaultFieldsTests.cs @@ -23,3 +23,4 @@ public void GetDefaultValueFromAttr_CompareWithDTO_DefaultValuesEquals() Assert.Equal(TestDefaultFieldsMappingObj.EnumDefaultVal, dto.EnumVal); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DependencySecurityTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DependencySecurityTests.cs index 7d7989062..4eb88aa23 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DependencySecurityTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/DependencySecurityTests.cs @@ -127,3 +127,4 @@ public void TestSecurityObjSubItem3_LoadedByDependencySecurity() Assert.Equal(TestObjSubItem3, item.Name); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EmployeeProjectionTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EmployeeProjectionTests.cs index f71a84587..6b28cb612 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EmployeeProjectionTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EmployeeProjectionTests.cs @@ -136,3 +136,4 @@ public void EmployeeProjectionSortingTest() Assert.Equal(expected, actual); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EmployeeTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EmployeeTests.cs index d1429b7a2..c56f9d3a4 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EmployeeTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EmployeeTests.cs @@ -1,18 +1,16 @@ using System.Data.SqlTypes; using Anch.Core; +using Anch.SecuritySystem; +using Anch.Testing.Xunit; using Framework.Application; using Framework.Application.Events; +using Framework.AutomationCore.Extensions; using Framework.Configuration.Generated.DTO; using Framework.Database; using Framework.Database.NHibernate.Sessions; -using Anch.SecuritySystem; -using Anch.Testing.Xunit; - -using Framework.AutomationCore.Extensions; - using Microsoft.Extensions.DependencyInjection; using NHibernate.Impl; @@ -212,7 +210,8 @@ public void ForceDomainTypeEvent_ForceEmployeeSaveEvent_ContainsEventEmployee() c => c.ForceDomainTypeEvent( new DomainTypeEventModelStrictDTO { - Operation = operation.Identity, DomainObjectIdents = new List { employeeIdentity.Id } + Operation = operation.Identity, + DomainObjectIdents = new List { employeeIdentity.Id } })); // Assert @@ -358,3 +357,4 @@ public void LoadEmployeeCellPhoneByDependencySecurity_ObjectLoaded() Assert.True(notNull); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EnversBug1676.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EnversBug1676.cs index bd412362b..457dbb1b7 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EnversBug1676.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EnversBug1676.cs @@ -21,9 +21,9 @@ public void OneToOneMapping() context => { var location = new Location1676 - { - Name = "test" - }; + { + Name = "test" + }; context.Logics.Location1676.Insert(location, locaitionId); @@ -65,19 +65,20 @@ public void OneToOneMapping() { var locationRevisions = context.Logics.Location1676.GetObjectRevisions(locaitionId).RevisionInfos.OrderBy(z => z.RevisionNumber).ToList(); - Assert.Equal(4, locationRevisions.Count); + Assert.Equal(4, locationRevisions.Count); var version1 = context.Logics.Location1676.GetObjectByRevision(locaitionId, locationRevisions[0].RevisionNumber); - Assert.Equal(version1Norm, version1.Coefficient.NormCoefficient); + Assert.Equal(version1Norm, version1.Coefficient.NormCoefficient); var version2 = context.Logics.Location1676.GetObjectByRevision(locaitionId, locationRevisions[1].RevisionNumber); - Assert.Equal(version1Norm, version2.Coefficient.NormCoefficient); + Assert.Equal(version1Norm, version2.Coefficient.NormCoefficient); var version3 = context.Logics.Location1676.GetObjectByRevision(locaitionId, locationRevisions[2].RevisionNumber); - Assert.Equal(version2Norm, version3.Coefficient.NormCoefficient); + Assert.Equal(version2Norm, version3.Coefficient.NormCoefficient); var version4 = context.Logics.Location1676.GetObjectByRevision(locaitionId, locationRevisions[3].RevisionNumber); - Assert.Equal(version2Norm, version4.Coefficient.NormCoefficient); + Assert.Equal(version2Norm, version4.Coefficient.NormCoefficient); }); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EventDALListenerTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EventDALListenerTests.cs index 91d7a01a4..b48d05154 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EventDALListenerTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/EventDALListenerTests.cs @@ -1,7 +1,7 @@ -using Framework.Application; -using Framework.Database; +using Anch.Testing.Xunit; -using Anch.Testing.Xunit; +using Framework.Application; +using Framework.Database; using SampleSystem.EventMetadata; using SampleSystem.IntegrationTests._Environment.TestData; @@ -27,3 +27,4 @@ public async Task Employee_SendCustomEventOperation_ExceptionNotThrow(Cancellati await action(); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ExpandPathTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ExpandPathTests.cs index 158436543..a31939a1c 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ExpandPathTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ExpandPathTests.cs @@ -89,3 +89,4 @@ public void LiftToNullablePeriodContains_ShouldNotThrowException() action(); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ExtraQueryableSecurityPathTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ExtraQueryableSecurityPathTests.cs index 6cef89e13..b71eae6c4 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ExtraQueryableSecurityPathTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ExtraQueryableSecurityPathTests.cs @@ -1,11 +1,11 @@ using Anch.Core; +using Anch.SecuritySystem; +using Anch.SecuritySystem.Services; using Framework.Application; using Framework.Core; using Framework.Database; -using Anch.SecuritySystem; -using Anch.SecuritySystem.Services; using Microsoft.Extensions.DependencyInjection; using SampleSystem.BLL; @@ -94,3 +94,4 @@ public void TestExtraQueryableSecurityPath_LoadedWithExtraQueryableFilter() Assert.Equal(this.TestEmp2.Id, Assert.Single(items)); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/FixedPropertyValidatorTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/FixedPropertyValidatorTests.cs index 28738a85b..37f1511e4 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/FixedPropertyValidatorTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/FixedPropertyValidatorTests.cs @@ -85,3 +85,4 @@ public void ImmutablePropertyChangedByIntegration_RaisedValidationError() } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/GetNotificationPrincipalsByHierarchicalContextTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/GetNotificationPrincipalsByHierarchicalContextTests.cs index fab46f119..9d8eb9a7b 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/GetNotificationPrincipalsByHierarchicalContextTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/GetNotificationPrincipalsByHierarchicalContextTests.cs @@ -1,4 +1,7 @@ -using Framework.Application; +using Anch.SecuritySystem.Notification; +using Anch.SecuritySystem.Notification.Domain; + +using Framework.Application; using Framework.Database; using Microsoft.Extensions.DependencyInjection; @@ -7,12 +10,8 @@ using SampleSystem.Domain.Employee; using SampleSystem.Domain.MU; using SampleSystem.Generated.DTO; -using SampleSystem.Security; - -using Anch.SecuritySystem.Notification; -using Anch.SecuritySystem.Notification.Domain; - using SampleSystem.IntegrationTests._Environment.TestData; +using SampleSystem.Security; namespace SampleSystem.IntegrationTests; @@ -79,20 +78,26 @@ public void GetPrincipals_Direct_Test1_Searched() this.child_1_1_ManagementUnit)); var fbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(BusinessUnit), ExpandType = NotificationExpandType.Direct, Idents = [this.child_1_1_BusinessUnit.Id] - }; + { + SecurityContextType = typeof(BusinessUnit), + ExpandType = NotificationExpandType.Direct, + Idents = [this.child_1_1_BusinessUnit.Id] + }; var mbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(ManagementUnit), ExpandType = NotificationExpandType.Direct, Idents = [this.child_1_1_ManagementUnit.Id] - }; + { + SecurityContextType = typeof(ManagementUnit), + ExpandType = NotificationExpandType.Direct, + Idents = [this.child_1_1_ManagementUnit.Id] + }; var employeeFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(Employee), ExpandType = NotificationExpandType.DirectOrFirstParent, Idents = [this.rootEmployee.Id] - }; + { + SecurityContextType = typeof(Employee), + ExpandType = NotificationExpandType.DirectOrFirstParent, + Idents = [this.rootEmployee.Id] + }; // Act var result = this.GetNotificationPrincipalsByRoles(fbuChildFilter, mbuChildFilter, employeeFilter); @@ -114,14 +119,18 @@ public void GetPrincipals_Direct_Test2_Missed() this.child_1_1_ManagementUnit)); var fbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(BusinessUnit), ExpandType = NotificationExpandType.Direct, Idents = [this.child_1_1_BusinessUnit.Id] - }; + { + SecurityContextType = typeof(BusinessUnit), + ExpandType = NotificationExpandType.Direct, + Idents = [this.child_1_1_BusinessUnit.Id] + }; var mbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(ManagementUnit), ExpandType = NotificationExpandType.Direct, Idents = [this.child_1_1_ManagementUnit.Id] - }; + { + SecurityContextType = typeof(ManagementUnit), + ExpandType = NotificationExpandType.Direct, + Idents = [this.child_1_1_ManagementUnit.Id] + }; // Act var result = this.GetNotificationPrincipalsByRoles(fbuChildFilter, mbuChildFilter); @@ -142,20 +151,26 @@ public void GetPrincipals_Direct_Test3_Missed() this.child_1_1_ManagementUnit)); var fbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(BusinessUnit), ExpandType = NotificationExpandType.DirectOrEmpty, Idents = [this.child_1_1_BusinessUnit.Id] - }; + { + SecurityContextType = typeof(BusinessUnit), + ExpandType = NotificationExpandType.DirectOrEmpty, + Idents = [this.child_1_1_BusinessUnit.Id] + }; var mbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(ManagementUnit), ExpandType = NotificationExpandType.DirectOrEmpty, Idents = [this.child_1_1_ManagementUnit.Id] - }; + { + SecurityContextType = typeof(ManagementUnit), + ExpandType = NotificationExpandType.DirectOrEmpty, + Idents = [this.child_1_1_ManagementUnit.Id] + }; var employeeChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(Employee), ExpandType = NotificationExpandType.Direct, Idents = [this.rootEmployee.Id] - }; + { + SecurityContextType = typeof(Employee), + ExpandType = NotificationExpandType.Direct, + Idents = [this.rootEmployee.Id] + }; // Act var result = this.GetNotificationPrincipalsByRoles(fbuChildFilter, mbuChildFilter, employeeChildFilter); @@ -178,24 +193,26 @@ public void GetPrincipals_Direct_Test4_Searched() var fbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(BusinessUnit), - ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, - Idents = [this.child_1_1_BusinessUnit.Id] - }; + { + SecurityContextType = typeof(BusinessUnit), + ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, + Idents = [this.child_1_1_BusinessUnit.Id] + }; var mbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(ManagementUnit), - ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, - Idents = [this.child_1_1_ManagementUnit.Id] - }; + { + SecurityContextType = typeof(ManagementUnit), + ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, + Idents = [this.child_1_1_ManagementUnit.Id] + }; var employeeChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(Employee), ExpandType = NotificationExpandType.Direct, Idents = [this.rootEmployee.Id] - }; + { + SecurityContextType = typeof(Employee), + ExpandType = NotificationExpandType.Direct, + Idents = [this.rootEmployee.Id] + }; // Act var result = this.GetNotificationPrincipalsByRoles(fbuChildFilter, mbuChildFilter, employeeChildFilter); @@ -221,14 +238,18 @@ public void GetPrincipals_DirectOrEmpty_Test1_Searched() this.child_1_1_ManagementUnit)); var fbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(BusinessUnit), ExpandType = NotificationExpandType.DirectOrEmpty, Idents = [this.child_1_1_BusinessUnit.Id] - }; + { + SecurityContextType = typeof(BusinessUnit), + ExpandType = NotificationExpandType.DirectOrEmpty, + Idents = [this.child_1_1_BusinessUnit.Id] + }; var mbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(ManagementUnit), ExpandType = NotificationExpandType.Direct, Idents = [this.child_1_1_ManagementUnit.Id] - }; + { + SecurityContextType = typeof(ManagementUnit), + ExpandType = NotificationExpandType.Direct, + Idents = [this.child_1_1_ManagementUnit.Id] + }; // Act var result = this.GetNotificationPrincipalsByRoles(fbuChildFilter, mbuChildFilter); @@ -256,16 +277,18 @@ public void GetPrincipals_DirectOrFirstParentOrEmpty_Test1_Searched() this.child_1_1_ManagementUnit)); var fbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(BusinessUnit), - ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, - Idents = [this.child_1_1_BusinessUnit.Id] - }; + { + SecurityContextType = typeof(BusinessUnit), + ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, + Idents = [this.child_1_1_BusinessUnit.Id] + }; var mbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(ManagementUnit), ExpandType = NotificationExpandType.Direct, Idents = [this.child_1_1_ManagementUnit.Id] - }; + { + SecurityContextType = typeof(ManagementUnit), + ExpandType = NotificationExpandType.Direct, + Idents = [this.child_1_1_ManagementUnit.Id] + }; // Act var result = this.GetNotificationPrincipalsByRoles(fbuChildFilter, mbuChildFilter); @@ -292,18 +315,18 @@ public void GetPrincipals_DirectOrFirstParentOrEmpty_Test2_Searched() this.rootManagementUnit)); var fbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(BusinessUnit), - ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, - Idents = [this.child_1_1_BusinessUnit.Id] - }; + { + SecurityContextType = typeof(BusinessUnit), + ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, + Idents = [this.child_1_1_BusinessUnit.Id] + }; var mbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(ManagementUnit), - ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, - Idents = [this.child_1_1_ManagementUnit.Id] - }; + { + SecurityContextType = typeof(ManagementUnit), + ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, + Idents = [this.child_1_1_ManagementUnit.Id] + }; // Act var result = this.GetNotificationPrincipalsByRoles(fbuChildFilter, mbuChildFilter); @@ -333,18 +356,18 @@ public void GetPrincipals_DirectOrFirstParentOrEmpty_Test3_Searched(bool swapPri var fbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(BusinessUnit), - ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, - Idents = [this.child_1_1_BusinessUnit.Id] - }; + { + SecurityContextType = typeof(BusinessUnit), + ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, + Idents = [this.child_1_1_BusinessUnit.Id] + }; var mbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(ManagementUnit), - ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, - Idents = [this.child_1_1_ManagementUnit.Id] - }; + { + SecurityContextType = typeof(ManagementUnit), + ExpandType = NotificationExpandType.DirectOrFirstParentOrEmpty, + Idents = [this.child_1_1_ManagementUnit.Id] + }; // Act var result = swapPriority @@ -374,14 +397,18 @@ public void GetPrincipals_All_Test1_Searched() var fbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(BusinessUnit), ExpandType = NotificationExpandType.All, Idents = [this.child_1_1_BusinessUnit.Id] - }; + { + SecurityContextType = typeof(BusinessUnit), + ExpandType = NotificationExpandType.All, + Idents = [this.child_1_1_BusinessUnit.Id] + }; var mbuChildFilter = new NotificationFilterGroup - { - SecurityContextType = typeof(ManagementUnit), ExpandType = NotificationExpandType.Direct, Idents = [this.child_1_1_ManagementUnit.Id] - }; + { + SecurityContextType = typeof(ManagementUnit), + ExpandType = NotificationExpandType.Direct, + Idents = [this.child_1_1_ManagementUnit.Id] + }; // Act var result = this.GetNotificationPrincipalsByRoles(fbuChildFilter, mbuChildFilter); @@ -397,10 +424,11 @@ private string[] GetNotificationPrincipalsByRoles(params NotificationFilterGroup this.Evaluate( DBSessionMode.Read, context => context.ServiceProvider.GetRequiredService>() - .GetPrincipalsAsync([SampleSystemSecurityRole.SearchTestBusinessRole], [..notificationFilterGroups]) + .GetPrincipalsAsync([SampleSystemSecurityRole.SearchTestBusinessRole], [.. notificationFilterGroups]) .ToListAsync() .GetAwaiter() .GetResult() .Select(p => p.Name) .ToArray()); } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ImpersonateTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ImpersonateTests.cs index acf4ac134..93cdde76e 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ImpersonateTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ImpersonateTests.cs @@ -26,3 +26,4 @@ public async Task SaveDataWithImpersonate_ImpersonateWork(CancellationToken ct) } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/InformationTest.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/InformationTest.cs index bbde0a266..f5648f56d 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/InformationTest.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/InformationTest.cs @@ -37,3 +37,4 @@ public void CreateAndRemoveInformation_ContainsIntegrationEvents() Assert.Single(this.GetIntegrationEvents(), dto => dto.Information.Id == id); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/IntegrationVersionTest.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/IntegrationVersionTest.cs index f7dcf9483..ea0cca88b 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/IntegrationVersionTest.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/IntegrationVersionTest.cs @@ -1,6 +1,6 @@ -using Framework.AutomationCore.RootServiceProviderContainer; +using Anch.SecuritySystem; -using Anch.SecuritySystem; +using Framework.AutomationCore.RootServiceProviderContainer; using SampleSystem.Domain.IntegrationVersions; using SampleSystem.Generated.DTO; @@ -20,10 +20,10 @@ public void SaveWithMoreVersion_IgnoreLessPolicy_ValueSaved() var id = this.EvaluateWrite(context => { var obj = new IntegrationVersionContainer1() - { - Name = Guid.NewGuid().ToString(), - IntegrationVersion = integrationVersion - }; + { + Name = Guid.NewGuid().ToString(), + IntegrationVersion = integrationVersion + }; context.Logics.Default.Create().Save(obj); @@ -40,9 +40,9 @@ public void SaveWithMoreVersion_IgnoreLessPolicy_ValueSaved() integrationVersionContainer1Controller.Evaluate(c => c.SaveIntegrationVersionContainer1( new IntegrationVersionContainer1IntegrationRichDTO() { - Id = id, - IntegrationVersion = expectedIntegrationVersion, - Name = expectedName + Id = id, + IntegrationVersion = expectedIntegrationVersion, + Name = expectedName })); // Assert @@ -62,10 +62,10 @@ public void SaveWithLessVersion_IgnoreLessPolicy_ValueIgnore() var id = this.EvaluateWrite(context => { var obj = new IntegrationVersionContainer1() - { - Name = expectedName, - IntegrationVersion = expectedIntegrationVersion - }; + { + Name = expectedName, + IntegrationVersion = expectedIntegrationVersion + }; context.Logics.Default.Create().Save(obj); @@ -80,9 +80,9 @@ public void SaveWithLessVersion_IgnoreLessPolicy_ValueIgnore() integrationVersionContainer1Controller.Evaluate(c => c.SaveIntegrationVersionContainer1( new IntegrationVersionContainer1IntegrationRichDTO() { - Id = id, - IntegrationVersion = expectedIntegrationVersion - 10, - Name = Guid.NewGuid().ToString() + Id = id, + IntegrationVersion = expectedIntegrationVersion - 10, + Name = Guid.NewGuid().ToString() })); // Assert @@ -102,10 +102,10 @@ public void SaveWithEqualVersion_IgnoreLessPolicy_ValueIgnored() var id = this.EvaluateWrite(context => { var obj = new IntegrationVersionContainer1() - { - Name = expectedName, - IntegrationVersion = expectedIntegrationVersion - }; + { + Name = expectedName, + IntegrationVersion = expectedIntegrationVersion + }; context.Logics.Default.Create().Save(obj); @@ -120,9 +120,9 @@ public void SaveWithEqualVersion_IgnoreLessPolicy_ValueIgnored() integrationVersionContainer1Controller.Evaluate(c => c.SaveIntegrationVersionContainer1( new IntegrationVersionContainer1IntegrationRichDTO() { - Id = id, - IntegrationVersion = expectedIntegrationVersion, - Name = Guid.NewGuid().ToString() + Id = id, + IntegrationVersion = expectedIntegrationVersion, + Name = Guid.NewGuid().ToString() })); // Assert @@ -141,10 +141,10 @@ public void SaveWithMoreVersion_IgnoreLessOrEqualPolicy_ValueSaved() var id = this.EvaluateWrite(context => { var obj = new IntegrationVersionContainer2() - { - Name = Guid.NewGuid().ToString(), - IntegrationVersion = integrationVersion - }; + { + Name = Guid.NewGuid().ToString(), + IntegrationVersion = integrationVersion + }; context.Logics.Default.Create().Save(obj); @@ -161,9 +161,9 @@ public void SaveWithMoreVersion_IgnoreLessOrEqualPolicy_ValueSaved() integrationVersionContainer2Controller.Evaluate(c => c.SaveIntegrationVersionContainer2( new IntegrationVersionContainer2IntegrationRichDTO() { - Id = id, - IntegrationVersion = expectedIntegrationVersion, - Name = expectedName + Id = id, + IntegrationVersion = expectedIntegrationVersion, + Name = expectedName })); // Assert @@ -183,10 +183,10 @@ public void SaveWithLessVersion_IgnoreLessOrEqualPolicy_ValueIgnore() var id = this.EvaluateWrite(context => { var obj = new IntegrationVersionContainer2() - { - Name = expectedName, - IntegrationVersion = expectedIntegrationVersion - }; + { + Name = expectedName, + IntegrationVersion = expectedIntegrationVersion + }; context.Logics.Default.Create().Save(obj); @@ -201,9 +201,9 @@ public void SaveWithLessVersion_IgnoreLessOrEqualPolicy_ValueIgnore() integrationVersionContainer2Controller.Evaluate(c => c.SaveIntegrationVersionContainer2( new IntegrationVersionContainer2IntegrationRichDTO() { - Id = id, - IntegrationVersion = expectedIntegrationVersion - 10, - Name = Guid.NewGuid().ToString() + Id = id, + IntegrationVersion = expectedIntegrationVersion - 10, + Name = Guid.NewGuid().ToString() })); // Assert @@ -223,10 +223,10 @@ public void SaveWithEqualVersion_IgnoreLessOrEqualPolicy_ValueIgnored() var id = this.EvaluateWrite(context => { var obj = new IntegrationVersionContainer2() - { - Name = expectedName, - IntegrationVersion = expectedIntegrationVersion - }; + { + Name = expectedName, + IntegrationVersion = expectedIntegrationVersion + }; context.Logics.Default.Create().Save(obj); @@ -243,9 +243,9 @@ public void SaveWithEqualVersion_IgnoreLessOrEqualPolicy_ValueIgnored() integrationVersionContainer2Controller.Evaluate(c => c.SaveIntegrationVersionContainer2( new IntegrationVersionContainer2IntegrationRichDTO() { - Id = id, - IntegrationVersion = expectedIntegrationVersion, - Name = nextName + Id = id, + IntegrationVersion = expectedIntegrationVersion, + Name = nextName })); // Assert @@ -265,10 +265,10 @@ public void SaveModelWithLessVersion_IgnoreLessOrEqualPolicy_ValueIgnore() var id = this.EvaluateWrite(context => { var obj = new IntegrationVersionContainer1() - { - Name = expectedName, - IntegrationVersion = expectedIntegrationVersion - }; + { + Name = expectedName, + IntegrationVersion = expectedIntegrationVersion + }; context.Logics.Default.Create().Save(obj); @@ -283,8 +283,8 @@ public void SaveModelWithLessVersion_IgnoreLessOrEqualPolicy_ValueIgnore() integrationVersionContainer1Controller.Evaluate(c => c.SaveIntegrationVersionContainer1ByCustom( new IntegrationVersionContainer1CustomIntegrationSaveModelIntegrationRichDTO() { - SavingObject = new IntegrationVersionContainer1IntegrationSimpleDTO() { Id = id, IntegrationVersion = expectedIntegrationVersion - 1 }, - CustomName = modelName + SavingObject = new IntegrationVersionContainer1IntegrationSimpleDTO() { Id = id, IntegrationVersion = expectedIntegrationVersion - 1 }, + CustomName = modelName })); @@ -294,8 +294,8 @@ public void SaveModelWithLessVersion_IgnoreLessOrEqualPolicy_ValueIgnore() integrationVersionContainer1Controller.Evaluate(c => c.SaveIntegrationVersionContainer1ByCustom( new IntegrationVersionContainer1CustomIntegrationSaveModelIntegrationRichDTO() { - SavingObject = new IntegrationVersionContainer1IntegrationSimpleDTO() { Id = id, IntegrationVersion = expectedIntegrationVersion - 1 }, - CustomName = Guid.NewGuid().ToString() + SavingObject = new IntegrationVersionContainer1IntegrationSimpleDTO() { Id = id, IntegrationVersion = expectedIntegrationVersion - 1 }, + CustomName = Guid.NewGuid().ToString() })); // Assert @@ -315,10 +315,10 @@ public void SaveModelWithEqualVersion_IgnoreLessOrEqualPolicy_ValueIgnored() var id = this.EvaluateWrite(context => { var obj = new IntegrationVersionContainer1() - { - Name = expectedName, - IntegrationVersion = expectedIntegrationVersion - }; + { + Name = expectedName, + IntegrationVersion = expectedIntegrationVersion + }; context.Logics.Default.Create().Save(obj); @@ -333,8 +333,8 @@ public void SaveModelWithEqualVersion_IgnoreLessOrEqualPolicy_ValueIgnored() integrationVersionContainer1Controller.Evaluate(c => c.SaveIntegrationVersionContainer1ByCustom( new IntegrationVersionContainer1CustomIntegrationSaveModelIntegrationRichDTO() { - SavingObject = new IntegrationVersionContainer1IntegrationSimpleDTO() { Id = id, IntegrationVersion = expectedIntegrationVersion + 1 }, - CustomName = modelName + SavingObject = new IntegrationVersionContainer1IntegrationSimpleDTO() { Id = id, IntegrationVersion = expectedIntegrationVersion + 1 }, + CustomName = modelName })); @@ -344,8 +344,8 @@ public void SaveModelWithEqualVersion_IgnoreLessOrEqualPolicy_ValueIgnored() integrationVersionContainer1Controller.Evaluate(c => c.SaveIntegrationVersionContainer1ByCustom( new IntegrationVersionContainer1CustomIntegrationSaveModelIntegrationRichDTO() { - SavingObject = new IntegrationVersionContainer1IntegrationSimpleDTO() { Id = id, IntegrationVersion = expectedIntegrationVersion + 1 }, - CustomName = Guid.NewGuid().ToString() + SavingObject = new IntegrationVersionContainer1IntegrationSimpleDTO() { Id = id, IntegrationVersion = expectedIntegrationVersion + 1 }, + CustomName = Guid.NewGuid().ToString() })); // Assert @@ -355,3 +355,4 @@ public void SaveModelWithEqualVersion_IgnoreLessOrEqualPolicy_ValueIgnored() Assert.Equal(expectedIntegrationVersion + 1, actual.IntegrationVersion); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/JobTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/JobTests.cs index 8517a4d4d..e05f09859 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/JobTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/JobTests.cs @@ -1,9 +1,9 @@ -using Framework.Application; +using Anch.Testing.Xunit; + +using Framework.Application; using Framework.AutomationCore.Extensions; using Framework.Database; -using Anch.Testing.Xunit; - using SampleSystem.Domain; using SampleSystem.IntegrationTests._Environment.TestData; using SampleSystem.ServiceEnvironment.Jobs; @@ -34,3 +34,4 @@ int GetJobInstanceCount() => c => c.Logics.Default.Create().GetUnsecureQueryable().Count()); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/JsonConverterTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/JsonConverterTests.cs index 112054c04..880e30024 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/JsonConverterTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/JsonConverterTests.cs @@ -59,3 +59,4 @@ public void PeriodWithNullConverted_ResultCorrected() Assert.Equal(testPeriod, restored); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/LegalEntityProjectionTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/LegalEntityProjectionTests.cs index 50e0542ea..10c41b2d3 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/LegalEntityProjectionTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/LegalEntityProjectionTests.cs @@ -41,16 +41,16 @@ public void LegalEntityProjectionNestedMappingTest() // Act var result = this.EvaluateRead(context => context.Logics.Default.Create().GetById(id, true).Pipe(customLegalEntity => new - { - customLegalEntity.Name, - customLegalEntity.Code, - customLegalEntity.NameEnglish, - BaseObjName = customLegalEntity.BaseObj.Name, - CurrentObjName = customLegalEntity.CurrentObj.Name, - PeriodStartDate = customLegalEntity.CurrentObj.PeriodStartDateXXX, - customLegalEntity.AribaStatusDescription, - customLegalEntity.AribaStatusType, - })); + { + customLegalEntity.Name, + customLegalEntity.Code, + customLegalEntity.NameEnglish, + BaseObjName = customLegalEntity.BaseObj.Name, + CurrentObjName = customLegalEntity.CurrentObj.Name, + PeriodStartDate = customLegalEntity.CurrentObj.PeriodStartDateXXX, + customLegalEntity.AribaStatusDescription, + customLegalEntity.AribaStatusType, + })); // Assert @@ -62,3 +62,4 @@ public void LegalEntityProjectionNestedMappingTest() Assert.Equal(period.StartDate, result.PeriodStartDate); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ManagmentUnitFluentMappingTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ManagmentUnitFluentMappingTests.cs index 6b27c0a05..a347533b7 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ManagmentUnitFluentMappingTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ManagmentUnitFluentMappingTests.cs @@ -21,14 +21,15 @@ public void CheckBusinessUnitSecondaryAccess_HasAccess() { var employee = c.Logics.Employee.GetById(employeeId.Id)!; var mu = new ManagementUnitFluentMapping - { - Name = "test", - Period = Period.Eternity, - MuComponent = new MuComponent - { - AuthorizedLuxoftSignatory = employee, LuxoftSignsFirst = true - } - }; + { + Name = "test", + Period = Period.Eternity, + MuComponent = new MuComponent + { + AuthorizedLuxoftSignatory = employee, + LuxoftSignsFirst = true + } + }; c.Logics.ManagementUnitFluentMapping.Save(mu); }); @@ -42,11 +43,11 @@ public void CheckBusinessUnitSecondaryAccess_HasAccess() .Where(x => x.MuComponent.AuthorizedLuxoftSignatory.Id == employeeId.Id) .Select( x => new - { - x.Id, - x.MuComponent.LuxoftSignsFirst, - EmployeeId = x.MuComponent.AuthorizedLuxoftSignatory.Id - }) + { + x.Id, + x.MuComponent.LuxoftSignsFirst, + EmployeeId = x.MuComponent.AuthorizedLuxoftSignatory.Id + }) .ToList(); }); @@ -55,3 +56,4 @@ public void CheckBusinessUnitSecondaryAccess_HasAccess() Assert.Equal(employeeId.Id, item.EmployeeId); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ManualAndLegacyProjectionSecurityTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ManualAndLegacyProjectionSecurityTests.cs index 27803d50c..f1218dd39 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ManualAndLegacyProjectionSecurityTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ManualAndLegacyProjectionSecurityTests.cs @@ -1,6 +1,6 @@ -using SampleSystem.Domain.Projections; +using SampleSystem.Domain.ManualProjections; +using SampleSystem.Domain.Projections; using SampleSystem.Generated.DTO; -using SampleSystem.Domain.ManualProjections; using SampleSystem.IntegrationTests._Environment.TestData; using SampleSystem.Security; using SampleSystem.WebApiCore.Controllers.MainQuery; @@ -90,3 +90,4 @@ public void TestLegacyEmployeeProjection_LoadedByLegacyGenericSecurity() // item.Value.Should().Contain(TestEmployeeLogin); //} } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/DialectExtensions.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/DialectExtensions.cs index b0569c948..217902788 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/DialectExtensions.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/DialectExtensions.cs @@ -16,3 +16,4 @@ public static MethodInfo GetPropetyFullTextContainsMethodInfo() return result; } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchHqlGeneratorsRegistry.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchHqlGeneratorsRegistry.cs index 84e8b081f..91fdcbec9 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchHqlGeneratorsRegistry.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchHqlGeneratorsRegistry.cs @@ -16,3 +16,4 @@ public FullTextSearchHqlGeneratorsRegistry() // ReSharper restore RedundantBaseQualifier } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchMsSql2008Dialect.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchMsSql2008Dialect.cs index a4630c84d..7e6a654f8 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchMsSql2008Dialect.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchMsSql2008Dialect.cs @@ -13,3 +13,4 @@ protected override void RegisterFunctions() this.RegisterFunction("contains", new StandardSQLFunction("contains", null)); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchMsSql2012Dialect.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchMsSql2012Dialect.cs index 4cd1bab73..86dd8b63d 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchMsSql2012Dialect.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchMsSql2012Dialect.cs @@ -12,3 +12,4 @@ protected override void RegisterFunctions() this.RegisterFunction("contains", new StandardSQLFunction("contains", null)); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchTests.cs index 1beb4b9bf..6968eabc1 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/FullTextSearchTests.cs @@ -29,3 +29,4 @@ public void FullTextContainsFunctionWorksCorrect() }); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/PropertyFullTextContainsGenerator.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/PropertyFullTextContainsGenerator.cs index 89da70991..8103396f4 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/PropertyFullTextContainsGenerator.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NH/PropertyFullTextContainsGenerator.cs @@ -28,3 +28,4 @@ public override HqlTreeNode BuildHql( return treeBuilder.BooleanMethodCall("contains", args); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NHibFetchTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NHibFetchTests.cs index b36fa4edd..66e89ceef 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NHibFetchTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NHibFetchTests.cs @@ -1,7 +1,7 @@ -using Framework.Application; -using Framework.Database; +using Anch.GenericQueryable; -using Anch.GenericQueryable; +using Framework.Application; +using Framework.Database; using SampleSystem.IntegrationTests._Environment.TestData; diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NhibArrayContainsTest.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NhibArrayContainsTest.cs index 21a62a75f..3ee23c769 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NhibArrayContainsTest.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NhibArrayContainsTest.cs @@ -40,3 +40,4 @@ public void LinqContainsOverArray_TranslatedAndExecutedCorrectly() Assert.Equal(bu.Id, buId); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NhibDateTimeTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NhibDateTimeTests.cs index 2faebbadc..536c8d393 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NhibDateTimeTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NhibDateTimeTests.cs @@ -26,3 +26,4 @@ public void CreateObject_CreatedDateOverride() Assert.InRange((reloadedObj.CreateDate! - testDate).Value.Duration(), TimeSpan.Zero, TimeSpan.FromSeconds(60)); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NotificationCountryTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NotificationCountryTests.cs index 17c03c7d3..125d26f67 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NotificationCountryTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/NotificationCountryTests.cs @@ -25,9 +25,12 @@ public void CreateAndUpdateCountry_SingleModificationExists() var bll = context.Logics.Country; var country = new Country - { - Code = Guid.NewGuid().ToString(), NameNative = Guid.NewGuid().ToString(), Culture = Guid.NewGuid().ToString(), Name = Guid.NewGuid().ToString() - }; + { + Code = Guid.NewGuid().ToString(), + NameNative = Guid.NewGuid().ToString(), + Culture = Guid.NewGuid().ToString(), + Name = Guid.NewGuid().ToString() + }; bll.Save(country); @@ -58,9 +61,12 @@ public void CreateAndRemoveCountry_ModificationNotExists() var bll = context.Logics.Country; var country = new Country - { - Code = Guid.NewGuid().ToString(), NameNative = Guid.NewGuid().ToString(), Culture = Guid.NewGuid().ToString(), Name = Guid.NewGuid().ToString() - }; + { + Code = Guid.NewGuid().ToString(), + NameNative = Guid.NewGuid().ToString(), + Culture = Guid.NewGuid().ToString(), + Name = Guid.NewGuid().ToString() + }; bll.Save(country); @@ -83,9 +89,12 @@ public void RemoveCountry_RemoveModificationExists() var bll = context.Logics.Country; var country = new Country - { - Code = Guid.NewGuid().ToString(), NameNative = Guid.NewGuid().ToString(), Culture = Guid.NewGuid().ToString(), Name = Guid.NewGuid().ToString() - }; + { + Code = Guid.NewGuid().ToString(), + NameNative = Guid.NewGuid().ToString(), + Culture = Guid.NewGuid().ToString(), + Name = Guid.NewGuid().ToString() + }; bll.Save(country); @@ -116,12 +125,12 @@ public void EmulateFailureCountryModification_RaisedException() context => { var fakeModification = new DomainObjectModification() - { - DomainType = context.Configuration.GetDomainType(typeof(Country)), - Type = ModificationType.Save, - Revision = revision, - DomainObjectId = domainObjectId - }; + { + DomainType = context.Configuration.GetDomainType(typeof(Country)), + Type = ModificationType.Save, + Revision = revision, + DomainObjectId = domainObjectId + }; context.Configuration.Logics.DomainObjectModification.Save(fakeModification); }); @@ -136,3 +145,4 @@ public void EmulateFailureCountryModification_RaisedException() Assert.Equal("Both arguments (previous and current) can't be null", argumentException.Message); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/OneToOneTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/OneToOneTests.cs index 079b4bef8..93245fce5 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/OneToOneTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/OneToOneTests.cs @@ -27,11 +27,11 @@ public void GetRequestProjection_ContainsOneToOneDetail_Initialized() bll.Save(request); return new - { - RequestId = request.Id, + { + RequestId = request.Id, - DetailId = request.OneToOneDetail.Id - }; + DetailId = request.OneToOneDetail.Id + }; }); // Act @@ -41,3 +41,4 @@ public void GetRequestProjection_ContainsOneToOneDetail_Initialized() Assert.Contains(result.Items, request => request.Id == idents.RequestId && request.OneToOneDetail.Id == idents.DetailId); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/PerfomanceTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/PerfomanceTests.cs index 185969211..aba0f3e1f 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/PerfomanceTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/PerfomanceTests.cs @@ -38,3 +38,4 @@ public void GetEmployee_ToManyFilterParameters_CheckTimeTest() Xunit.Assert.True(result); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/PrincipalTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/PrincipalTests.cs index 4ff731284..c33b2b6cd 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/PrincipalTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/PrincipalTests.cs @@ -1,10 +1,10 @@ -using Framework.Application.Events; +using Anch.SecuritySystem; + +using Framework.Application.Events; using Framework.Authorization.Domain; using Framework.Authorization.Generated.DTO; using Framework.Core; -using Anch.SecuritySystem; - using SampleSystem.IntegrationTests._Environment.TestData; using SampleSystem.WebApiCore.Controllers.Main; @@ -47,11 +47,11 @@ public void CreatePrincipal_ForceEventExist() // Act configFacade.Evaluate(c => c.ForceDomainTypeEvent(new Framework.Configuration.Generated.DTO.DomainTypeEventModelStrictDTO - { - Operation = operation.Identity, + { + Operation = operation.Identity, - DomainObjectIdents = new List { principalId } - })); + DomainObjectIdents = new List { principalId } + })); // Assert Assert.Contains(this.GetIntegrationEvents("authDALQuery"), dto => dto.Principal.Id == principalId); @@ -68,10 +68,10 @@ public void CreatePermission_ForceDependencyEventExist() var role = this.GetAuthControllerEvaluator().Evaluate(c => c.GetVisualBusinessRoleByName(SecurityRole.Administrator.Name)).Identity; var saveRequest = new AuthMainController.SavePermissionAutoRequest(new PrincipalIdentityDTO(principalId), new PermissionStrictDTO - { - Role = role, - Period = Period.Eternity - }); + { + Role = role, + Period = Period.Eternity + }); var permissionIdentity = this.GetAuthControllerEvaluator().Evaluate(c => c.SavePermission(saveRequest)); var configFacade = this.GetConfigurationControllerEvaluator(); @@ -88,14 +88,15 @@ public void CreatePermission_ForceDependencyEventExist() // Act configFacade.Evaluate(c => c.ForceDomainTypeEvent(new Framework.Configuration.Generated.DTO.DomainTypeEventModelStrictDTO - { - Operation = operation.Identity, + { + Operation = operation.Identity, - DomainObjectIdents = new List { permissionIdentity.Id } - })); + DomainObjectIdents = new List { permissionIdentity.Id } + })); // Assert Assert.Contains(this.GetIntegrationEvents("authDALQuery"), dto => dto.Permission.Id == permissionIdentity.Id); Assert.Contains(this.GetIntegrationEvents("authDALQuery"), dto => dto.Principal.Id == principalId); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/PrincipalWithInitTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/PrincipalWithInitTests.cs index 567b0d3f5..c7d620452 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/PrincipalWithInitTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/PrincipalWithInitTests.cs @@ -1,18 +1,16 @@ -using Framework.Application; +using Anch.SecuritySystem; +using Anch.SecuritySystem.Validation; + +using Framework.Application; using Framework.Authorization.Domain; +using Framework.AutomationCore.RootServiceProviderContainer; using Framework.BLL; using Framework.Core; using Framework.Database; using SampleSystem.Generated.DTO; -using SampleSystem.Security; - -using Anch.SecuritySystem; -using Anch.SecuritySystem.Validation; - -using Framework.AutomationCore.RootServiceProviderContainer; - using SampleSystem.IntegrationTests._Environment.TestData; +using SampleSystem.Security; namespace SampleSystem.IntegrationTests; @@ -48,7 +46,8 @@ protected override async ValueTask InitializeAsync(CancellationToken ct) await this.AuthManager.For(TestPrincipalName).SetRoleAsync( new SampleSystemTestPermission( SampleSystemSecurityRole.TestPerformance, - new BusinessUnitIdentityDTO(DefaultConstants.BUSINESS_UNIT_PARENT_PC_ID)) { Period = new PermissionPeriod(this.testPeriod.StartDate, this.testPeriod.EndDate) }, + new BusinessUnitIdentityDTO(DefaultConstants.BUSINESS_UNIT_PARENT_PC_ID)) + { Period = new PermissionPeriod(this.testPeriod.StartDate, this.testPeriod.EndDate) }, ct); } @@ -106,3 +105,4 @@ public void CreateDuplicatePermission_ValidationError() Assert.Contains(expectedErrorMessage, validationException.Message); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/RepositoryControllerTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/RepositoryControllerTests.cs index 0100f4490..cc431424f 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/RepositoryControllerTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/RepositoryControllerTests.cs @@ -24,3 +24,4 @@ public async Task TestLoadFromRepository_CurrentEmployeeLoaded(CancellationToken Assert.Contains(currentEmployee.Identity, result.Employees); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/RepositoryWithoutSecurityTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/RepositoryWithoutSecurityTests.cs index 85c6d2365..1c66c4ca0 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/RepositoryWithoutSecurityTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/RepositoryWithoutSecurityTests.cs @@ -35,3 +35,4 @@ public async Task GetDataFromUnsecurityRepository_TryLoadWithSecurity_DataLoadFa Assert.IsType(ex); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/RestrictionRoleTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/RestrictionRoleTests.cs index 07aa875e6..6dfeb9f8d 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/RestrictionRoleTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/RestrictionRoleTests.cs @@ -1,4 +1,7 @@ -using Framework.Application; +using Anch.SecuritySystem; +using Anch.SecuritySystem.Validation; + +using Framework.Application; using Framework.BLL; using Framework.Database; @@ -6,12 +9,9 @@ using SampleSystem.Domain.Directories; using SampleSystem.Domain.Employee; using SampleSystem.Generated.DTO; +using SampleSystem.IntegrationTests._Environment.TestData; using SampleSystem.Security; using SampleSystem.WebApiCore.Controllers.Main; -using Anch.SecuritySystem; -using Anch.SecuritySystem.Validation; - -using SampleSystem.IntegrationTests._Environment.TestData; namespace SampleSystem.IntegrationTests; @@ -180,3 +180,4 @@ public void TryCreatePermissionWithoutRequiredSecurityContext_ExceptionRaised() validationException.Message); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SecurityContextRestrictionFilterTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SecurityContextRestrictionFilterTests.cs index d802a5d8c..644ed66a2 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SecurityContextRestrictionFilterTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SecurityContextRestrictionFilterTests.cs @@ -1,15 +1,14 @@ -using Framework.Application; +using Anch.SecuritySystem; +using Anch.SecuritySystem.Validation; +using Anch.Testing.Xunit; + +using Framework.Application; using Framework.Database; using SampleSystem.Domain.BU; using SampleSystem.Generated.DTO; -using SampleSystem.Security; - -using Anch.SecuritySystem; -using Anch.SecuritySystem.Validation; -using Anch.Testing.Xunit; - using SampleSystem.IntegrationTests._Environment.TestData; +using SampleSystem.Security; namespace SampleSystem.IntegrationTests; @@ -173,3 +172,4 @@ public async Task CreateCustomRestrictionRule_SearchAccessorsForIncorrectBU_Empl Assert.DoesNotContain(this.employeeLogin, accesors); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SecurityPathTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SecurityPathTests.cs index 89e570512..4fd8004a1 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SecurityPathTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SecurityPathTests.cs @@ -1,8 +1,9 @@ -using Framework.Application; +using Anch.SecuritySystem; +using Anch.SecuritySystem.Services; + +using Framework.Application; using Framework.Database; -using Anch.SecuritySystem; -using Anch.SecuritySystem.Services; using Microsoft.Extensions.DependencyInjection; using SampleSystem.Domain.Employee; @@ -40,3 +41,4 @@ public void SecurityPathWithContext_EmployeeWithoutContextRestrictions_EmployeeS Assert.Equal(employeeIdentity, result); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SecurityRuleTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SecurityRuleTests.cs index fff9a2b97..bd13ab073 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SecurityRuleTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SecurityRuleTests.cs @@ -1,17 +1,15 @@ -using Framework.Application; +using Anch.SecuritySystem; +using Anch.SecuritySystem.AccessDenied; +using Anch.Testing.Xunit; + +using Framework.Application; using Framework.Application.Repository; using Framework.BLL; using Framework.Database; -using Anch.SecuritySystem; -using Anch.Testing.Xunit; - using Microsoft.Extensions.DependencyInjection; using SampleSystem.Domain.Employee; - -using Anch.SecuritySystem.AccessDenied; - using SampleSystem.IntegrationTests._Environment.TestData; namespace SampleSystem.IntegrationTests; @@ -79,3 +77,4 @@ public void ApplyOverrideFaultMessageRule_FaultMessageChanged() Assert.Equal(faultMessage, accessDeniedException.Message); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SequenceBllTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SequenceBllTests.cs index c3b6f92ea..f858731e4 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SequenceBllTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SequenceBllTests.cs @@ -115,3 +115,4 @@ protected override void LockSequence() } } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SqlParserTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SqlParserTests.cs index 53c224889..e0589fd45 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SqlParserTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SqlParserTests.cs @@ -105,3 +105,4 @@ public void RemoveHRDepartment_HasEmployeeWithHRDepartment_CorrectExceptionMessa Assert.Equal($"{nameof(HRDepartment)} cannot be removed because it is used in {nameof(Employee)}", removeLinkedObjectsException.Message); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SubscriptionCustomNotPersistentModelTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SubscriptionCustomNotPersistentModelTests.cs index 440efa0dc..3d12525cf 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SubscriptionCustomNotPersistentModelTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/SubscriptionCustomNotPersistentModelTests.cs @@ -16,24 +16,24 @@ public void CustomNotPersistentNotificationModel_Always_ShouldNotThrowException( var countryId = this.Evaluate(DBSessionMode.Write, context => { var country = new Country - { - Code = Guid.NewGuid().ToString(), - NameNative = Guid.NewGuid().ToString(), - Culture = Guid.NewGuid().ToString(), - Name = Guid.NewGuid().ToString() - }; + { + Code = Guid.NewGuid().ToString(), + NameNative = Guid.NewGuid().ToString(), + Culture = Guid.NewGuid().ToString(), + Name = Guid.NewGuid().ToString() + }; context.Logics.Country.Save(country); for (var i = 0; i < 5; i++) { context.Logics.Location.Save(new Location - { - Country = country, - Name = Guid.NewGuid().ToString(), - Code = i + 1, - CloseDate = 15 - }); + { + Country = country, + Name = Guid.NewGuid().ToString(), + Code = i + 1, + CloseDate = 15 + }); } return country.Id; @@ -61,3 +61,4 @@ public void CustomNotPersistentNotificationModel_Always_ShouldNotThrowException( Assert.Contains(notifications, x => x.TechnicalInformation.MessageTemplateCode == typeof(_DomainChangedByRecipients_NotPersistentCustomModel_MessageTemplate_cshtml).FullName); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/Subscriptions_Metadata/MetadataSubscriptionSystemServiceTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/Subscriptions_Metadata/MetadataSubscriptionSystemServiceTests.cs index 2b04f6dca..725109dca 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/Subscriptions_Metadata/MetadataSubscriptionSystemServiceTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/Subscriptions_Metadata/MetadataSubscriptionSystemServiceTests.cs @@ -178,3 +178,4 @@ private void LogError(List errors) } } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/TransactionFlushBeforeCommit.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/TransactionFlushBeforeCommit.cs index 40fe6c6ac..d4242bc0f 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/TransactionFlushBeforeCommit.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/TransactionFlushBeforeCommit.cs @@ -70,3 +70,4 @@ public void FewDifferentTypeObjectWithTheSameId_Should_SuccessfullySave() Assert.Equal(object2.Field1, savedExampleField1); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/TypeSerializationTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/TypeSerializationTests.cs index cd39a5176..f0fe0293e 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/TypeSerializationTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/TypeSerializationTests.cs @@ -43,3 +43,4 @@ public void GetDataContractTypesWithMissedPropertyDataMemberDeclaration_TypesNot Assert.Empty(wrongTypes); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/UniqueGroupTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/UniqueGroupTests.cs index d02da67b1..cefa226ef 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/UniqueGroupTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/UniqueGroupTests.cs @@ -23,3 +23,4 @@ public void UniqueGroup_NonUniqueEntityCreated_ErrorUsesCustomName() Assert.Equal("Role-Seniority link with same:'Role,Seniority' already exists", uniqueViolationException.Message); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/UpdateTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/UpdateTests.cs index 718d96859..16b36b324 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/UpdateTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/UpdateTests.cs @@ -18,11 +18,11 @@ public void ExampleContainer_UpdatePropertyChanged1() var example1Controller = this.GetControllerEvaluator(); var strictSource = new Example1StrictDTO - { - Field1 = Guid.NewGuid(), - Field2 = Guid.NewGuid(), - Field3 = Maybe.Return(Guid.NewGuid()) - }; + { + Field1 = Guid.NewGuid(), + Field2 = Guid.NewGuid(), + Field3 = Maybe.Return(Guid.NewGuid()) + }; var updateDTO = new Example1UpdateDTO(strictSource); @@ -44,18 +44,18 @@ public void ExampleContainer_UpdatePropertyChanged2() { // Arrange var strictSource = new Example1StrictDTO - { - Field1 = Guid.NewGuid(), - Field2 = Guid.NewGuid(), - Field3 = Maybe.Return(Guid.NewGuid()) - }; + { + Field1 = Guid.NewGuid(), + Field2 = Guid.NewGuid(), + Field3 = Maybe.Return(Guid.NewGuid()) + }; var strictTarget = new Example1StrictDTO - { - Field1 = strictSource.Field1, - Field2 = Guid.NewGuid(), - Field3 = Maybe.Return(Guid.NewGuid()) - }; + { + Field1 = strictSource.Field1, + Field2 = Guid.NewGuid(), + Field3 = Maybe.Return(Guid.NewGuid()) + }; // Act @@ -74,17 +74,17 @@ public void ExampleContainer_UpdatePropertyChanged3() var example1Controller = this.GetControllerEvaluator(); var ident = example1Controller.Evaluate(c => c.UpdateExample1(new Example1UpdateDTO(new Example1StrictDTO - { - Field1 = Guid.NewGuid(), - Field2 = Guid.NewGuid(), - Field3 = Maybe.Return(Guid.NewGuid()), - Items2 = new List + { + Field1 = Guid.NewGuid(), + Field2 = Guid.NewGuid(), + Field3 = Maybe.Return(Guid.NewGuid()), + Items2 = new List { new() { Field1 = Guid.NewGuid(), Field2 = Guid.NewGuid() }, new() { Field1 = Guid.NewGuid(), Field2 = Guid.NewGuid() }, new() { Field1 = Guid.NewGuid(), Field2 = Guid.NewGuid() } } - }))); + }))); var richObj = example1Controller.Evaluate(c => c.GetRichExample1(ident)); @@ -132,3 +132,4 @@ public void ExampleContainer_UpdatePropertyChanged3() Assert.True(createdItems[0].Value.Field2.HasValue); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ValidationTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ValidationTests.cs index 496f3a8ab..35f57f656 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ValidationTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/ValidationTests.cs @@ -91,3 +91,4 @@ public void Validate_HasInvalidVirtualPropertyMarkedWithAttribute_ShouldThrow() Assert.Equal("Employee has ValidateVirtualProp value was too overflow for a DateTime", validationException.Message); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/VirtualPermissionTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/VirtualPermissionTests.cs index 4c88ff34a..84430f0c8 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/VirtualPermissionTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/VirtualPermissionTests.cs @@ -1,7 +1,7 @@ -using Framework.Application; -using Framework.Database; +using Anch.Testing.Xunit; -using Anch.Testing.Xunit; +using Framework.Application; +using Framework.Database; using SampleSystem.Domain.BU; using SampleSystem.Domain.Enums; @@ -156,3 +156,4 @@ await this.EvaluateAsync( Assert.False(hasAccess); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/WebApi/EventXsdExporterTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/WebApi/EventXsdExporterTests.cs index 5263648e6..0dc5a5656 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/WebApi/EventXsdExporterTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/WebApi/EventXsdExporterTests.cs @@ -22,3 +22,4 @@ public class TestDto public Guid[] Type { get; set; } } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/WebApi/WebApiTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/WebApi/WebApiTests.cs index e270ed240..34d298f79 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/WebApi/WebApiTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/WebApi/WebApiTests.cs @@ -19,3 +19,4 @@ public void WebApi_CallMethod() Assert.Contains(employees, e => e.Id == employeeIdentity.Id); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/WrongSecurityMessageTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/WrongSecurityMessageTests.cs index cf92935a3..20360dd6f 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/WrongSecurityMessageTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/WrongSecurityMessageTests.cs @@ -1,16 +1,13 @@ -using Framework.Application; -using Framework.Database; - -using Anch.SecuritySystem; - -using SampleSystem.Domain.Employee; -using SampleSystem.Security; - +using Anch.SecuritySystem; using Anch.SecuritySystem.AccessDenied; +using Framework.Application; using Framework.AutomationCore.Services; +using Framework.Database; +using SampleSystem.Domain.Employee; using SampleSystem.IntegrationTests._Environment.TestData; +using SampleSystem.Security; namespace SampleSystem.IntegrationTests; @@ -49,3 +46,4 @@ private void UseSecurityRule_WithoutSecurity_ErrorMessageCorrected(SecurityRule accessDeniedException.Message); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/EmptySchemaInitializer.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/EmptySchemaInitializer.cs index 912f454fa..366eba62b 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/EmptySchemaInitializer.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/EmptySchemaInitializer.cs @@ -2,7 +2,6 @@ using Anch.Testing.Database.ConnectionStringManagement; using Framework.AutomationCore.Extensions; -using Framework.Database.NHibernate.DBGenerator; using SampleSystem.DbGenerate.NHibernate; using SampleSystem.IntegrationTests._Environment.FluentMigration; @@ -28,3 +27,4 @@ public async Task Initialize(CancellationToken cancellationToken) new BssFluentMigrator(actualTestConnectionStringSource.ActualConnectionString.Value, typeof(InitNumberInDomainObjectEventMigration).Assembly).Migrate(); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/FluentMigration/InitNumberInDomainObjectEventMigration.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/FluentMigration/InitNumberInDomainObjectEventMigration.cs index edb9c6a0a..78bcbd7dd 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/FluentMigration/InitNumberInDomainObjectEventMigration.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/FluentMigration/InitNumberInDomainObjectEventMigration.cs @@ -18,3 +18,4 @@ public override void Down() { } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/NHibTestEnvironment.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/NHibTestEnvironment.cs index 9777c7d37..d5ae3a1bc 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/NHibTestEnvironment.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/NHibTestEnvironment.cs @@ -56,3 +56,4 @@ protected override void InitializeServices(IServiceCollection services, IConfigu .AddSingleton(); } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestConnectionStringExtensions.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestConnectionStringExtensions.cs index b24b2a474..fd049e05c 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestConnectionStringExtensions.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestConnectionStringExtensions.cs @@ -15,3 +15,4 @@ public static class TestConnectionStringExtensions connectionString.Password) : null; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Employee.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Employee.cs index ef74b8607..c451d91fc 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Employee.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Employee.cs @@ -48,10 +48,10 @@ public EmployeeIdentityDTO SaveEmployee( Employee employee; nameEng = nameEng ?? new Fio - { - FirstName = TextRandomizer.RandomString("FirstName", 15), - LastName = TextRandomizer.RandomString("LastName", 15) - }; + { + FirstName = TextRandomizer.RandomString("FirstName", 15), + LastName = TextRandomizer.RandomString("LastName", 15) + }; var nameTemp = nameEng; nameTemp.MiddleName = TextRandomizer.RandomString("MiddleName", 15); @@ -104,34 +104,34 @@ public EmployeeIdentityDTO SaveEmployee( } employee = new Employee - { - Active = active, - ExternalId = externalId, - BirthDate = birthDate, - HRDepartment = context.Logics.HRDepartment.GetById(hrDepartmentId, isObjectRequired), - DismissDate = dismissDate, - Email = email, - HireDate = hireDate, - PlannedHireDate = hireDate, - Login = login, - NameEng = nameEng, - NameNative = nameNative, - NameRussian = nameRussian, - Pin = pin, - ManagementUnit = null, //context.Logics.ManagementUnit.GetById(managementUnitId, isObjectRequired), - Position = context.Logics.EmployeePosition.GetById(positionId), - RegistrationType = context.Logics.EmployeeRegistrationType.GetById(registrationId), - Role = context.Logics.EmployeeRole.GetById(roleId), - RoleDegree = context.Logics.EmployeeRoleDegree.GetById(roleDegreeId), - CellPhone = cellPhone, - Interphone = "3365", - Landlinephone = "3365", - PersonalCellPhone = personalCellPhone, - WorkPeriod = workPeriod ?? new Period(DateTime.Now.Date.AddMonths(-1), DateTime.Now.Date), - EducationDuration = educationDuration ?? new Period(DateTime.Now.Date.AddYears(-5), DateTime.Now.Date.AddYears(-2)), - NonValidateVirtualProp = nonValidateVirtualProp ?? DateTime.Now, - ValidateVirtualProp = validateVirtualProp ?? DateTime.Now, - Age = age + { + Active = active, + ExternalId = externalId, + BirthDate = birthDate, + HRDepartment = context.Logics.HRDepartment.GetById(hrDepartmentId, isObjectRequired), + DismissDate = dismissDate, + Email = email, + HireDate = hireDate, + PlannedHireDate = hireDate, + Login = login, + NameEng = nameEng, + NameNative = nameNative, + NameRussian = nameRussian, + Pin = pin, + ManagementUnit = null, //context.Logics.ManagementUnit.GetById(managementUnitId, isObjectRequired), + Position = context.Logics.EmployeePosition.GetById(positionId), + RegistrationType = context.Logics.EmployeeRegistrationType.GetById(registrationId), + Role = context.Logics.EmployeeRole.GetById(roleId), + RoleDegree = context.Logics.EmployeeRoleDegree.GetById(roleDegreeId), + CellPhone = cellPhone, + Interphone = "3365", + Landlinephone = "3365", + PersonalCellPhone = personalCellPhone, + WorkPeriod = workPeriod ?? new Period(DateTime.Now.Date.AddMonths(-1), DateTime.Now.Date), + EducationDuration = educationDuration ?? new Period(DateTime.Now.Date.AddYears(-5), DateTime.Now.Date.AddYears(-2)), + NonValidateVirtualProp = nonValidateVirtualProp ?? DateTime.Now, + ValidateVirtualProp = validateVirtualProp ?? DateTime.Now, + Age = age }; if (coreBusinessUnit != null) @@ -168,13 +168,13 @@ public EmployeePositionIdentityDTO SaveEmployeePosition( if (position == null) { position = new EmployeePosition - { - Active = active, - Name = name, - EnglishName = englishName, - ExternalId = externalId, - Location = context.Logics.Location.GetById(locationId) - }; + { + Active = active, + Name = name, + EnglishName = englishName, + ExternalId = externalId, + Location = context.Logics.Location.GetById(locationId) + }; context.Logics.EmployeePosition.Insert(position, this.GetGuid(id)); } @@ -200,11 +200,11 @@ public EmployeeRegistrationTypeIdentityDTO SaveEmployeeRegistrationType( if (type == null) { type = new EmployeeRegistrationType - { - Active = active, - Name = name, - ExternalId = externalId - }; + { + Active = active, + Name = name, + ExternalId = externalId + }; context.Logics.EmployeeRegistrationType.Insert(type, this.GetGuid(id)); } @@ -273,10 +273,10 @@ public EmployeeSpecializationIdentityDTO SaveSpecialization(Guid? id = null, str context => { var specialization = new EmployeeSpecialization - { - Id = id ?? Guid.NewGuid(), - Name = name ?? TextRandomizer.UniqueString("EmployeeSpecialization") - }; + { + Id = id ?? Guid.NewGuid(), + Name = name ?? TextRandomizer.UniqueString("EmployeeSpecialization") + }; context.Logics.EmployeeSpecialization.Insert(specialization, specialization.Id); @@ -290,12 +290,13 @@ public void SaveRoleRoleDegreeLink(EmployeeRoleIdentityDTO employeeRoleIdentity, var employeeRole = context.Logics.EmployeeRole.GetById(employeeRoleIdentity.Id, true); var employeeRoleDegree = context.Logics.EmployeeRoleDegree.GetById(employeeRoleDegreeIdentity.Id, true); var result = new RoleRoleDegreeLink - { - Id = id ?? Guid.NewGuid(), - Role = employeeRole, - RoleDegree = employeeRoleDegree - }; + { + Id = id ?? Guid.NewGuid(), + Role = employeeRole, + RoleDegree = employeeRoleDegree + }; context.Logics.RoleRoleDegreeLink.Insert(result, result.Id); }); } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Init.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Init.cs index 81bb4f95b..f33b9de48 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Init.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Init.cs @@ -14,3 +14,4 @@ private Guid GetGuid(Guid? id) public IServiceProvider RootServiceProvider { get; } = rootServiceProvider; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Smo.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Smo.cs index 0c5d11c9d..aedf60f50 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Smo.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Smo.cs @@ -1,4 +1,5 @@ using Anch.Testing; + using Framework.AutomationCore.Services; using Microsoft.Extensions.DependencyInjection; @@ -16,3 +17,4 @@ public Table GetTable(string databaseName, string tableName, string schema = "ap return database.Tables[tableName, schema]; } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Subscriptions.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Subscriptions.cs index 0c5457944..fbcad639e 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Subscriptions.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.Subscriptions.cs @@ -20,3 +20,4 @@ public List> ProcessSubscription(T? prev, T? n return subscriptionService.Process(new DomainObjectVersions(prev, next)).ToList(); }); } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.cs index 073b169f1..bc7395ffd 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/Helpers/DataManager.cs @@ -40,13 +40,13 @@ public CountryIdentityDTO SaveCountry( if (country == null) { country = new Country - { - Active = active, - Code = code, - Name = name, - NameNative = nativeName, - Culture = culture, - }; + { + Active = active, + Code = code, + Name = name, + NameNative = nativeName, + Culture = culture, + }; countryBLL.Insert(country, this.GetGuid(id)); } @@ -78,16 +78,16 @@ public LocationIdentityDTO SaveLocation( if (location == null) { location = new Location - { - Active = active, - Name = name, - IsFinancial = isFinancial, - LocationType = locationType, - Parent = context.Logics.Location.GetById(parentId), - Country = context.Logics.Country.GetById(countryId), - CloseDate = closeDate, - Code = code - }; + { + Active = active, + Name = name, + IsFinancial = isFinancial, + LocationType = locationType, + Parent = context.Logics.Location.GetById(parentId), + Country = context.Logics.Country.GetById(countryId), + CloseDate = closeDate, + Code = code + }; context.Logics.Location.Insert(location, this.GetGuid(id)); } @@ -183,10 +183,10 @@ public BusinessUnitTypeIdentityDTO SaveBusinessUnitType( possibleParentsList.AddRange( possibleParents.Select( possibleParent => new BusinessUnitTypeLinkWithPossibleParentStrictDTO - { - BusinessUnitType = type.ToIdentityDTO(), - PossibleParent = possibleParent - })); + { + BusinessUnitType = type.ToIdentityDTO(), + PossibleParent = possibleParent + })); if (!currentTypeInPossibleParents) { @@ -209,10 +209,10 @@ public BusinessUnitTypeIdentityDTO SaveBusinessUnitType( transferToList.AddRange( transferTo.Select( transfer => new BusinessUnitTypeLinkWithTransferToStrictDTO - { - BusinessUnitType = type.ToIdentityDTO(), - TransferTo = transfer - })); + { + BusinessUnitType = type.ToIdentityDTO(), + TransferTo = transfer + })); if (!currentTypeInTransferTo) { @@ -229,8 +229,8 @@ public BusinessUnitTypeIdentityDTO SaveBusinessUnitType( t => new BusinessUnitTypeLinkWithPossibleFinancialProjectTypeStrictDTO { - FinancialProjectType = t, - BusinessUnitType = buTypeStrict.Identity + FinancialProjectType = t, + BusinessUnitType = buTypeStrict.Identity }) .ToList(); } @@ -282,21 +282,21 @@ public BusinessUnitIdentityDTO SaveBusinessUnit( businessUnit = new BusinessUnit(parentIsNeeded ? context.Logics.BusinessUnit.GetById(parentId) : null) { - Active = active, - Name = name, - BusinessUnitForRent = null, - IsPool = isPool, - IsNewBusiness = isNewBusiness, - IsSpecialCommission = isSpecialCommision, - Commission = commision, - NewBusinessStatusLeft = newBusinessStatusLeft, - BusinessUnitStatus = BusinessUnitStatus.Current, - Options = BusinessUnitOptions.None, - Rank = rank, - IsProduction = isProduction, - BusinessUnitType = context.Logics.BusinessUnitType.GetById(typeId), - Period = period.Value, - AllowedForFilterRole = allowedForFilterRole + Active = active, + Name = name, + BusinessUnitForRent = null, + IsPool = isPool, + IsNewBusiness = isNewBusiness, + IsSpecialCommission = isSpecialCommision, + Commission = commision, + NewBusinessStatusLeft = newBusinessStatusLeft, + BusinessUnitStatus = BusinessUnitStatus.Current, + Options = BusinessUnitOptions.None, + Rank = rank, + IsProduction = isProduction, + BusinessUnitType = context.Logics.BusinessUnitType.GetById(typeId), + Period = period.Value, + AllowedForFilterRole = allowedForFilterRole }; context.Logics.BusinessUnit.Insert(businessUnit, this.GetGuid(id)); @@ -330,13 +330,13 @@ public ManagementUnitIdentityDTO SaveManagementUnit( if (unit == null) { unit = new ManagementUnit - { - Active = active, - Name = name, - Parent = parentIsNeeded ? context.Logics.ManagementUnit.GetById(parentId) : null, - Period = (Period)period, - IsProduction = isProduction - }; + { + Active = active, + Name = name, + Parent = parentIsNeeded ? context.Logics.ManagementUnit.GetById(parentId) : null, + Period = (Period)period, + IsProduction = isProduction + }; context.Logics.ManagementUnit.Insert(unit, this.GetGuid(id)); } @@ -390,20 +390,20 @@ public HRDepartmentIdentityDTO SaveHRDepartment( var head = context.Logics.Employee.GetById(employeeId, true); department = new HRDepartment - { - Active = active, - Name = name, - NameNative = nameNative, - Location = context.Logics.Location.GetById(locationId), - Parent = context.Logics.HRDepartment.GetById(parentId), - Head = head, - CompanyLegalEntity = context.Logics.CompanyLegalEntity.GetById(companyLegalEntityId), - Code = code, - CodeNative = codeNative, - IsLegal = isLegal, - IsProduction = isProduction, - ExternalId = externalId - }; + { + Active = active, + Name = name, + NameNative = nameNative, + Location = context.Logics.Location.GetById(locationId), + Parent = context.Logics.HRDepartment.GetById(parentId), + Head = head, + CompanyLegalEntity = context.Logics.CompanyLegalEntity.GetById(companyLegalEntityId), + Code = code, + CodeNative = codeNative, + IsLegal = isLegal, + IsProduction = isProduction, + ExternalId = externalId + }; context.Logics.HRDepartment.Insert(department, this.GetGuid(id)); } @@ -438,14 +438,14 @@ public CompanyLegalEntityIdentityDTO SaveCompanyLegalEntity( : context.Logics.CompanyLegalEntity.GetById(parent.Value.Id); legal = new CompanyLegalEntity - { - Active = active, - Name = name, - NameEnglish = nameEnglish, - Code = code, - Type = (CompanyLegalEntityType)type, - Parent = parentDomainObject - }; + { + Active = active, + Name = name, + NameEnglish = nameEnglish, + Code = code, + Type = (CompanyLegalEntityType)type, + Parent = parentDomainObject + }; context.Logics.CompanyLegalEntity.Insert(legal, this.GetGuid(id)); } @@ -478,3 +478,4 @@ public Employee SaveEmployee(string name, string? login = null) return result; } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/SampleSystemTestPermission.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/SampleSystemTestPermission.cs index 6a5750ccb..6e8ee9349 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/SampleSystemTestPermission.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/SampleSystemTestPermission.cs @@ -56,3 +56,4 @@ public EmployeeIdentityDTO? Employee set => this.SetSingle(value.MaybeNullable(v => TypedSecurityIdentity.Create(v.Id))); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/TestBase.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/TestBase.cs index ae913fe12..f7796c538 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/TestBase.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/TestBase.cs @@ -3,6 +3,7 @@ using Framework.AutomationCore; using Framework.AutomationCore.Services; + using Microsoft.Extensions.DependencyInjection; using SampleSystem.BLL; @@ -38,3 +39,4 @@ protected ControllerEvaluator GetConfigurationControllerEv ValueTask IAsyncDisposable.DisposeAsync() => ValueTask.CompletedTask; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/TestDataInitializer.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/TestDataInitializer.cs index 79f67a011..b560cd107 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/TestDataInitializer.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/TestData/TestDataInitializer.cs @@ -2,6 +2,7 @@ using Anch.SecuritySystem; using Anch.SecuritySystem.Services; using Anch.SecuritySystem.Testing; + using Framework.AutomationCore; using Microsoft.Extensions.Options; @@ -244,3 +245,4 @@ private void FillMainData() DefaultConstants.HRDEPARTMENT_PARENT_NAME); } } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/Utils/TestIntegrationEventPublisher.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/Utils/TestIntegrationEventPublisher.cs index d3ac44659..30b5efa16 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/Utils/TestIntegrationEventPublisher.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/Utils/TestIntegrationEventPublisher.cs @@ -6,3 +6,4 @@ public class TestIntegrationEventPublisher : IIntegrationEventPublisher { public Task PublishAsync(IIntegrationEvent @event, CancellationToken cancellationToken) => Task.CompletedTask; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/WebApi/IntegrationWebApi.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/WebApi/IntegrationWebApi.cs index 6f1cf7549..c75974ace 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/WebApi/IntegrationWebApi.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/WebApi/IntegrationWebApi.cs @@ -8,3 +8,4 @@ public class IntegrationWebApi(IServiceProvider serviceProvider) : IntegrationWe { protected override string IntegrationUserName { get; } = DefaultConstants.INTEGRATION_BUS; } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/WebApi/MainAuditWebApi.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/WebApi/MainAuditWebApi.cs index 3a7f8dfe6..0a676b783 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/WebApi/MainAuditWebApi.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/WebApi/MainAuditWebApi.cs @@ -11,3 +11,4 @@ public class MainAuditWebApi(IServiceProvider serviceProvider) : WebApiBase(serv public ControllerEvaluator Location => this.GetControllerEvaluator(); } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/WebApi/MainWebApi.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/WebApi/MainWebApi.cs index 5a5c7803d..5988e46bf 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/WebApi/MainWebApi.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate/_Environment/WebApi/MainWebApi.cs @@ -13,3 +13,4 @@ public class MainWebApi(IServiceProvider serviceProvider) : WebApiBase(servicePr public ControllerEvaluator Country => this.GetControllerEvaluator(); } + diff --git a/src/_SampleSystem/_Tests/SampleSystem.UnitTests/ExtractConstTests.cs b/src/_SampleSystem/_Tests/SampleSystem.UnitTests/ExtractConstTests.cs index 420f2e9ea..2f76d4770 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.UnitTests/ExtractConstTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.UnitTests/ExtractConstTests.cs @@ -27,3 +27,4 @@ public record Parameters(Period Period); public record Obj(Period Period); } + diff --git a/src/__SolutionItems/CommonAssemblyInfo.cs b/src/__SolutionItems/CommonAssemblyInfo.cs index 7f4bb4e15..5c43eea0f 100644 --- a/src/__SolutionItems/CommonAssemblyInfo.cs +++ b/src/__SolutionItems/CommonAssemblyInfo.cs @@ -4,10 +4,11 @@ [assembly: AssemblyCompany("Luxoft")] [assembly: AssemblyCopyright("Copyright © Luxoft 2009-2026")] -[assembly: AssemblyVersion("27.2.9.0")] +[assembly: AssemblyVersion("27.2.10.0")] #if DEBUG [assembly: AssemblyConfiguration("Debug")] #else [assembly: AssemblyConfiguration("Release")] #endif +