{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/16619","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/16619/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/16619/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/16619/events","html_url":"https://github.com/dotnet/corefx/issues/16619","id":211485631,"node_id":"MDU6SXNzdWUyMTE0ODU2MzE=","number":16619,"title":"Add FormattableString.CurrentCulture","user":{"login":"terrajobst","id":5169960,"node_id":"MDQ6VXNlcjUxNjk5NjA=","avatar_url":"https://avatars0.githubusercontent.com/u/5169960?v=4","gravatar_id":"","url":"https://api.github.com/users/terrajobst","html_url":"https://github.com/terrajobst","followers_url":"https://api.github.com/users/terrajobst/followers","following_url":"https://api.github.com/users/terrajobst/following{/other_user}","gists_url":"https://api.github.com/users/terrajobst/gists{/gist_id}","starred_url":"https://api.github.com/users/terrajobst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terrajobst/subscriptions","organizations_url":"https://api.github.com/users/terrajobst/orgs","repos_url":"https://api.github.com/users/terrajobst/repos","events_url":"https://api.github.com/users/terrajobst/events{/privacy}","received_events_url":"https://api.github.com/users/terrajobst/received_events","type":"User","site_admin":false},"labels":[{"id":937730107,"node_id":"MDU6TGFiZWw5Mzc3MzAxMDc=","url":"https://api.github.com/repos/dotnet/corefx/labels/Hackathon","name":"Hackathon","color":"5319e7","default":false},{"id":163655927,"node_id":"MDU6TGFiZWwxNjM2NTU5Mjc=","url":"https://api.github.com/repos/dotnet/corefx/labels/api-approved","name":"api-approved","color":"159818","default":false},{"id":179105931,"node_id":"MDU6TGFiZWwxNzkxMDU5MzE=","url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Runtime.Extensions","name":"area-System.Runtime.Extensions","color":"d4c5f9","default":false},{"id":145399958,"node_id":"MDU6TGFiZWwxNDUzOTk5NTg=","url":"https://api.github.com/repos/dotnet/corefx/labels/up-for-grabs","name":"up-for-grabs","color":"159818","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/5","html_url":"https://github.com/dotnet/corefx/milestone/5","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/5/labels","id":1328080,"node_id":"MDk6TWlsZXN0b25lMTMyODA4MA==","number":5,"title":"Future","description":"Milestone tracking issues not triaged to a planned release. Work in this milestone may happen, or may not: it is not committed.","creator":{"login":"joshfree","id":1302850,"node_id":"MDQ6VXNlcjEzMDI4NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1302850?v=4","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":1954,"closed_issues":152,"state":"open","created_at":"2015-09-29T00:25:45Z","updated_at":"2018-06-02T03:55:57Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2017-03-02T19:02:22Z","updated_at":"2018-06-02T08:12:37Z","closed_at":null,"author_association":"MEMBER","body":"We've told developers for a long time that they should be explicit about which cultures they use for formatting. In fact, we have FXCop rules like [CA1305](https://msdn.microsoft.com/en-us/library/ms182190.aspx) that flag non-explicit use.\r\n\r\nString interpolation in C# follows what virtually all our formatting APIs do unless instructed otherwise: it will format the string using the current culture. While we have `FormattableString.Invariant`, which allows customers to use the invariant culture, like so:\r\n\r\n```C#\r\nstring text = FomattableString.Invariant($\"This will be formatted using invariant {i}\");\r\n```\r\n\r\nWe don't have a way in string interpolation to explicitly indicate that we intend to use the current culture. This proposes an API to allow that. It would be a way to suppress FXCop rule CA1305.\r\n\r\n### Proposal\r\n\r\n```C#\r\nnamespace System\r\n{\r\n    public partial class FormattableString\r\n    {\r\n        // Existing API:\r\n        // public static string Invariant(FormattableString formattable);\r\n\r\n        public static string CurrentCulture(FormattableString formattable);\r\n    }\r\n}\r\n```\r\n\r\n### Usage\r\n\r\n```C#\r\n// These are now equivalent\r\nstring text1 = $\"This will be formatted using current culture {i}\";\r\nstring text2 = FomattableString.CurrentCulture($\"This will be formatted using current culture {i}\");\r\n```\r\n\r\n/cc @gafter "},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/394068798","html_url":"https://github.com/dotnet/corefx/issues/16619#issuecomment-394068798","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/16619","id":394068798,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDA2ODc5OA==","user":{"login":"mikhailshilkov","id":1454008,"node_id":"MDQ6VXNlcjE0NTQwMDg=","avatar_url":"https://avatars1.githubusercontent.com/u/1454008?v=4","gravatar_id":"","url":"https://api.github.com/users/mikhailshilkov","html_url":"https://github.com/mikhailshilkov","followers_url":"https://api.github.com/users/mikhailshilkov/followers","following_url":"https://api.github.com/users/mikhailshilkov/following{/other_user}","gists_url":"https://api.github.com/users/mikhailshilkov/gists{/gist_id}","starred_url":"https://api.github.com/users/mikhailshilkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikhailshilkov/subscriptions","organizations_url":"https://api.github.com/users/mikhailshilkov/orgs","repos_url":"https://api.github.com/users/mikhailshilkov/repos","events_url":"https://api.github.com/users/mikhailshilkov/events{/privacy}","received_events_url":"https://api.github.com/users/mikhailshilkov/received_events","type":"User","site_admin":false},"created_at":"2018-06-02T08:12:37Z","updated_at":"2018-06-02T08:12:37Z","author_association":"NONE","body":"I'll grab this one for hackathon today, looks good a the first issue"}}
{"actor":{"display_login":"mikhailshilkov"}}