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

Signing updates types passed to KnownTypeAttribute #1

Merged
merged 1 commit into from
Jun 4, 2014
Merged

Signing updates types passed to KnownTypeAttribute #1

merged 1 commit into from
Jun 4, 2014

Conversation

krzysztofmolik
Copy link
Contributor

No description provided.

@rjasica
Copy link
Owner

rjasica commented Jun 3, 2014

Thank you for new feature!

{
foreach( var type in assemby.MainModule.GetTypes().Where(t => t.HasCustomAttributes ) )
{
var knownTypeAttribute = type.CustomAttributes.FirstOrDefault( t => t.AttributeType.FullName == KnowTypeAttributeName);
Copy link
Owner

Choose a reason for hiding this comment

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

I think, FirstOrDeafault is not safety in this place. According to MSDN, it is possible to add many KnowType attributes to single class. Could you use loop?

rjasica added a commit that referenced this pull request Jun 4, 2014
Signing updates types passed to KnownTypeAttribute
@rjasica rjasica merged commit efdf839 into rjasica:master Jun 4, 2014
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.

2 participants