Skip to content

#4359 Add source generator for data portal operation dispatch#4816

Merged
rockfordlhotka merged 5 commits intomainfrom
rocky/4359-dataportal
Feb 7, 2026
Merged

#4359 Add source generator for data portal operation dispatch#4816
rockfordlhotka merged 5 commits intomainfrom
rocky/4359-dataportal

Conversation

@rockfordlhotka
Copy link
Copy Markdown
Member

@rockfordlhotka rockfordlhotka commented Feb 7, 2026

Working on #4359

Summary

  • Adds a new source generator (Csla.Generator.DataPortalInterfaces.CSharp) that generates explicit IDataPortalOperationMapping implementations, eliminating reflection-based method dispatch in the data portal
  • Introduces IDataPortalOperationMapping interface and integrates it into DataPortalTarget with fallback to existing reflection-based dispatch
  • Generator is bundled directly into the Csla NuGet package (not a separate package)

Test plan

  • Generator unit tests with snapshot verification (13 test cases covering single/multiple operations, overloads, inject params, root/child attributes, abstract classes, etc.)
  • Full test suite passes (530 passed, 57 skipped, 0 failures)
  • Verify generator runs automatically when consuming the Csla NuGet package

🤖 Generated with Claude Code

rockfordlhotka and others added 5 commits February 6, 2026 20:54
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a source generator that creates IDataPortalOperationMapping implementations
for business types with data portal operation methods, eliminating the need for
reflection-based invocation and enabling AOT trimming compatibility.

- New generator project: Csla.Generator.DataPortalInterfaces.CSharp
- New IDataPortalOperationMapping interface and DataPortalOperationNotSupportedException
- DataPortalTarget tries generated dispatch first, falls back to reflection
- Handles all 13 operation attributes, [Inject], overloads, async, nested classes
- 13 snapshot tests covering all scenarios, full test suite passes with 0 regressions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…only

Remove standalone NuGet packaging (PackageId, IsPackable=true, Pack items)
so the generator is distributed exclusively via the Csla package, not as
a separate NuGet package.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace fixed Task.Delay(500) with polling loop that checks dashboard
state every 50ms with a 5s timeout, avoiding race with timer callbacks
on busy CI servers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rockfordlhotka rockfordlhotka requested review from JasonBock and removed request for JasonBock February 7, 2026 04:46
@rockfordlhotka rockfordlhotka merged commit dd10de5 into main Feb 7, 2026
3 checks passed
@rockfordlhotka rockfordlhotka deleted the rocky/4359-dataportal branch February 7, 2026 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant