Skip to content
Richard Pringle edited this page Oct 11, 2016 · 6 revisions

Settings are configured in the T4WebFormsInjection.tt.settings.xml file.

Container constructor format

The value is a format to be applied to each of the constructors parameters. There is only one place holder and it will be replaced with the full name of the type to be injected.

Example
<ContainerConstructorFormat>ObjectFactory.GetInstance&lt;{0}&gt;()</ContainerConstructorFormat>

Container release format

The value is a format to be applied to release each of the parameters once the target object has been finalized. Object disposal is the responsibility of the container.

Example
<ContainerReleaseFormat>ObjectFactory.Release({0})</ContainerReleaseFormat>

IncludedTypes

Types to include in the filter when generating parameterless constructors.

Example
<IncludedTypes>
  <Type>System.Web.UI.MasterPage</Type>
  <Type>System.Web.UI.Page</Type>
  <Type>System.Web.UI.UserControl</Type>
  <Type>System.Web.IHttpHandler</Type>
  <Type>System.Web.IHttpModule</Type>
</IncludedTypes>

Split into multiple files

Split the generated template into multiple files - one per namespace.

Example
<SplitIntoMultipleFiles>True</SplitIntoMultipleFiles>

Include documentation

Generate StyleCop compliant documentation for the new parameterless constructors.

Example
<IncludeDocumentation>True</IncludeDocumentation>

Output registration list

Generate class T4WebFormsInjection with property RegisteredTypes in the project's default namespace. The property returns an enumeration of all types that will be injected by T4WebFormsInjection. The type registration can then be confirmed against the IOC framework.

Example
<OutputRegistrationList>True</OutputRegistrationList>