Skip to content

Convert IOwnable to have a type that will allow typed ownership#82

Merged
JJBussert merged 1 commit into
e13tech:mainfrom
JJBussert:main
Apr 24, 2025
Merged

Convert IOwnable to have a type that will allow typed ownership#82
JJBussert merged 1 commit into
e13tech:mainfrom
JJBussert:main

Conversation

@JJBussert
Copy link
Copy Markdown
Contributor

This pull request introduces a generic type parameter to the IOwnable interface, allowing greater flexibility in specifying the type of the OwnedBy property. The changes also update the TestOwnable class to implement the modified interface with a string type for the OwnedBy property.

Changes to the IOwnable interface:

  • Modified the IOwnable interface to include a generic type parameter <T>, replacing the string type for the OwnedBy property with the generic type T. (src/E13.Common.Domain/IOwnable.cs, src/E13.Common.Domain/IOwnable.csL7-R9)

Updates to the TestOwnable class:

@JJBussert JJBussert requested a review from Copilot April 24, 2025 14:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@JJBussert JJBussert merged commit 3be5213 into e13tech:main Apr 24, 2025
3 checks 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.

2 participants