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

remove if properties or their types has got ExcludeProxy Attribute #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Rakkoc
Copy link

@Rakkoc Rakkoc commented Jun 19, 2017

remove if properties or their types has got ExcludeProxy Attribute (or dummy name)

remove if properties or their types has got ExcludeProxy Attribute (or dummy name)
@onionhammer
Copy link
Collaborator

What's the use-case of this; as opposed to just marking the properties as internal?

@Rakkoc
Copy link
Author

Rakkoc commented Jun 20, 2017

I use same dll with abstract (base) class and same type (they are nullable) use an other project and i can modify it. But they are partial i can add attribute in my project. And public it if i know name.

// remove if properties or their types has got ExcludeProxy Attribute (or dummy name)
properties = properties.Where(x =>
!x.CustomAttributes.Any(z => z.AttributeType.Name.Contains("ExcludeProxy")) && // Property
!x.PropertyType.CustomAttributes.Any(y => y.AttributeType.Name.Contains("ExcludeProxy")) // Type
Copy link
Member

Choose a reason for hiding this comment

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

Avoid magic strings where possible.

An idea is to either compare to nameof(ExcludeProxy) or just compare where types contain typeof(ExcludeProxy)

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.

3 participants