Ejemplo n.º 1
0
        private void ExecuteTemplateContainerPartial(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = PathOutput.PathOutputContainerPartial(configContext);

            if (File.Exists(pathOutput) || tableInfo.CodeCustomImplemented)
            {
                return;
            }

            var pathTemplateClass = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, this._defineTemplateFolder.Define(tableInfo), "container.partial");

            if (!File.Exists(pathTemplateClass))
            {
                return;
            }

            var textTemplateClass = Read.AllText(tableInfo, pathTemplateClass, this._defineTemplateFolder);

            var classBuilder = GenericTagsTransformer(tableInfo, configContext, textTemplateClass);

            using (var stream = new StreamWriter(pathOutput))
            {
                stream.Write(classBuilder);
            }
        }