protected void CopyTemplatesToExtensionsFolder(TemplateLocalInfo template)
        {
            if (template == null)
            {
                throw new ArgumentNullException("template");
            }

            var outputPath = Path.Combine(OutputPath, template.Source.Name);

            if (Directory.Exists(outputPath))
            {
                new DirectoryHelper().DirectoryCopy(System.IO.Path.Combine(OutputPath, template.Source.Name), SideWaffleInstallDir, true, true);
            }
            else
            {
                throw new ApplicationException(string.Format(@"Template output not found in [{0}]", outputPath));
            }
        }
        protected void BuildTemplate(TemplateLocalInfo template)
        {
            if (template == null)
            {
                throw new ArgumentNullException("template");
            }

            var builder = new TemplateFolderBuilder(
                TemplateBuilderBinPath,
                template.TemplateSourceRoot,
                template.TemplateReferenceSourceRoot,
                template.ProjectTemplateSourceRoot,
                template.ItemTemplateSourceRoot,
                Path.Combine(this.BaseIntermediateOutputPath, template.Source.Name) + @"\",
                Path.Combine(this.OutputPath, template.Source.Name) + @"\");

            var result = builder.BuildTemplates();

            if (!result)
            {
                System.Diagnostics.Trace.TraceError("Unable to build templates from source [{0}]. Unknown error", template.TemplateSourceRoot);
            }
        }
Exemplo n.º 3
0
        protected void CopyTemplatesToExtensionsFolder(TemplateLocalInfo template) {
            if (template == null) { throw new ArgumentNullException("template"); }

            var outputPath = Path.Combine(OutputPath, template.Source.Name);
            if (Directory.Exists(outputPath)) {
                new DirectoryHelper().DirectoryCopy(System.IO.Path.Combine(OutputPath, template.Source.Name), SideWaffleInstallDir, true, true);
            }
            else {
                throw new ApplicationException(string.Format(@"Template output not found in [{0}]", outputPath));
            }
        }
Exemplo n.º 4
0
        protected void BuildTemplate(TemplateLocalInfo template) {
            if (template == null) { throw new ArgumentNullException("template"); }

            var builder = new TemplateFolderBuilder(
                TemplateBuilderBinPath,
                template.TemplateSourceRoot,
                template.TemplateReferenceSourceRoot,
                template.ProjectTemplateSourceRoot,
                template.ItemTemplateSourceRoot,
                Path.Combine(this.BaseIntermediateOutputPath, template.Source.Name) + @"\",
                Path.Combine(this.OutputPath, template.Source.Name) + @"\");

            var result = builder.BuildTemplates();
            if (!result) {
                System.Diagnostics.Trace.TraceError("Unable to build templates from source [{0}]. Unknown error", template.TemplateSourceRoot);
            }
        }