2013年6月13日 星期四

T4 Template Directives (Assembly, Import, Include)

Three other different Directives can be used in T4 Template

1. Assembly

2. Import

3. Include

 

1. Assembly

image_thumb[20]

image_thumb[25]

Error if no Assembly directive

image_thumb[24]

 

2. Import

image_thumb[26]

image_thumb[30]

image_thumb[28]

 

3. Include

image_thumb[33]

incl1.tt

image_thumb[38]

incl2.tt

image_thumb[34]

Main.tt

image_thumb[36]

Output Result

image_thumb[37]

Add code in incl1.tt

image_thumb[39]

Output Result

image_thumb[40]

沒有留言:

張貼留言