CodeSmith OutPut file
1 <%@ CodeTemplate Language="C#" TargetLanguage="C#" Inherits="OutputFileCodeTemplate" Description="Build custom access code." %>
2 <%@ Assembly Name="CodeSmith.BaseTemplates" %>
3 <%@ Import Namespace="CodeSmith.BaseTemplates" %>
4 <%@ Assembly Name="CodeSmith.CustomProperties" %>
5 <%@ Import Namespace="CodeSmith.CustomProperties" %>
6
7
8 zhh
9
10 <script runat="template">
11 [FileDialog(FileDialogType.Save, Title="Select Output File", Filter="C# Files (*.cs)|*.cs", DefaultExtension=".cs")]
12 public override string OutputFile
13 {
14 get {return base.OutputFile;}
15 set {base.OutputFile = value;}
16 }
17 </script>
2 <%@ Assembly Name="CodeSmith.BaseTemplates" %>
3 <%@ Import Namespace="CodeSmith.BaseTemplates" %>
4 <%@ Assembly Name="CodeSmith.CustomProperties" %>
5 <%@ Import Namespace="CodeSmith.CustomProperties" %>
6
7
8 zhh
9
10 <script runat="template">
11 [FileDialog(FileDialogType.Save, Title="Select Output File", Filter="C# Files (*.cs)|*.cs", DefaultExtension=".cs")]
12 public override string OutputFile
13 {
14 get {return base.OutputFile;}
15 set {base.OutputFile = value;}
16 }
17 </script>
OutputFileCodeTemplate -- in "CodeSmith.BaseTemplates" Assembly
FileDialog -- in "CodeSmith.CustomProperties" Assembly