Fix some misconfigured framework gating

This commit is contained in:
Matt Nadareski
2024-11-29 22:20:46 -05:00
parent ae49950ae6
commit dde5a57136
9 changed files with 13 additions and 17 deletions

View File

@@ -20,7 +20,7 @@ namespace InfoPrint
/// </summary>
public List<string> InputPaths { get; private set; } = [];
#if NETCOREAPP3_1_OR_GREATER
#if NETCOREAPP
/// <summary>
/// Enable JSON output
/// </summary>
@@ -76,7 +76,7 @@ namespace InfoPrint
case "-j":
case "--json":
#if NET6_0_OR_GREATER
#if NETCOREAPP
options.Json = true;
#else
Console.WriteLine("JSON output not available in .NET Framework");
@@ -111,7 +111,7 @@ namespace InfoPrint
Console.WriteLine("Options:");
Console.WriteLine("-?, -h, --help Display this help text and quit");
Console.WriteLine("-d, --debug Enable debug mode");
#if NET6_0_OR_GREATER
#if NETCOREAPP
Console.WriteLine("-j, --json Print info as JSON");
#endif
}

View File

@@ -95,7 +95,7 @@ namespace InfoPrint
// Get the base info output name
string filenameBase = $"info-{DateTime.Now:yyyy-MM-dd_HHmmss.ffff}";
#if NET6_0_OR_GREATER
#if NETCOREAPP
// If we have the JSON flag
if (json)
{

View File

@@ -1,4 +1,4 @@
#if !NETFRAMEWORK
#if NETCOREAPP
using System;
using System.Reflection;

View File

@@ -1,4 +1,4 @@
#if !NETFRAMEWORK
#if NETCOREAPP
using System;
using System.Reflection;

View File

@@ -136,11 +136,7 @@ namespace SabreTools.Serialization.Deserializers
dat.Games ??= new Games();
// If the line doesn't contain the delimiter
#if NETFRAMEWORK
if (!(reader.CurrentLine?.Contains("¬") ?? false))
#else
if (!(reader.CurrentLine?.Contains('¬') ?? false))
#endif
if (!(reader.CurrentLine?.Contains("¬") ?? false))
continue;
// Otherwise, separate out the line

View File

@@ -10,7 +10,7 @@ namespace SabreTools.Serialization.Interfaces
/// </summary>
string Description();
#if !NETFRAMEWORK
#if NETCOREAPP
/// <summary>
/// Export the item information as JSON
/// </summary>

View File

@@ -1,4 +1,4 @@
#if !NETFRAMEWORK
#if NETCOREAPP
using System;

View File

@@ -71,7 +71,7 @@ namespace SabreTools.Serialization
};
}
#if NET6_0_OR_GREATER
#if NETCOREAPP
/// <summary>
/// Export the item information as JSON
/// </summary>

View File

@@ -23,7 +23,7 @@ namespace SabreTools.Serialization.Wrappers
#region JSON Export
#if !NETFRAMEWORK
#if NETCOREAPP
/// <summary>
/// Export the item information as JSON
/// </summary>
@@ -77,7 +77,7 @@ namespace SabreTools.Serialization.Wrappers
/// <remarks>This is only populated if <see cref="_dataSource"/> is <see cref="DataSource.Stream"/></remarks>
protected Stream? _streamData = null;
#if !NETFRAMEWORK
#if NETCOREAPP
/// <summary>
/// JSON serializer options for output printing
/// </summary>
@@ -364,7 +364,7 @@ namespace SabreTools.Serialization.Wrappers
#region JSON Export
#if !NETFRAMEWORK
#if NETCOREAPP
/// <summary>
/// Export the item information as JSON
/// </summary>