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.
- New access modifier -
AccessModifier.PrivateProtected-private protected - Support for setting the access modifier of a property' getter and setter individually via the
PropertyBuilder.WithAccessModifier(AccessModifier getterAccessModifier, AccessModifier setterAccessModifier)overloaded method - Support for defining type parameters when building classes, structs, interfaces, fields and parameters
- More validation added to fluent
With...()andCode.Create...()methods that acceptstringparameters; empty or whitespace strings will now result in anArgumentException
Code.cs, the entry point for creating a structure, has been modified to use the fluent APIs of each structure instead of using overridden constructors; this reduces duplicated validation code- The Roslyn packages were updated which results in a slightly different formatting in some places
constructor() : base()instead ofconstructor(): base()Property { get; set; }andProperty { get => _value; set => _value = value; }instead of the old multi-line version
- Removed the invalid access modifier
AccessModifier.PrivateInternal-private internal
- Introspection API via the new .HasMember() method, available on applicable structure builders
- More null arguments sanitizing in public methods and consecutively more
ArgumentNullExceptionandArgumentException, which are documented in the respective methods - Using Roslyn APIs to generate the source code via an actual AST, rather than string templates hydration
- [breaking]
.ToSourceCode(bool)has been changed to.ToSourceCode(); all generated code is now formatted by default - Refactored the internal structures from
classtoreadonly struct - Made better use of optionals and replaced some nullables
- Enums no longer have a trailing comma
- Fixes the issue described in PR#13 - source code template strings were breaking when hydration keywords were used by consumer code
- Automated GitHub releases from the release action
- Support for enums generation
- Support for various enum members - with implicit and/or explicit values, flags
- Support for structs generation
- Support for generating XML summary documentation (Zaid Ajaj)
- for interfaces, classes, structs, enums, enum members, fields, properties and constructors
- Code coverage, via CodeCov
- StyleCop.Analyzer and SonarAnalyzer.CSharp
- Start using a changelog
- Static classes
- Static properties
- Properties with default values
- Generating interface source code
- Bulk-friendly APIs
- Errors documentation
- XML documentation for exposed API
- Improved release action
- Use GitHub secrets and env vars instead of providing the token manually
- Changed the publish script to look for an env var if nuget api key not provided as an argument
- Structure build logic - keep builders locally, build when explicitly requested
- Improved validation during the build of a structure
- Validate the access members of namespace members (no private/protected [internal] classes/interfaces!)
- Basic code generation for namespaces, classes, constructors, fields and properties
- Tests project
- Automated GitHub Actions for CI and releases
- Documentation for releasing