|
1 | 1 | //
|
2 | 2 | // Copyright (c) .NET Foundation and Contributors
|
3 |
| -// Portions Copyright (c) Microsoft Corporation. All rights reserved. |
4 | 3 | // See LICENSE file in the project root for full license information.
|
5 | 4 | //
|
6 | 5 |
|
7 | 6 | namespace System
|
8 | 7 | {
|
9 |
| - using Runtime.CompilerServices; |
10 |
| - |
11 |
| - /// <summary> |
12 |
| - /// Represents the standard input, output, and error streams for console applications. This class cannot be inherited. |
13 |
| - /// </summary> |
14 |
| - [Serializable] |
15 |
| - public static class Console |
| 8 | + internal static class Console |
16 | 9 | {
|
17 |
| - [MethodImpl(MethodImplOptions.InternalCall)] |
18 |
| - extern static private void OutNative(string text, bool addLineFeed); |
19 |
| - |
20 |
| - /// <summary> |
21 |
| - /// Writes the specified string value to the standard output stream. |
22 |
| - /// </summary> |
23 |
| - /// <param name="value">The value to write.</param> |
24 |
| - [Obsolete("This method is going to be removed in a future version. Call Debug.Write instead.")] |
25 |
| - public static void Write(string value) |
26 |
| - { |
27 |
| - OutNative(value, false); |
28 |
| - } |
| 10 | + internal static void Write(string value) => Diagnostics.Debug.WriteLineNative(value, false); |
29 | 11 |
|
30 |
| - /// <summary> |
31 |
| - /// Writes the specified string value, followed by the current line terminator, to the standard output stream. |
32 |
| - /// </summary> |
33 |
| - /// <param name="value">The value to write.</param> |
34 |
| - [Obsolete("This method is going to be removed in a future version. Call Debug.Write instead.")] |
35 |
| - public static void WriteLine(string value) |
36 |
| - { |
37 |
| - OutNative(value, true); |
38 |
| - } |
| 12 | + internal static void WriteLine(string value) => Diagnostics.Debug.WriteLineNative(value, true); |
39 | 13 | }
|
40 | 14 | }
|
0 commit comments