All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
5.6.0 - 2024-09-22
- Add support for required and init properties
5.5.0 - 2024-06-26
- Add new argument to
AutoConstructorAttribute
(matchBaseParameterOnName
) that controls whether constructor parameters from base class are matched on type and name or only name
- Generated code now include full qualifier for types
- #123: Bug: base and child class with the same parameter name
5.4.1 - 2024-06-22
- Code fixes are now in there own assembly
- Fix generated constructor when parent and child have same parameters but in different order
- Fix generated constructor when base and child classes have same parameter name with different types
- #122: Split code fixes into a separate package to fix RS1038 (by k94ll13nn3)
5.4.0 - 2024-05-23
- Add option to generate a parameterless constructor (by @DomasM)
- #119: Parameterless constructor for serialization use when using nested types
5.3.0 - 2024-03-16
- Add XML documentation to generated attributes
- Replace
AutoConstructor_DisableNullChecking
withAutoConstructor_GenerateArgumentNullException
- Add option to configure
base
calls behavior - Add option to configure
this
calls behavior
- #109: Replace AutoConstructor_DisableNullChecking with AutoConstructor_GenerateArgumentNullException
- #108: XML doc tags
- #107: Better control of Base / this constructors
- #111: Fix warnings and update CI actions (by k94ll13nn3)
- #110: Add configurations for preferences on
this
andbase
calls (by k94ll13nn3)
5.2.1 - 2024-03-04
- Fix detection of base constructor if parent class defined in another assembly and is using
AutoConstructor
- #106: Upgrading from version 4.1.1 to 5.2.0 broke AutoConstructor on subtypes
5.2.0 - 2023-12-19
- Add a diagnostic suppression on
CS0436
(diagnostic reported when usingInternalsVisibleTo
)
- #93: Use across assemblies that use
[assembly: InternalsVisibleTo(...)]
produces warnings
5.1.0 - 2023-11-23
- Add support for struct types and different type kind nesting (by @Sergio0694)
- #89: Add support for struct types and different type kind nesting (by Sergio0694)
5.0.1 - 2023-11-22
- Fix call to static initializer method
- Fix generation when a reserved keyword is used (directly or indirectly)
- Fix edge cases on MismatchTypesRule diagnostic
5.0.0 - 2023-11-07
- Add new argument to
AutoConstructorAttribute
for specifying constructor accessibility - Add
AutoConstructorInitializer
used to add a call to a method at the end of the constructor
- [Breaking] Update Roslyn dependencies. Visual Studio 17.6+ and .NET SDK 7.0.302+ are now required
- Rework code generation
- Fix incrementability of generator
- #82: The source generator is completely non incremental
- #21: Allow injection of method call inside the constructor
- #88: Rework code generation with indented writer (by k94ll13nn3)
- #83: Update generator to really be incremental (by k94ll13nn3)
- #54: Add support for constructor access modifier (by k94ll13nn3)
- #27: Allow injection of method call inside the constructor (by k94ll13nn3)
4.1.1 - 2023-07-18
- Fix wrong call to
this
when a static constructor is found
- #71: Erroneous call to default ctor generated if the type declares a static constructor
- #72: Fix call to this with static constructor (by k94ll13nn3)
4.1.0 - 2023-07-08
- Add call to parameterless constructor if one is defined
- #70: Call default/empty constructor if exists
4.0.3 - 2023-04-24
- Fix calls to base constructor if the class also has a static constructor
- Fix handling of AutoConstructor_DisableNullChecking when no value is provided
- #60: Fails to call base constructor if base has static constructor
4.0.2 - 2023-04-19
- Fix possible ArgumentException
4.0.1 - 2023-03-29
- Fix nullable context not generated when using base class
- #58: #nullable enable line not generated if only fields in base type are nullable
4.0.0 - 2023-03-27
- [Breaking] Non get-only properties are now injected when using
AutoConstructorInject
(by @DomasM) - Null checks are generated even in nullable context when enabled (by @DomasM)
- #56: Check for nulls even in nullable enabled context (by DomasM)
- #55: Allow explicit include of non-readonly properties in ctor (by DomasM)
3.2.5 - 2022-10-15
- Fix computation of nullability when using nullable types as generic parameters
3.2.4 - 2022-10-07
- Fix hintname for generic classes
3.2.3 - 2022-06-28
- Fix stack overflow in ACONS02 check
3.2.2 - 2022-06-27
- Fix ACONS02 false positive on classes with fields in parent
3.2.1 - 2022-06-11
- Fix generation of constructor for classes with parent class that is also generated
3.2.0 - 2022-05-20
- Add support for automatic constructor on classes with a parent class
- #20: Add support for automatic constructor on classes with a parent class
- #31: Add initial support for generating constructor based on parent class (by k94ll13nn3)
3.1.1 - 2022-05-14
- Add support for generating constructor for generic classes
- #29: Support generic classes
- #30: Fix generation of constructor for generic classes (by k94ll13nn3)
3.0.0 - 2022-04-01
- [Breaking] Get-only properties are now injected by default
- [Breaking] Null checks are disabled by default
- Reworked code generation
- Update attributes header
- Fix generation for partial classes with multiple parts
- Fix generation of ArgumentNullException in nullable context
- #18: Rework code generation with Roslyn API (by k94ll13nn3)
2.3.0 - 2022-01-27
- Add support for
AutoConstructorInject
on property backing field
2.2.0 - 2022-01-22
- Add support for nested classes
- #13: Support Nested Classes
2.1.0 - 2022-01-21
- Add support for generating constructor comment
2.0.2 - 2021-11-11
- [Breaking] Move to incremental generator. Visual Studio 17.0+ and .NET SDK 6.0.100+ are now required
- #9: Move to incremental generator (by k94ll13nn3)
1.3.0 - 2021-09-21
- Add support for generating nullable code when needed
- Change parameters of
AutoConstructorInjectAttribute
to be optional - Change ACONS05 to be reported on each attribute
- Fix usage of attributes with aliases
- Fix ACONS01 detection
1.2.1 - 2021-08-28
- Fix ACONS06 to be reported on the concerned file
1.2.0 - 2021-08-28
- Add ACONS06 diagnostic
- Fix existing diagnostics doc
1.1.0 - 2021-08-26
- Add
AutoConstructor_DisableNullChecking
configuration
1.0.2 - 2021-08-02
- Fix generated attributes visibility
1.0.1 - 2021-07-24
- Fix PackageReference generation as analyzer
Initial release