You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.150
Former-commit-id: 73e3bb1e96dd09dc931c1dfe559d2c7f7b8b02c7
This commit is contained in:
parent
02ac915603
commit
b95516a3dd
@ -782,6 +782,183 @@ namespace System
|
||||
if (exit)
|
||||
Environment.Exit (58);
|
||||
}
|
||||
#else
|
||||
// largely inspired by https://github.com/dotnet/corefx/blob/be8d2ce3964968cec9322a64211e37682085db70/src/System.Console/src/System/ConsolePal.WinRT.cs, because it's a similar platform where a console might not be available
|
||||
|
||||
// provide simply color tracking that allows round-tripping
|
||||
internal const ConsoleColor UnknownColor = (ConsoleColor)(-1);
|
||||
private static ConsoleColor s_trackedForegroundColor = UnknownColor;
|
||||
private static ConsoleColor s_trackedBackgroundColor = UnknownColor;
|
||||
|
||||
public static ConsoleColor ForegroundColor
|
||||
{
|
||||
get
|
||||
{
|
||||
return s_trackedForegroundColor;
|
||||
}
|
||||
set
|
||||
{
|
||||
lock (Console.Out) // synchronize with other writers
|
||||
{
|
||||
s_trackedForegroundColor = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ConsoleColor BackgroundColor
|
||||
{
|
||||
get
|
||||
{
|
||||
return s_trackedBackgroundColor;
|
||||
}
|
||||
set
|
||||
{
|
||||
lock (Console.Out) // synchronize with other writers
|
||||
{
|
||||
s_trackedBackgroundColor = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int BufferWidth
|
||||
{
|
||||
get { throw new PlatformNotSupportedException (); }
|
||||
set { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
public static int BufferHeight
|
||||
{
|
||||
get { throw new PlatformNotSupportedException (); }
|
||||
set { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
public static bool CapsLock { get { throw new PlatformNotSupportedException (); } }
|
||||
|
||||
public static int CursorLeft
|
||||
{
|
||||
get { throw new PlatformNotSupportedException (); }
|
||||
set { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
public static int CursorTop
|
||||
{
|
||||
get { throw new PlatformNotSupportedException (); }
|
||||
set { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
public static int CursorSize
|
||||
{
|
||||
get { return 100; }
|
||||
set { throw new PlatformNotSupportedException(); }
|
||||
}
|
||||
|
||||
public static bool CursorVisible
|
||||
{
|
||||
get { throw new PlatformNotSupportedException (); }
|
||||
set { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
public static bool KeyAvailable { get { throw new PlatformNotSupportedException (); } }
|
||||
|
||||
public static int LargestWindowWidth
|
||||
{
|
||||
get { throw new PlatformNotSupportedException (); }
|
||||
set { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
public static int LargestWindowHeight
|
||||
{
|
||||
get { throw new PlatformNotSupportedException (); }
|
||||
set { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
public static bool NumberLock { get { throw new PlatformNotSupportedException (); } }
|
||||
|
||||
public static string Title
|
||||
{
|
||||
get { throw new PlatformNotSupportedException (); }
|
||||
set { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
public static bool TreatControlCAsInput
|
||||
{
|
||||
get { throw new PlatformNotSupportedException (); }
|
||||
set { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
public static int WindowHeight
|
||||
{
|
||||
get { throw new PlatformNotSupportedException (); }
|
||||
set { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
public static int WindowLeft
|
||||
{
|
||||
get { return 0; }
|
||||
set { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
public static int WindowTop
|
||||
{
|
||||
get { return 0; }
|
||||
set { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
public static int WindowWidth
|
||||
{
|
||||
get { throw new PlatformNotSupportedException (); }
|
||||
set { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
public static bool IsErrorRedirected { get { throw new PlatformNotSupportedException (); } }
|
||||
|
||||
public static bool IsInputRedirected { get { throw new PlatformNotSupportedException (); } }
|
||||
|
||||
public static bool IsOutputRedirected { get { throw new PlatformNotSupportedException (); } }
|
||||
|
||||
public static void Beep () { throw new PlatformNotSupportedException (); }
|
||||
|
||||
public static void Beep (int frequency, int duration) { throw new PlatformNotSupportedException (); }
|
||||
|
||||
public static void Clear () { throw new PlatformNotSupportedException (); }
|
||||
|
||||
public static void MoveBufferArea (int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop) { throw new PlatformNotSupportedException(); }
|
||||
|
||||
public static void MoveBufferArea (int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop, char sourceChar, ConsoleColor sourceForeColor, ConsoleColor sourceBackColor) { throw new PlatformNotSupportedException(); }
|
||||
|
||||
|
||||
public static ConsoleKeyInfo ReadKey ()
|
||||
{
|
||||
return ReadKey (false);
|
||||
}
|
||||
|
||||
public static ConsoleKeyInfo ReadKey (bool intercept) { throw new PlatformNotSupportedException (); }
|
||||
|
||||
public static void ResetColor ()
|
||||
{
|
||||
lock (Console.Out) // synchronize with other writers
|
||||
{
|
||||
s_trackedForegroundColor = UnknownColor;
|
||||
s_trackedBackgroundColor = UnknownColor;
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetBufferSize (int width, int height) { throw new PlatformNotSupportedException (); }
|
||||
|
||||
public static void SetCursorPosition (int left, int top) { throw new PlatformNotSupportedException (); }
|
||||
|
||||
public static void SetWindowPosition (int left, int top) { throw new PlatformNotSupportedException (); }
|
||||
|
||||
public static void SetWindowSize (int width, int height) { throw new PlatformNotSupportedException (); }
|
||||
|
||||
public static event ConsoleCancelEventHandler CancelKeyPress {
|
||||
add {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
remove {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user