Last active
November 27, 2019 17:50
-
-
Save ncruces/be5a008f4ea49b22c6de479b52e61b4f to your computer and use it in GitHub Desktop.
Culture invariant IUrlParameterFormatter for https://github.com/reactiveui
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
using System.Reflection; | |
namespace Refit | |
{ | |
public sealed class InvariantUrlParameterFormatter : IUrlParameterFormatter | |
{ | |
public string Format(object parameterValue, ParameterInfo parameterInfo) | |
{ | |
if (parameterValue == null) return null; | |
return Convert.ToString(parameterValue, CultureInfo.InvariantCulture); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment