public ActionRequestInfo( HttpContext httpContext, IImplementationsContainer implementationsContainer, string entityTypeName, ActionTypeEnum actionType, string actionName = null) { ActionType = actionType; ActionName = actionName; EntityTypeName = entityTypeName; AppTypeId = implementationsContainer.InstanceInfo.AppTypeId; AppInstanceId = implementationsContainer.InstanceInfo.AppInstanceId; if (!httpContext.User.Identity.IsAuthenticated) { Roles = _anonymousRoles; return; } if (!Guid.TryParse(httpContext.User.Claims.FirstOrDefault(x => x.Type == "sub")?.Value, out var userId)) { Roles = _anonymousRoles; return; } UserId = userId; Roles = httpContext.User.Claims.Where(x => x.Type == "role").Select(x => x.Value).ToArray(); }
public EfCoreEntityHandler( IImplementationsContainer implementationsContainer, EfCoreEntityHandlerInternal handlerInternal) { _implementationsContainer = implementationsContainer; _handlerInternal = handlerInternal; }
public EfCoreEntityHandler( IImplementationsContainer implementationsContainer, IDataLogImplementation dataLogImplementation, EfCoreEntityHandlerInternal handlerInternal) { _dataLogImplementation = dataLogImplementation; _implementationsContainer = implementationsContainer; _handlerInternal = handlerInternal; }
public ManageMetadataController( MetadataDbContext dbContext, IImplementationsContainer implementations, IPermissionService permissionService) { _dbContext = dbContext; _implementations = implementations; _permissionService = permissionService; }
public EfCoreEntityHandlerInternal( IImplementationsContainer implementationsContainer, IEntityValidator validator, EntityHelper entityHelper) { _implementationsContainer = implementationsContainer; _validator = validator; _entityHelper = entityHelper; }
public EntityController( IEntityHandler entityHandler, IImplementationsContainer implementationsContainer, IPermissionService permissionService) { _entityHandler = entityHandler; _implementationsContainer = implementationsContainer; _permissionService = permissionService; }
public RequestLogger( IImplementationsContainer implementationsContainer, IHttpContextAccessor httpContextAccessor, ILogger <RequestLogger> logger, IGlobalConfiguration globalConfiguration) { _implementationsContainer = implementationsContainer; _dbContext = _implementationsContainer.GetLobDbContext <LobToolsDbContext>(httpContextAccessor.HttpContext); _logger = logger; _globalConfiguration = globalConfiguration; }
public EntityController( IEntityHandler entityHandler, IImplementationsContainer implementationsContainer, IPermissionService permissionService, IObjectGraphHandler objectGraphHandler) { _entityHandler = entityHandler; _implementationsContainer = implementationsContainer; _permissionService = permissionService; _objectGraphHandler = objectGraphHandler; }
public ReportController( IImplementationsContainer implementationsContainer, IUsersService usersService, IRichTextDocumentHandler richTextDocumentHandler, IEntityHandler entityHandler, MetadataDbContext metadataDbContext) { _implementationsContainer = implementationsContainer; _usersService = usersService; _richTextDocumentHandler = richTextDocumentHandler; _entityHandler = entityHandler; _metadataDbContext = metadataDbContext; }
public static TLobDbContext GetLobDbContext <TLobDbContext>(this IImplementationsContainer implementationsContainer, HttpContext httpContext) where TLobDbContext : DbContext { if (implementationsContainer == null) { return(httpContext.RequestServices.GetRequiredService <TLobDbContext>()); } var dbContext = implementationsContainer?.GetLobToolsRepository(); if (dbContext != null && dbContext is TLobDbContext lobDbContext) { return(lobDbContext); } return(httpContext.RequestServices.GetRequiredService <TLobDbContext>()); }
public ReleaseMetadataController( IWebHostEnvironment hostingEnvironment, MetadataDbContext dbContext, IBusinessAssemblyGenerator assemblyGenerator, IImplementationsContainer implementationContainer, IOptions <GlobalConfiguration> globalConfiguration, IPermissionService permissionService ) { _hostingEnvironment = hostingEnvironment; _dbContext = dbContext; _assemblyGenerator = assemblyGenerator; _implementationContainer = implementationContainer; _globalConfiguration = globalConfiguration.Value; _permissionService = permissionService; }
public EfCoreEntityValidator(IImplementationsContainer implementationsContainer) { _implementationsContainer = implementationsContainer; }
public HeavyOrmObjectGraphHandler(IImplementationsContainer implementations, IEntityHandler entityHandler) { _implementations = implementations; _entityHandler = entityHandler; }
public EntityHelper(IImplementationsContainer implementationsContainer) { _implementationsContainer = implementationsContainer; }
public CommentController(IImplementationsContainer implementationsContainer, IUsersService usersService) { _implementationsContainer = implementationsContainer; _usersService = usersService; }
public static async Task <string> AddEntityTypeValidation(EntityTypeModel model, MetadataDbContext dbContext, IImplementationsContainer implementationsContainer) { if (await dbContext.EntityTypes.AnyAsync(x => x.Name == model.Name && x.AppTypeId == implementationsContainer.InstanceInfo.AppTypeId)) { return($"Another entity with name: \"{ model.Name }\" is already defiend."); } return(await Task.FromResult(string.Empty)); }
public MetadataController(IImplementationsContainer implementationsContainer, IPermissionService permissionService) { _implementationsContainer = implementationsContainer; _permissionService = permissionService; }