Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support replication of attributes defined in AttributesToAlwaysReplicate list #633

Merged

Conversation

shoaibshakeel381
Copy link
Contributor

  • This is complementary to AttributesToAvoidReplicating
  • It will allow consumers to specify attributes which should always be copied to generated proxy. It is especially useful where we do not own target interfeces and/or cannot override attributes, e.g. attributes used by various frameworks. See Inheritance of Attributes from Interface Members #593 for more context
  • Similar effect could by achieved in Castle.Core Version 4.4.1 by simply extending various generator classes but since 5.0 all those classes were marked internal, forcing client code to override half the library. This fix offers an alternative path while keeping to code conventions already in place.
  • Fixes [FEATURE] Allow replication of attributes on mixins or attributes on inherited interfaces #607

@shoaibshakeel381 shoaibshakeel381 changed the title Support replication of attributss defined in AttributesToAlwaysReplicate Support replication of attributes defined in AttributesToAlwaysReplicate Sep 17, 2022
@shoaibshakeel381 shoaibshakeel381 changed the title Support replication of attributes defined in AttributesToAlwaysReplicate Support replication of attributes defined in AttributesToAlwaysReplicate list Sep 17, 2022
@jonorossi jonorossi requested a review from stakx September 29, 2022 12:04
Copy link
Member

@stakx stakx left a comment

Choose a reason for hiding this comment

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

Sorry it took me so abysmally long to review this.

I'm in favor of this change, however there's one detail that might need adjusting before we merge... see review comment below.

P.S. could you please also add a new entry to CHANGELOG.md for this new feature?

 # Castle Core Changelog

 # Unreleased
 
 Enhancements:
 - ...
+- <Short description of the new feature goes here> (@shoaibshakeel381, #633)

 ## 5.1.1 (2022-12-30)

@stakx stakx mentioned this pull request Dec 29, 2022
Shoaib Shakeel added 3 commits March 6, 2023 10:43
- This is complementary to AttributesToAvoidReplicating
- This will allow consumers to specify attributes which should always be
  copied to generated proxy. It is especially useful where we do not own
  target interfeces and/or cannot override attributes, e.g. attributes
  used by various frameworks. This was mentioned in castleproject#593
- Similar effect could by achieved in Castle.Core Version 4.4.1 by simply extending various generator classes but in 5.0 all those classes were marked internal, without this fix we now have to override half the library, So this fix offers an alternative path.
- Fixes castleproject#607
@shoaibshakeel381 shoaibshakeel381 force-pushed the feature/alwaysreplicateattribute branch from 6787f3d to af9a8ab Compare March 6, 2023 09:59
@shoaibshakeel381
Copy link
Contributor Author

@stakx I have applied all requested changes. Please review

@shoaibshakeel381 shoaibshakeel381 requested a review from stakx March 9, 2023 23:47
@stakx stakx merged commit dca4ed0 into castleproject:master Apr 9, 2023
@stakx
Copy link
Member

stakx commented Apr 9, 2023

Looks good to me! Thanks for your contribution @shoaibshakeel381, and sorry again for letting you wait so long.

P.S. and sorry if I merged your commits too soon, perhaps I should have squashed them or let you do so first. Hope you don't mind too much.

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.

[FEATURE] Allow replication of attributes on mixins or attributes on inherited interfaces
3 participants