Releases: ful-stackz/SharpCode
Releases · ful-stackz/SharpCode
v0.4.0
Added
- 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
Changed
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
Fixed
- Removed the invalid access modifier
AccessModifier.PrivateInternal-private internal
v0.3.0
Added
- 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
Changed
- [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
Fixed
- Fixes the issue described in PR#13 - source code template strings were breaking when hydration keywords were used by consumer code
v0.2.0
Add features section to README and prep 0.2.0 release
v0.1.0
Update README.md