Skip to content
This repository was archived by the owner on Mar 20, 2019. It is now read-only.

Allow to add or replace MessagePart converters from outside #30

Open
wants to merge 1 commit into
base: v3.4
Choose a base branch
from

Conversation

derigel23
Copy link

I need to use custom OAuth provider which is not following standards. Instead of 'true' or 'false' for boolean values it uses '1' and '0'. If I replace bool.Parse to XmlConvert.ToBoolean (which can handle both '1' , '0' and 'true', 'fase') I will be fine. But I can't do this without dotnetopenauth project recompilation (which is hard with signing stuff).
This patch will allow to replace standard converters.
For example, for my case:
MessagePart.Map(value => value ? "1" : "0", null, XmlConvert.ToBoolean);

@AArnott
Copy link
Member

AArnott commented May 5, 2011

Wow. You've obviously spent some time studying our DNOA's messaging framework works. This is a good candidate for pulling in. We do have a mutable MessageDescription system in the osis branch (since tests have to deliberately break stuff on occasion), so I'll review that one with this one and see if this is the best way to go.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants