Skip to content

feat(generator): AsBoolean presence flags and projection strategy split - #4

Merged
rutkowskit merged 1 commit into
masterfrom
feature/enum-to-class-property-as-boolean
Aug 11, 2026
Merged

rutkowskit merged 1 commit into
masterfrom
feature/enum-to-class-property-as-boolean

Conversation

@rutkowskit

Copy link
Copy Markdown
Owner

Summary

Adds AsBoolean on EnumToClassPropertyAttribute to emit a bool host property indicating whether the attribute is present on an enum member, and cleans up the attribute-projection pipeline for maintainability.

Changes

• AsBoolean: true / false presence flag (optional Name, e.g. HasAdminOnly)
• ETC015 when combined with AsArray or Source
• Projection split: AttributeProjectionKind, factory, emitter, models; EnumFieldData in its own file
• Tests (FeatureFlags + ETC015 snapshot); README / docs

Test plan

• [x] dotnet test -c Release
• [x] Regression: existing AsArray / Source / single-attribute projections
• [x] AsBoolean present vs absent; conflict with Source reports ETC015

Support bool host properties for attribute presence, extract projection
factory/emitter/kind, and isolate EnumFieldData from EnumToClassData.
@rutkowskit
rutkowskit merged commit 535ca76 into master Aug 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant