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.

Install-Package DeveloperInTheFlow.FactoryGenerator -Version
dotnet add package DeveloperInTheFlow.FactoryGenerator --version
<PackageReference Include="DeveloperInTheFlow.FactoryGenerator" Version="">
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DeveloperInTheFlow.FactoryGenerator --version
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DeveloperInTheFlow.FactoryGenerator,"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

Release Notes

- Add possibility to specify a C# script for transforming the model before the template rendering.
- Add possibility to specify a template for factory generation.
- Fix incorrect factory method generation for classes containing multiple constructors.


This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on DeveloperInTheFlow.FactoryGenerator:

Repository Stars
.NET library for easier testing of system APIs.

Version History

Version Downloads Last updated 712 1/16/2017 3,019 7/6/2015
2.0.0 599 7/6/2015 619 6/17/2015 602 6/17/2015 599 6/10/2015 956 9/29/2014 664 9/29/2014 673 9/29/2014 675 9/2/2014 664 9/1/2014 629 9/1/2014 680 7/14/2014 660 6/23/2014 647 6/17/2014 877 6/17/2014 909 6/17/2014