Skip to content

Releases: ful-stackz/SharpCode

v0.4.0

27 Jul 07:44
168a307

Choose a tag to compare

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...() and Code.Create...() methods that accept string parameters; empty or whitespace strings will now result in an ArgumentException

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 of constructor(): base()
    • Property { get; set; } and Property { 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

05 Aug 00:28

Choose a tag to compare

Added

  • Introspection API via the new .HasMember() method, available on applicable structure builders
  • More null arguments sanitizing in public methods and consecutively more ArgumentNullException and ArgumentException, 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 class to readonly 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

05 Oct 12:31

Choose a tag to compare

Add features section to README and prep 0.2.0 release

v0.1.0

26 Sep 12:36
8933242

Choose a tag to compare

Update README.md