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

Add a type converter for the InternetAddress type #884

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

0xced
Copy link

@0xced 0xced commented Feb 13, 2023

This is useful to automatically convert strings to typed InternetAddress subclasses. For example, when using the Microsoft.Extensions.Configuration package.

@0xced 0xced force-pushed the InternetAddressTypeConverter branch from bb23163 to 8ee4e05 Compare February 13, 2023 20:38
@jstedfast
Copy link
Owner

I'll have to think about this...

@0xced 0xced force-pushed the InternetAddressTypeConverter branch from 8ee4e05 to 2650332 Compare February 17, 2023 08:51
@jstedfast
Copy link
Owner

Can the TypeConverter classes be internal or do they have to be public for this to work?

@0xced
Copy link
Author

0xced commented Feb 18, 2023

I think they could be internal but we would lose the ability to specify another ParserOptions with the Register method.

Also, all the system type converter classes are public.

@jstedfast
Copy link
Owner

Can you show me an example of how you intend to use this?

I'm not very familiar with Microsoft.Extensions.Configuration and so I'm curious about how this would work.

@0xced
Copy link
Author

0xced commented Feb 23, 2023

Will do next week when I'm back in front of a computer.

@jstedfast
Copy link
Owner

@0xced Just figured I'd poke you since you are likely back from vacation now.

This is useful to automatically convert strings to typed InternetAddress subclasses. For example, when using the `Microsoft.Extensions.Configuration` package.
@0xced 0xced force-pushed the InternetAddressTypeConverter branch from 2650332 to f39f38c Compare April 18, 2023 10:56
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.

None yet

2 participants