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

Feature/suggestion - Use Castle core's AttributesToAlwaysReplicate when it is released #156

Open
ykarpeev opened this issue Sep 14, 2023 · 0 comments

Comments

@ykarpeev
Copy link
Contributor

I've found that to have Category and DisplayName attributes to show up in a PropertyGrid) when using iconfig you have to do the below (or add a viewmodel to wrap the config).

castleproject/Core#593 (comment)

[AttributeUsage(AttributeTargets.All, Inherited = false)]
public class NonInheritedDescriptionAttribute : DescriptionAttribute
{
public NonInheritedDescriptionAttribute(string description) : base(description) { }
}

This works great, but the PasswordPropertyTextAttribute is a sealed class and so can not be inherited.

I saw that in a future version of castle there will be AttributesToAlwaysReplicate castleproject/Core#633

I tested this and it works well here, I think it could be a good feature. Maybe using reflection all properties could be added to replicate as well. I just added the ones I needed.

Here is the commit where I tested it.

ykarpeev@0a2aa04

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

No branches or pull requests

1 participant