コード例 #1
0
 public void Run(SolutionEventContext context)
 {
     context = _modelManager.Process(context);
     context = _generatorRegistry.Process(context);
     context = _pipelineEngine.Process(context);
     _fileService.Process(context);
 }
コード例 #2
0
        public SolutionEventContext Process(SolutionEventContext context)
        {
            foreach (var projection in context.Projections)
            {
                var outputFiles = projection.Output;

                foreach (var outputFile in projection.Output.OutputFiles)
                {
                    var fullPath = outputFile.OutputPath;

                    if (!Path.IsPathRooted(fullPath))
                    {
                        var root = projection.Solution.GetParameter("project-root");
                        if (!string.IsNullOrEmpty(root))
                        {
                            fullPath = Path.Combine(root, outputFile.OutputPath);
                        }
                    }

                    PerformWrite(fullPath, outputFile.Text);
                }
            }

            return(context);
        }
コード例 #3
0
 public SolutionEventContext(SolutionEventContext previous, IEnumerable <ProjectionContext> projections)
 {
     Solution    = previous.Solution ?? throw new ArgumentNullException(nameof(previous));
     Projections = projections;
 }
コード例 #4
0
 public SolutionEventContext(SolutionEventContext previous)
     : this(previous, Enumerable.Empty <ProjectionContext>())
 {
 }