File tree Expand file tree Collapse file tree 5 files changed +32
-2
lines changed Expand file tree Collapse file tree 5 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 1
1
<Project >
2
2
<PropertyGroup >
3
- <NetTargetFrameworks >net6.0;net5.0;netstandard2.0</NetTargetFrameworks >
3
+ <NetTargetFrameworks >net6.0;net5.0;netstandard2.0;netstandard1.3 </NetTargetFrameworks >
4
4
<LangVersion >latest</LangVersion >
5
5
<Nullable >enable</Nullable >
6
6
</PropertyGroup >
Original file line number Diff line number Diff line change 1
- namespace Demo
1
+ #if NET5_0
2
+ #pragma warning disable CA1416 // Validate platform compatibility
3
+ #endif
4
+
5
+ namespace Demo
2
6
{
3
7
using Console = XConsole ;
4
8
@@ -37,7 +41,11 @@ public static async Task Main()
37
41
38
42
//Console.SetCursorPosition(0, 8950);
39
43
44
+ #if ! NETSTANDARD1_3
40
45
var sysFolder = new DirectoryInfo ( Environment . GetFolderPath ( Environment . SpecialFolder . System ) ) ;
46
+ #else
47
+ var sysFolder = new DirectoryInfo ( @"C:\Windows\System32" ) ;
48
+ #endif
41
49
var files = sysFolder . GetFiles ( "*.exe" ) ;
42
50
var fileIndex = 0 ;
43
51
Console . Pin ( ( ) => new [ ] { "m`This is pin!\n " , $ "g`Number of files: ", $ "W`{ fileIndex } " } ) ;
Original file line number Diff line number Diff line change 3
3
using System . IO ;
4
4
using System . Text ;
5
5
6
+ #if NETSTANDARD
7
+ #pragma warning disable CS8604 // Possible null reference argument.
8
+ #endif
9
+
6
10
namespace System
7
11
{
8
12
#if ! NETSTANDARD
@@ -1087,15 +1091,21 @@ public static void MoveBufferArea(
1087
1091
1088
1092
public static Stream OpenStandardError ( ) => Console . OpenStandardError ( ) ;
1089
1093
1094
+ #if ! NETSTANDARD1_3
1090
1095
public static Stream OpenStandardError ( int bufferSize ) => Console . OpenStandardError ( bufferSize : bufferSize ) ;
1096
+ #endif
1091
1097
1092
1098
public static Stream OpenStandardInput ( ) => Console . OpenStandardInput ( ) ;
1093
1099
1100
+ #if ! NETSTANDARD1_3
1094
1101
public static Stream OpenStandardInput ( int bufferSize ) => Console . OpenStandardInput ( bufferSize : bufferSize ) ;
1102
+ #endif
1095
1103
1096
1104
public static Stream OpenStandardOutput ( ) => Console . OpenStandardOutput ( ) ;
1097
1105
1106
+ #if ! NETSTANDARD1_3
1098
1107
public static Stream OpenStandardOutput ( int bufferSize ) => Console . OpenStandardOutput ( bufferSize : bufferSize ) ;
1108
+ #endif
1099
1109
1100
1110
public static int Read ( )
1101
1111
{
Original file line number Diff line number Diff line change 22
22
<None Include =" ..\README.md" Link =" Pack\README.md" Pack =" true" PackagePath =" " />
23
23
</ItemGroup >
24
24
25
+ <ItemGroup Condition =" '$(TargetFramework)' == 'netstandard1.3'" >
26
+ <PackageReference Include =" System.ValueTuple" Version =" 4.5.0" />
27
+ </ItemGroup >
28
+
25
29
</Project >
Original file line number Diff line number Diff line change 1
1
namespace System
2
2
{
3
+ #if ! NETSTANDARD
4
+ using System . Runtime . Versioning ;
5
+ [ SupportedOSPlatform ( "windows" ) ]
6
+ [ UnsupportedOSPlatform ( "android" ) ]
7
+ [ UnsupportedOSPlatform ( "browser" ) ]
8
+ [ UnsupportedOSPlatform ( "ios" ) ]
9
+ [ UnsupportedOSPlatform ( "tvos" ) ]
10
+ #endif
3
11
public struct XConsolePosition
4
12
{
5
13
public readonly int Left ;
You can’t perform that action at this time.
0 commit comments