ProjectTracker: lift TimeStamp into intermediate base classes#4859
Open
rockfordlhotka wants to merge 1 commit intomainfrom
Open
ProjectTracker: lift TimeStamp into intermediate base classes#4859rockfordlhotka wants to merge 1 commit intomainfrom
rockfordlhotka wants to merge 1 commit intomainfrom
Conversation
Demonstrate the pattern of an intermediate subclass between Csla.BusinessBase<T> / Csla.BusinessDocumentBase<T,C> and concrete business objects, where the intermediate declares its own registered property (TimeStamp byte[] concurrency token) used across multiple BOs. Also fixes ResourceAssignmentEdit, ProjectResourceEdit, and RoleEdit which silently inherited from Csla.BusinessBase<T> via `using Csla;` instead of the local CslaBaseTypes.BusinessBase<T> they appeared to target. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Csla.BusinessBase<T>/Csla.BusinessDocumentBase<T,C>and concrete BOs, where the intermediate declares its own registered properties that are inherited by every concrete BO.TimeStamp(byte[]) concurrency token — present in all five candidate BOs — intoProjectTracker.Library.CslaBaseTypes.BusinessBase<T>andBusinessDocumentBase<T,C>. These two intermediate types existed previously but were empty shells.ResourceAssignmentEdit,ProjectResourceEdit, andRoleEditwrote: BusinessBase<X>which (underusing Csla;) silently bound toCsla.BusinessBase<T>, not the local intermediate. The intermediate was unused even where it looked otherwise. Now qualified toCslaBaseTypes.BusinessBase<X>.Why this is useful as a sample
The CSLA documentation discusses application-wide intermediate base classes, but no sample demonstrated declaring registered properties on the intermediate. This change makes ProjectTracker a working reference for that pattern.
Notes
GetProperty(TimeStampProperty)!(null-forgiving) — the same pattern used inside the CSLA framework (e.g.DataPortalErrorInfo.cs). The CSLA0007 analyzer false-positives on this so a#pragma warning disableis applied with a comment explaining why.BusinessBase/BusinessDocumentBase, so the local-namespace intermediates work transparently.Test plan
dotnet build Samples/ProjectTracker/ProjectTracker.sln— clean (0 errors; only pre-existing NU1603 NuGet version warnings)🤖 Generated with Claude Code