-
Notifications
You must be signed in to change notification settings - Fork 36
Add support for MetadataType Attribute #142
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
Conversation
# Conflicts: # src/Destructurama.Attributed/Attributed/AttributedDestructuringPolicy.cs
Fine with me Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
Thank you. Much better explaination! Actually this is my first contribution to such a project... Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
…gPolicyOptions.cs Fine with me Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
…gPolicyOptions.cs Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
…gPolicyOptions.cs Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
Need additional review Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
src/Destructurama.Attributed/Attributed/CustomPropertyInfoExtension.cs
Outdated
Show resolved
Hide resolved
src/Destructurama.Attributed/Attributed/CustomPropertyInfoExtension.cs
Outdated
Show resolved
Hide resolved
src/Destructurama.Attributed/Attributed/CustomPropertyInfoExtension.cs
Outdated
Show resolved
Hide resolved
src/Destructurama.Attributed/Attributed/CustomPropertyInfoExtension.cs
Outdated
Show resolved
Hide resolved
…nsion.cs Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
…nsion.cs Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
…nsion.cs Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
…nsion.cs Just a remark: Extension is on MemberInfo not on PropertyInfo, but its OK Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
…nsion.cs Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
…nsion.cs Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
…nsion.cs Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
…nsion.cs Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
src/Destructurama.Attributed/Attributed/CustomPropertyInfoExtension.cs
Outdated
Show resolved
Hide resolved
src/Destructurama.Attributed/Attributed/CustomPropertyInfoExtension.cs
Outdated
Show resolved
Hide resolved
src/Destructurama.Attributed/Attributed/CustomPropertyInfoExtension.cs
Outdated
Show resolved
Hide resolved
src/Destructurama.Attributed/Attributed/CustomPropertyInfoExtension.cs
Outdated
Show resolved
Hide resolved
src/Destructurama.Attributed/Attributed/CustomPropertyInfoExtension.cs
Outdated
Show resolved
Hide resolved
src/Destructurama.Attributed/Attributed/CustomPropertyInfoExtension.cs
Outdated
Show resolved
Hide resolved
|
@digitalsigi Only single conversation left - https://github.com/destructurama/attributed/pull/142/files#r1901650509 . I reviewed all files except that one test file with incomprehensible public/private properties. I'm fine to merge PR after that. |
|
I just resolved this.
Wow, would be my first PR…
Go ahead.
Von: Ivan Maximov ***@***.***>
Gesendet: Sonntag, 5. Januar 2025 16:23
An: destructurama/attributed ***@***.***>
Cc: Josef Bogad ***@***.***>; Mention ***@***.***>
Betreff: Re: [destructurama/attributed] Add support for MetadataType Attribute (PR #142)
@digitalsigi<https://github.com/digitalsigi> Only single conversation left - https://github.com/destructurama/attributed/pull/142/files#r1901650509 . I reviewed all files except that one test file with incomprehensible public/private properties. I'm fine to merge PR after that.
—
Reply to this email directly, view it on GitHub<#142 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABGQGKIZW7WL6HQ4FKWNKWT2JFE6PAVCNFSM6AAAAABUBYOKEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZRGY3DCNJTG4>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #142 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 11 12 +1
Lines 242 259 +17
Branches 37 40 +3
=========================================
+ Hits 242 259 +17 ☔ View full report in Codecov by Sentry. |
Adds support from MetadataType Attribute, see #40
According to https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.metadatatypeattribute?view=net-9.0#remarks
The MetadataType attribute can only applied to a class
The attribute cannot be inherited by derived classes.
can only applied once
Netstandard 2.0 or below is not supported
Changed code replaces the PropertyInfo from base class with PropertyInfo property of MetadataType for equal named properties.