Convert IOwnable to have a type that will allow typed ownership#82
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces a generic type parameter to the IOwnable interface, enabling the OwnedBy property to be typed as specified by the consumer.
- Updated the IOwnable interface to be a generic interface with the type parameter T replacing the fixed string type for OwnedBy.
- Modified the TestOwnable class to use IOwnable, ensuring the OwnedBy property is still a string.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/E13.Common.Domain/IOwnable.cs | Converted IOwnable to a generic interface and replaced the type of OwnedBy with T. |
| test/E13.Common.Data.Db.Tests/Sample/TestOwnable.cs | Updated TestOwnable to implement the new generic interface using string as the type parameter. |
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.
This pull request introduces a generic type parameter to the
IOwnableinterface, allowing greater flexibility in specifying the type of theOwnedByproperty. The changes also update theTestOwnableclass to implement the modified interface with astringtype for theOwnedByproperty.Changes to the
IOwnableinterface:IOwnableinterface to include a generic type parameter<T>, replacing thestringtype for theOwnedByproperty with the generic typeT. (src/E13.Common.Domain/IOwnable.cs, src/E13.Common.Domain/IOwnable.csL7-R9)Updates to the
TestOwnableclass:TestOwnableclass to implement the newIOwnable<T>interface, specifyingstringas the type for theOwnedByproperty. (test/E13.Common.Data.Db.Tests/Sample/TestOwnable.cs, test/E13.Common.Data.Db.Tests/Sample/TestOwnable.csL10-R10)