public IHelixProjectTemplate Run(HelixTemplateManifest manifest, string solutionRootPath)
        {
            Manifest                    = manifest;
            ReplaceTokensService        = new ReplaceTokensService(Manifest.ReplacementTokens);
            DestinationRootPath         = solutionRootPath;
            BuildDestinationPathService = new BuildDestinationPathService(Manifest.ManifestRootPath, DestinationRootPath);
            var templateObjects = new List <ITemplateObject>();

            templateObjects.AddRange(GetTemplateObjectFromDirectory(Manifest.ManifestRootPath));
            var copyTemplateObjectsService = new CopyTemplateObjectFilesService(templateObjects);
            var copiedFilePaths            = copyTemplateObjectsService.Copy();

            if (!copiedFilePaths.Any())
            {
                return new HelixProjectTemplate
                       {
                           Manifest          = Manifest,
                           TemplateObjects   = templateObjects,
                           ReplacementTokens = Manifest.ReplacementTokens
                       }
            }
            ;

            var replaceFileTokensService = new ReplaceTokensInFilesService(copiedFilePaths, Manifest.ReplacementTokens);

            replaceFileTokensService.Replace();
            MarkIfSkipped(templateObjects);
            CreateVirtualSolutionFolders(templateObjects);
            return(new HelixProjectTemplate
            {
                Manifest = Manifest,
                TemplateObjects = templateObjects,
                ReplacementTokens = Manifest.ReplacementTokens
            });
        }
        public IHelixProjectTemplate Run(HelixTemplateManifest manifest, string solutionRootPath)
        {
            Manifest = manifest;
            WriteTraceService.WriteToTrace("Template Engine started", "\nInfo", $"Manifest: {manifest.Name}",
                                           $"root path: {solutionRootPath} ");
            ReplaceTokensService        = new ReplaceTokensService(Manifest.ReplacementTokens);
            DestinationRootPath         = solutionRootPath;
            BuildDestinationPathService = new BuildDestinationPathService(Manifest.ManifestRootPath, DestinationRootPath);
            ExpandConditions();

            var templateObjects = new List <ITemplateObject>();

            templateObjects.AddRange(GetTemplateObjectFromDirectory(Manifest.ManifestRootPath));
            var copyTemplateObjectsService = new CopyTemplateObjectFilesService(templateObjects);
            var copiedFilePaths            = copyTemplateObjectsService.Copy();

            if (!copiedFilePaths.Any())
            {
                return new HelixProjectTemplate
                       {
                           Manifest          = Manifest,
                           TemplateObjects   = templateObjects,
                           ReplacementTokens = Manifest.ReplacementTokens
                       }
            }
            ;

            var replaceFileTokensService = new ReplaceTokensInFilesService(copiedFilePaths, Manifest.ReplacementTokens);

            replaceFileTokensService.Replace();
            EvaluateSkipAttach(templateObjects);
            CreateVirtualSolutionFolders(templateObjects);

            return(new HelixProjectTemplate
            {
                Manifest = Manifest,
                TemplateObjects = templateObjects,
                ReplacementTokens = Manifest.ReplacementTokens
            });
        }