Skip to content

Add MailAddress.TryCreate api #1052

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

Merged
merged 8 commits into from
Feb 10, 2020
Merged

Add MailAddress.TryCreate api #1052

merged 8 commits into from
Feb 10, 2020

Conversation

MarcoRossignoli
Copy link
Member

}

parsedData = (displayName, info.User, info.Host, displayNameEncoding);
Copy link
Member Author

Choose a reason for hiding this comment

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

opted for tuple because is used only inside this class

@@ -1,218 +1,181 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
Copy link
Member Author

Choose a reason for hiding this comment

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

I've reorganized data to allow reuse and equality with ctors tests.

{
try
{
return input.Normalize(Text.NormalizationForm.FormC);
normalizedString = input.Normalize(Text.NormalizationForm.FormC);
return true;
}
catch (ArgumentException e)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only place where we need to rely on exception handling.

@MarcoRossignoli
Copy link
Member Author

/azp list

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 1052 in repo dotnet/runtime

@scalablecory scalablecory requested a review from a team December 31, 2019 13:50
@scalablecory scalablecory added this to the 5.0 milestone Dec 31, 2019
@MarcoRossignoli
Copy link
Member Author

/azp list

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 1052 in repo dotnet/runtime

@MihaZupan
Copy link
Member

@ViktorHofer Shouldn't the external-ci group have azp permissions?

@MarcoRossignoli
Copy link
Member Author

just asked #718 (comment)

@vcsjones
Copy link
Member

/azp list

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 1052 in repo dotnet/runtime

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

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

Left a few comments, but generally LGTM.

@stephentoub
Copy link
Member

@dotnet/ncl, can someone please review?

Copy link
Contributor

@davidsh davidsh left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the PR!

@davidsh davidsh merged commit aea45f4 into dotnet:master Feb 10, 2020
@MarcoRossignoli MarcoRossignoli deleted the tryparsemailaddress branch February 11, 2020 07:48
@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 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.

TryParse for email addresses
9 participants