Console application that automatically generates factory implementations for classes marked with [GenerateFactory] attribute, by using Roslyn C# Compiler-as-a-Service. New files named <TargetClass>Factory.Generated.cs are added to the project.
Can be used in a build server environment.
T4 Factories uses T4toolbox to automatically generate the source code for factory implementations and even contracts (if they don't exist already), based on a concrete class and a base interface.
It allows easier use of the factory pattern for easier unit testing and refactoring.