Prepare for nullability annotation in BizHawk.Common

attributes: https://docs.microsoft.com/en-us/dotnet/csharp/nullable-attributes
This commit is contained in:
YoshiRulz 2020-01-23 10:21:03 +10:00
parent 97cb9b47f1
commit 8de0355228
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
39 changed files with 109 additions and 25 deletions

View File

@ -1,3 +1,5 @@
#nullable disable
using System;
using System.IO;
using System.Collections.Generic;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;

View File

@ -1,3 +1,5 @@
#nullable disable
using System.Diagnostics;
namespace BizHawk.Common

View File

@ -1,4 +1,6 @@
namespace BizHawk.Common
#nullable disable
namespace BizHawk.Common
{
public static class BitReverse
{

View File

@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Common.abs.props" />
<Import Project="../CommonNullable.abs.props" />
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>../output/dll</OutputPath>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;netcoreapp3.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" PrivateAssets="All" />

View File

@ -1,3 +1,5 @@
#nullable disable
using System;
using System.Runtime.InteropServices;

View File

@ -1,4 +1,6 @@
namespace BizHawk.Common
#nullable disable
namespace BizHawk.Common
{
// we could get a little list of crcs from here and make it clear which crc this class was for, and expose others
// http://www.ross.net/crc/download/crc_v3.txt

View File

@ -1,4 +1,6 @@
namespace BizHawk.Common
#nullable disable
namespace BizHawk.Common
{
public static class Colors
{

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Globalization;
using System.IO;
using System.Text;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Collections.Generic;
namespace BizHawk.Common.CollectionExtensions

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.IO;
using System.Text;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Linq;
namespace BizHawk.Common.NumberExtensions

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
namespace BizHawk.Common
{

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Collections.Generic;
using System.IO;

View File

@ -1,3 +1,5 @@
#nullable disable
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Collections.Generic;
namespace BizHawk.Common

View File

@ -1,3 +1,5 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Diagnostics;
namespace BizHawk.Common

View File

@ -1,3 +1,5 @@
#nullable disable
using System;
using System.IO;

View File

@ -1,3 +1,5 @@
#nullable disable
using System;
using System.Linq;
using System.Collections.Generic;

View File

@ -1,4 +1,6 @@
using System.Collections.Generic;
#nullable disable
using System.Collections.Generic;
using System.Linq;
namespace BizHawk.Common

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;

View File

@ -1,3 +1,5 @@
#nullable disable
using System;
using System.Runtime.InteropServices;

View File

@ -1,3 +1,5 @@
#nullable disable
namespace BizHawk.Common
{
/// <remarks>This code (and an import for <see cref="Win32Imports.DeleteFileW"/>) is duplicated in each executable project because it needs to be used before loading assemblies.</remarks>

View File

@ -1,3 +1,5 @@
#nullable disable
using System.Runtime.InteropServices;
namespace BizHawk.Common

View File

@ -1,3 +1,5 @@
#nullable disable
using System;
using System.Runtime.InteropServices;
using System.Text;

View File

@ -1,3 +1,5 @@
#nullable disable
using System;
using System.Runtime.InteropServices;

View File

@ -1,4 +1,6 @@
using System;
#nullable disable
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;

9
CommonNullable.abs.props Normal file
View File

@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<!--<PackageReference Include="Nullable" Version="1.2.0" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers" />-->
<PackageReference Include="Nullable" Version="1.2.0" PrivateAssets="all" />
</ItemGroup>
</Project>

View File

@ -1,3 +1,5 @@
#nullable disable
using System.IO;
internal static class VersionInfo