File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 55CustomT4Host host = (CustomT4Host)Host;
66OdcmModel model = host.CurrentModel;
77var writer = (CodeWriterCSharp)host.CodeWriter;
8+ bool logTemplateSrc = false;
9+
810#>
911<#=writer.WriteHeader()#>
1012
1113// **NOTE** This file was generated by a tool and any changes will be overwritten.
12-
14+ <# if (logTemplateSrc) { #>
15+ // Template Source: <#= TemplateName(host.TemplateFile) #>
16+ <# } #>
1317<#+
1418
19+ /// <summary>
20+ /// Get the name of the current template being processed
21+ /// </summary>
22+ /// <param name="templateFile">The full path of the current template</param>
23+ /// <returns>The template name, relative to the Templates directory.</returns>
24+ public string TemplateName(string templateFile) {
25+ return templateFile.Substring(templateFile.LastIndexOf("Templates"));
26+ }
27+
1528// -------------------------------------------------------------
1629// Methods to retrieve name strings from various Odcm types
1730// -------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments