Skip to content

Commit

Permalink
fix: indents on enums
Browse files Browse the repository at this point in the history
  • Loading branch information
pdevito3 committed Mar 24, 2024
1 parent 1726b09 commit eb2efe2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## Unreleased

* None yet!

## [0.26.3] - 03/24/2024

### Updated

* Use newer header append method on paginated list endpoint

### Fixed

* Indentation for smart enumvalue objects

## [0.26.2] - 02/06/2024

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions Craftsman/Domain/Enums/ValueObjectPropertyType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ private static string GetStaticEnums(string propertyName, List<string> normalize
private static string GetSmartEnum(string valueObjectClassName, List<string> smartNames)
{
var staticProps =
smartNames.Select(s => $@" public static readonly {valueObjectClassName}Enum {NormalizeSmartName(s)} = new {NormalizeSmartName(s)}Type();");
var eachEnum = smartNames.Select(s => $@" private class {NormalizeSmartName(s)}Type() : {valueObjectClassName}Enum(""{s}"", {smartNames.IndexOf(s)});");
smartNames.Select(s => $@" public static readonly {valueObjectClassName}Enum {NormalizeSmartName(s)} = new {NormalizeSmartName(s)}Type();");
var eachEnum = smartNames.Select(s => $@" private class {NormalizeSmartName(s)}Type() : {valueObjectClassName}Enum(""{s}"", {smartNames.IndexOf(s)});");

return $@" private abstract class {valueObjectClassName}Enum(string name, int value)
: SmartEnum<{valueObjectClassName}Enum>(name, value)
Expand Down

0 comments on commit eb2efe2

Please sign in to comment.