/// <inheritdoc />
        public void Execute(IDatabaseConfig config, IModelSetup setup, string setupData)
        {
            var unitOfWorkFactory = new UnitOfWorkFactory <TContext>(_dbContextManager);

            using (var uow = unitOfWorkFactory.Create(config))
                setup.Execute(uow, setupData);
        }
        private SetupModel ConvertSetup(IModelSetup setup)
        {
            var model = new SetupModel
            {
                Fullname           = setup.GetType().FullName,
                SortOrder          = setup.SortOrder,
                Name               = setup.Name,
                Description        = setup.Description,
                SupportedFileRegex = setup.SupportedFileRegex
            };

            return(model);
        }
Exemplo n.º 3
0
 /// <inheritdoc />
 public void Execute(IDatabaseConfig config, IModelSetup setup, string setupData)
 {
     throw new NotSupportedException("Not supported by " + nameof(NullModelConfigurator));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CompilationsSetup"/> class.
 /// </summary>
 /// <param name="modelSetup">The model setup.</param>
 /// <param name="writerSetups">The target setups.</param>
 /// <param name="generatorSetups">The generator setups.</param>
 /// <param name="compilationPaths">The compilation paths.</param>
 public CompilationsSetup(IModelSetup modelSetup, IReadOnlyList <IWriterSetup> writerSetups, IReadOnlyList <IGeneratorSetup> generatorSetups, IReadOnlyList <string> compilationPaths)
     : base(modelSetup, writerSetups, generatorSetups)
 {
     this.CompilationPaths = compilationPaths;
 }