You've already forked linux-packaging-mono
Imported Upstream version 4.3.2.467
Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
@@ -1,43 +1,6 @@
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace System
|
||||
{
|
||||
public class FormattableString
|
||||
{
|
||||
public FormattableString (string str, object[] arguments)
|
||||
{
|
||||
Value = str;
|
||||
Arguments = arguments;
|
||||
}
|
||||
|
||||
public string Value { get; set; }
|
||||
public object[] Arguments;
|
||||
}
|
||||
}
|
||||
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
public static class FormattableStringFactory
|
||||
{
|
||||
public static object Create(string format, params object[] arguments)
|
||||
{
|
||||
if (format.StartsWith ("format"))
|
||||
return new MyFormattable ();
|
||||
|
||||
return new FormattableString (format, arguments);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MyFormattable : IFormattable
|
||||
{
|
||||
string IFormattable.ToString (string str, IFormatProvider provider)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class ConversionTest
|
||||
{
|
||||
static int Main ()
|
||||
@@ -46,12 +9,12 @@ class ConversionTest
|
||||
|
||||
FormattableString c1;
|
||||
c1 = $"{b}";
|
||||
if (c1.Value != "{0}")
|
||||
if (c1.Format != "{0}")
|
||||
return 1;
|
||||
|
||||
IFormattable c2;
|
||||
c2 = $"format { b }";
|
||||
if (!(c2 is MyFormattable))
|
||||
if (!(c2 is FormattableString))
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user