Skip to content

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented Nov 26, 2020

No description provided.

@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@jkotas
Copy link
Member Author

jkotas commented Nov 26, 2020

This is converting the few methods both us have been staring at a lot in last few days, and also deletes the unused arguments.

[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)]
Type type)
{
if (type is null)
Copy link
Member Author

Choose a reason for hiding this comment

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

Undid the sharing here. There was more lines duplicated than shared.

Comment on lines 143 to 151
if (type is null)
{
throw new ArgumentNullException(nameof(type), SR.ArgumentNull_Type);
}

if (!(type is RuntimeType rt))
{
throw new SerializationException(SR.Format(SR.Serialization_InvalidType, type));
}
Copy link
Member

Choose a reason for hiding this comment

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

Same question as earlier

@jkotas jkotas merged commit 804d730 into dotnet:master Nov 27, 2020
@jkotas jkotas deleted the followup branch November 27, 2020 00:49
@ghost ghost locked as resolved and limited conversation to collaborators Dec 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants