MimeKit icon indicating copy to clipboard operation
MimeKit copied to clipboard

Add a type converter for the InternetAddress type

Open 0xced opened this issue 2 years ago • 6 comments

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

0xced avatar Feb 13 '23 20:02 0xced

I'll have to think about this...

jstedfast avatar Feb 15 '23 13:02 jstedfast

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

jstedfast avatar Feb 18 '23 18:02 jstedfast

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.

0xced avatar Feb 18 '23 19:02 0xced

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.

jstedfast avatar Feb 18 '23 22:02 jstedfast

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

0xced avatar Feb 23 '23 06:02 0xced

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

jstedfast avatar Mar 15 '23 12:03 jstedfast

I made some changes to this PR and manually merged it (couldn't push my changes to this PR branch).

jstedfast avatar Aug 08 '24 16:08 jstedfast