Exemplo n.º 1
0
		protected TextTemplatingHost CreateTextTemplatingHost(IProject project)
		{
			var appDomainFactory = new TextTemplatingAppDomainFactory();
			string applicationBase = GetAssemblyBaseLocation();
			var assemblyResolver = new TextTemplatingAssemblyResolver(project);
			var host = new TextTemplatingHost(appDomainFactory, assemblyResolver, applicationBase);
			return host;
		}
        protected virtual ITextTemplatingFileGenerator CreateTextTemplatingFileGenerator(
            FileProjectItem templateFile,
            CustomToolContext context)
        {
            TextTemplatingHost host             = CreateTextTemplatingHost(context.Project);
            var textTemplatingCustomToolContext = new TextTemplatingCustomToolContext(context);

            return(new TextTemplatingFileGenerator(host, templateFile, textTemplatingCustomToolContext));
        }