-
-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
using System.Globalization; | ||
|
||
namespace CliWrap.Magic; | ||
|
||
public readonly partial struct FormattedToString | ||
{ | ||
public string Value { get; } | ||
|
||
public FormattedToString(string value) => Value = value; | ||
} | ||
|
||
public partial struct FormattedToString | ||
{ | ||
public static implicit operator FormattedToString(string value) => new(value); | ||
|
||
public static implicit operator FormattedToString(bool value) => new(value.ToString()); | ||
|
||
public static implicit operator FormattedToString(IFormattable value) => | ||
Check failure on line 19 in CliWrap.Magic/FormattedToString.cs GitHub Actions / main / test (windows-latest)
Check failure on line 19 in CliWrap.Magic/FormattedToString.cs GitHub Actions / main / test (windows-latest)
Check failure on line 19 in CliWrap.Magic/FormattedToString.cs GitHub Actions / main / test (windows-latest)
Check failure on line 19 in CliWrap.Magic/FormattedToString.cs GitHub Actions / main / test (windows-latest)
Check failure on line 19 in CliWrap.Magic/FormattedToString.cs GitHub Actions / main / test (windows-latest)
Check failure on line 19 in CliWrap.Magic/FormattedToString.cs GitHub Actions / main / test (windows-latest)
Check failure on line 19 in CliWrap.Magic/FormattedToString.cs GitHub Actions / main / test (windows-latest)
|
||
new(value.ToString(null, CultureInfo.InvariantCulture)); | ||
|
||
public static implicit operator string(FormattedToString value) => value.Value; | ||
} |