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.
0.6.0 - 2020-04-08
- Update dependency:
CodeGeneration.Roslyn
v0.7.63; this drops the requirement fordotnet-codegen
DotNetCliToolReference
- now you only needPackageReference
toAmadevus.RecordGenerator
(#127)!
0.5.0 - 2020-03-30
- Parameters of generated record methods use camel-casing, as opposed to Pascal-casing previously, to align with naming conventions in .NET.
- The name of the parameter to
With*
methods now always readsvalue
as opposed to being named after the property verbatim. RecordAttribute
is now inAmadevus.RecordGenerator
namespace (previously in global/no namespace)- Analyzer for requiring Records to be partial, and a CodeFix to do so now works on structs
Equality operations are generated by defaultreverted for preview.3.
struct
definitions now supportedObject.ToString
override for records that follows the same implementation as C# generates for anonymous typesGeneratedCodeAttribute
is added to generated non-type members (methods, properties)Features
flags enum in Attributes package for requesting specific feature set generationRecordAttribute(Features)
constructor for customizing feature set generation per class- Equality feature behind
Features.Equality
flag.object.Equals(object)
,object.GetHashCode()
overridesIEquatable<TRecord>
,operator ==/!=
implementations
- Analyzer warning on Equality-enabled Record classes that are not sealed,
providing CodeFix that adds
sealed
modifier. - Analyzer erroring on Record entry names that differ only by case (this could cause collisions when changing name casings, e.g. for constructor parameter names)
0.4.1 - 2019-03-22
- Fixed handling of get-only expression body properties (e.g.
int Count { get => 0; }
) #52.
0.4.0 - 2018-12-05
Amadeuvs.RecordGenerator
package: Remove DevelopmentDependency flag, drop target framework. Essentially an aggregate of dependency packages for simple installation.- Updated reference of CodeGeneration.Roslyn to v0.4.88.
- Skipping generation for 0-entries records #27.
- Fixed: Deconstructor not compiling when parameter name would be a keyword #32.
Validate
called before field assignments and pass values by ref #50.
0.3.4 - 2018-05-19
###Changed
- Fixed a bug with generic property types #32.
0.3.3 - 2018-05-18
- Updated reference of CodeGeneration.Roslyn to v0.4.49.
0.3.2 - 2018-05-14
- Fixed the meta-package to actually depend on correct CodeGeneration.Roslyn version (0.4.42).
0.3.1 - 2018-05-14
- Updated reference of CodeGeneration.Roslyn to v0.4.42.
- Targeting
netstandard1.6
(was 1.5).
0.3.0 - 2018-01-18
- Moved generation to build-time using AArnott's CodeGeneration.Roslyn package, requires more installation steps but creates backing code automatically during build which is definitely an improvement. Also decomposed project into Generators, Analyzers and Attributes subpackages.
0.2.1 - 2017-10-22
- Bugfix. Doesn't raise false RG0003 'requires regeneration' errors for Records nested in Records. Also now diff is attached to that error message.
0.2.0 - 2017-09-19
- Bugfixes. Now ignores static properties and doesn't include interfaces/base classes in partial declaration.
0.1.1 - 2017-04-14
- Fixed layout to match analyzer requirements.
0.1.0 - 2017-04-12
- Initial release with support for constructor and With-mutators.