question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature request] Backport FormattableString/FormattableStringFactory

See original GitHub issue

Missing in net 4.5 and earlier. Use case (taken from Meziantou’s blog post):

string EscapeCommandLineArgs(FormattableString formattableString)
{
    var args = formattableString.GetArguments()
                   .Select(arg => CommandLineBuilder.WindowsQuotedArgument(string.Format("{0}", arg)))
                   .ToArray();
    return string.Format(formattableString.Format, args);
}

...
var arg1 = "c:\\Program Files\\whoami.exe";
var arg2 = "Gérald Barré";
var commandLine = EscapeCommandLineArgs($"{arg1} {arg2}"); // "c:\Program Files\whoami.exe" "Gérald Barré"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
theraotcommented, Dec 11, 2019

Nuget Version 3.1.1

0reactions
ig-sinicyncommented, Dec 11, 2019

Can confirm it works:)

Read more comments on GitHub >

github_iconTop Results From Across the Web

UbuntuBackports - Community Help Wiki
When a package which has been backported receives a security update, it is the responsibility of the person who requested and performed the ......
Read more >
Backporting - Moodle Developer Resources
Process for requesting a non bug-fix backport​. Improvements or new features can be requested to be backported to the stable branches.
Read more >
A CLI tool that automates the process of backporting commits.
A simple CLI tool that automates the process of backporting commits on a GitHub repo ... The commit will be cherrypicked, pushed and...
Read more >
What is Backporting? The Process & How It Works
Backporting is when a software patch or update is taken from a recent software version and applied to an older version of the...
Read more >
What is backporting and how does it affect Red Hat ...
One of these features changed the module interface. In this case, if Red Hat issued a security update with version 2.0.43 of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found