Skip to content

Commit 407285e

Browse files
committed
Remove PINVOKE Constants
1 parent 3caf0ef commit 407285e

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

src/Serilog.Sinks.Console/Serilog.Sinks.Console.csproj

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Description>A Serilog sink that writes log events to the console/terminal.</Description>
55
<VersionPrefix>4.0.0</VersionPrefix>
66
<Authors>Serilog Contributors</Authors>
7-
<TargetFrameworks>net45;netstandard1.3;netstandard2.0;netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
7+
<TargetFrameworks>net45;netstandard1.3;netstandard2.0;</TargetFrameworks>
88
<AssemblyName>Serilog.Sinks.Console</AssemblyName>
99
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile>
1010
<SignAssembly>true</SignAssembly>
@@ -20,16 +20,12 @@
2020
<GenerateAssemblyFileVersionAttribute>true</GenerateAssemblyFileVersionAttribute>
2121
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2222
<!-- Don't reference the full NETStandard.Library -->
23-
<DisableImplicitFrameworkReferences Condition=" '$(TargetFramework)' != 'netstandard2.0' And '$(TargetFramework)' != 'netcoreapp2.0' ">true</DisableImplicitFrameworkReferences>
23+
<DisableImplicitFrameworkReferences Condition=" '$(TargetFramework)' != 'netstandard2.0' ">true</DisableImplicitFrameworkReferences>
2424
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
2525
<TreatSpecificWarningsAsErrors />
2626
<RootNamespace>Serilog</RootNamespace>
2727
</PropertyGroup>
2828

29-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.1' OR '$(TargetFramework)' == 'netcoreapp2.0' ">
30-
<DefineConstants>$(DefineConstants);PINVOKE</DefineConstants>
31-
</PropertyGroup>
32-
3329
<PropertyGroup Condition=" '$(TargetFramework)' != 'net45' ">
3430
<DefineConstants>$(DefineConstants);RUNTIME_INFORMATION</DefineConstants>
3531
</PropertyGroup>

src/Serilog.Sinks.Console/Sinks/SystemConsole/Platform/WindowsConsole.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#if PINVOKE
1615
using System;
1716
using System.Runtime.InteropServices;
18-
#endif
1917

2018
namespace Serilog.Sinks.SystemConsole.Platform
2119
{
2220
static class WindowsConsole
2321
{
24-
#if PINVOKE
2522
public static void EnableVirtualTerminalProcessing()
2623
{
2724
#if RUNTIME_INFORMATION
@@ -50,10 +47,6 @@ public static void EnableVirtualTerminalProcessing()
5047

5148
[DllImport("kernel32.dll", SetLastError = true)]
5249
static extern bool SetConsoleMode(IntPtr handle, uint mode);
53-
#else
54-
public static void EnableVirtualTerminalProcessing()
55-
{
56-
}
57-
#endif
50+
5851
}
5952
}

0 commit comments

Comments
 (0)