Skip to content

EtherZa/T4WebFormsInjection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

T4 WebForms Injection

T4 WebForms Injection is a T4 template for ASP.NET WebForms that creates parameterless constructors for classes that have a dependency injectable constructor, but are created via a sealed factory.

Targets subclasses of

  • System.Web.UI.MasterPage
  • System.Web.UI.Page
  • System.Web.UI.UserControl
  • System.Web.IHttpHandler
  • System.Web.IHttpModule
  • Additional base classes can be added/removed via T4WebFormsInjection.tt.settings.xml

Requirements

  • The target class must be partial
  • No parameterless constructor can already exist (a compiler error will be thrown if one already exists)
  • Every parameter in the constructor will be injected

Steps to install/configure

  • Install T4WebFormsInjection in your app using NuGet
  • Edit the configuration file
  • Run custom tool to generate the template

Credits

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published