예제 #1
0
        public async Task GenerateCode(DependencyGeneratorModel model)
        {
            DependencyInstaller dependencyInstaller = null;

            if (model.AddStaticFiles)
            {
                dependencyInstaller = ActivatorUtilities.CreateInstance<StaticFilesDependencyInstaller>(_serviceProvider);
            }

            if (model.AddMvcLayout)
            {
                dependencyInstaller = ActivatorUtilities.CreateInstance<MvcLayoutDependencyInstaller>(_serviceProvider);
            }

            await dependencyInstaller.Execute();
            await dependencyInstaller.InstallDependencies();
        }
예제 #2
0
        public async Task GenerateCode(DependencyGeneratorModel model)
        {
            DependencyInstaller dependencyInstaller = null;

            if (model.AddStaticFiles)
            {
                dependencyInstaller = ActivatorUtilities.CreateInstance <StaticFilesDependencyInstaller>(_serviceProvider);
            }

            if (model.AddMvcLayout)
            {
                dependencyInstaller = ActivatorUtilities.CreateInstance <MvcLayoutDependencyInstaller>(_serviceProvider);
            }

            await dependencyInstaller.Execute();

            await dependencyInstaller.InstallDependencies();
        }