T4WebFormsInjection 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package T4WebFormsInjection --version 0.1.0                
NuGet\Install-Package T4WebFormsInjection -Version 0.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="T4WebFormsInjection" Version="0.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add T4WebFormsInjection --version 0.1.0                
#r "nuget: T4WebFormsInjection, 0.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install T4WebFormsInjection as a Cake Addin
#addin nuget:?package=T4WebFormsInjection&version=0.1.0

// Install T4WebFormsInjection as a Cake Tool
#tool nuget:?package=T4WebFormsInjection&version=0.1.0                

T4 WebForms Injection generates default parameterless constructors for asp.net pages, user controls, handlers and modules. It is DI container independant with the only requirement being that a container (or method to it) is accesible statically.

While not a true dependency injection framework, it does have the added benefit of not having any additional overhead of replacing the asp.net factories and by its nature will work without exception.

The package consists of a T4 template that will scan the current project for configurable class descendants with a parameterised constructor and then generate a default constructor which will call the parameterised constructor with instantiated objects created by the designated DI framework.

Example:
In Default.aspx.cs:
public partial class _Default : Page
{
public _Default(ISomething something)
{
...
}
}

In T4 generated template:
public partial class _Default
{
public _Default()
: this(ObjectFactory.GetInstance<IDoSomething>())
{
...
}
}

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on T4WebFormsInjection:

Package Downloads
Bnsights.Coreib

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0 7,705 5/2/2018
2.0.1 4,632 10/11/2016
1.5.0 1,481 8/27/2015
1.4.0 1,077 8/17/2015
1.3.0 1,068 8/16/2015
1.2.0 1,213 4/17/2015
1.1.0 1,169 4/11/2015
0.1.0 1,377 3/18/2015