Skip to content

Conversation

@digitalsigi
Copy link
Contributor

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.

sungam3r and others added 21 commits January 23, 2024 20:36
# 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>
@github-actions github-actions bot added documentation Improvements or additions to documentation tests Pull request that adds new or changes existing tests labels Dec 22, 2024
@digitalsigi digitalsigi marked this pull request as ready for review December 22, 2024 15:55
digitalsigi and others added 8 commits January 5, 2025 14:22
…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>
@sungam3r
Copy link
Member

sungam3r commented Jan 5, 2025

@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.

@digitalsigi
Copy link
Contributor Author

digitalsigi commented Jan 5, 2025 via email

@sungam3r sungam3r merged commit 0f5d1bd into destructurama:master Jan 8, 2025
8 checks passed
@codecov
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e5ccd01) to head (7b4109b).
Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

@sungam3r
Copy link
Member

sungam3r commented Jan 8, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation tests Pull request that adds new or changes existing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for MetadataTypeAttribute

2 participants