0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
<#@ output extension=".cs" #>
<#@ assembly name="System.Xml" #>
<#
System.Xml.XmlDocument configurationData = ...;
#>
namespace Fabrikam.<#= configurationData.SelectSingleNode("jobName").Value #>
{
...
}
T4
Design time templates define part of the source code and other resources of your application. Typically you use several templates that read the data in a single input file or database, and generate some of your .cs, .vb, or other source files. Each template generates one file. They are executed within Visual Studio or MSBuild.
https://docs.microsoft.com/en-us/visualstudio/modeling/code-generation-and-t4-text-templates?view=vs-2019
Запостил:
MAKAKA,
11 Июля 2020
Комментарии (6) RSS
Добавить комментарий