Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update code generation using T4 template
Signed-off-by: sword <caoxiangkun@gmail.com>
- Loading branch information
Showing
14 changed files
with
3,105 additions
and
57 deletions.
There are no files selected for viewing
437 changes: 437 additions & 0 deletions
437
src/Coevery.Web/Modules/Coevery.CodeGeneration/CodeGenerationTemplates/Controller.cs
Large diffs are not rendered by default.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
src/Coevery.Web/Modules/Coevery.CodeGeneration/CodeGenerationTemplates/Controller.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<#@ template debug="false" language="C#" #> | ||
<#@ output extension=".txt" #> | ||
<#@ parameter type="System.String" name="ModuleName" #> | ||
<#@ parameter type="System.String" name="ControllerName" #> | ||
using System.Web.Mvc; | ||
using Coevery.Localization; | ||
using Coevery; | ||
|
||
namespace <#=ModuleName#>.Controllers { | ||
public class <#=ControllerName#> : Controller { | ||
public ICoeveryServices Services { get; set; } | ||
|
||
public <#=ControllerName#>(ICoeveryServices services) { | ||
Services = services; | ||
T = NullLocalizer.Instance; | ||
} | ||
|
||
public Localizer T { get; set; } | ||
} | ||
} |
Oops, something went wrong.