Browse Source

change unfixed to warnings and fixed to errors, changed project settings to match

pull/3287/head
apmoskevitz 9 months ago
parent
commit
02827835cc
  1. 46
      .editorconfig
  2. 4
      ICSharpCode.BamlDecompiler/BamlDecompilerSettings.cs
  3. 1
      ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj
  4. 1
      ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj
  5. 14
      ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs
  6. 14
      ICSharpCode.Decompiler/Documentation/XmlDocLoader.cs
  7. 1
      ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj
  8. 2
      ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs
  9. 4
      ICSharpCode.Decompiler/Semantics/OperatorResolveResult.cs
  10. 2
      ICSharpCode.ILSpyCmd/ICSharpCode.ILSpyCmd.csproj
  11. 10
      ICSharpCode.ILSpyCmd/ValidationAttributes.cs
  12. 2
      ICSharpCode.ILSpyX/Analyzers/AnalyzerHelpers.cs
  13. 3
      ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj
  14. 4
      ICSharpCode.ILSpyX/TreeView/TreeTraversal.cs
  15. 1
      ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj
  16. 4
      ILSpy.BamlDecompiler/BamlResourceEntryNode.cs
  17. 1
      ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj
  18. 1
      ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj
  19. 4
      ILSpy.ReadyToRun/ReadyToRunOptionPage.xaml.cs
  20. 1
      ILSpy.Tests/ILSpy.Tests.csproj
  21. 4
      ILSpy/Controls/CustomDialog.cs
  22. 2
      ILSpy/Docking/DockWorkspace.cs
  23. 4
      ILSpy/TreeNodes/AssemblyListTreeNode.cs
  24. 2
      ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs
  25. 2
      TestPlugin/CustomOptionPage.xaml.cs
  26. 2
      TestPlugin/MainMenuCommand.cs
  27. 1
      TestPlugin/TestPlugin.csproj

46
.editorconfig

@ -152,12 +152,58 @@ dotnet_diagnostic.MEF006.severity = silent @@ -152,12 +152,58 @@ dotnet_diagnostic.MEF006.severity = silent
dotnet_diagnostic.IDE2003.severity = silent
#cleared null error types
dotnet_diagnostic.CS8597.severity = error
dotnet_diagnostic.CS8605.severity = error
dotnet_diagnostic.CS8606.severity = error
dotnet_diagnostic.CS8607.severity = error
dotnet_diagnostic.CS8608.severity = error
dotnet_diagnostic.CS8609.severity = error
dotnet_diagnostic.CS8610.severity = error
dotnet_diagnostic.CS8611.severity = error
dotnet_diagnostic.CS8612.severity = error
dotnet_diagnostic.CS8613.severity = error
dotnet_diagnostic.CS8614.severity = error
dotnet_diagnostic.CS8615.severity = error
dotnet_diagnostic.CS8621.severity = error
dotnet_diagnostic.CS8622.severity = error
dotnet_diagnostic.CS8624.severity = error
dotnet_diagnostic.CS8633.severity = error
dotnet_diagnostic.CS8634.severity = error
dotnet_diagnostic.CS8643.severity = error
dotnet_diagnostic.CS8644.severity = error
dotnet_diagnostic.CS8645.severity = error
dotnet_diagnostic.CS8655.severity = error
dotnet_diagnostic.CS8667.severity = error
dotnet_diagnostic.CS8670.severity = error
dotnet_diagnostic.CS8714.severity = error
dotnet_diagnostic.CS8762.severity = error
dotnet_diagnostic.CS8763.severity = error
dotnet_diagnostic.CS8764.severity = error
dotnet_diagnostic.CS8765.severity = error
dotnet_diagnostic.CS8766.severity = error
dotnet_diagnostic.CS8767.severity = error
dotnet_diagnostic.CS8768.severity = error
dotnet_diagnostic.CS8769.severity = error
dotnet_diagnostic.CS8770.severity = error
dotnet_diagnostic.CS8773.severity = error
dotnet_diagnostic.CS8774.severity = error
dotnet_diagnostic.CS8775.severity = error
dotnet_diagnostic.CS8776.severity = error
dotnet_diagnostic.CS8775.severity = error
dotnet_diagnostic.CS8777.severity = error
#nullable error types still not cleaned up
dotnet_diagnostic.CS8600.severity = warning
dotnet_diagnostic.CS8601.severity = warning
dotnet_diagnostic.CS8602.severity = warning
dotnet_diagnostic.CS8603.severity = warning
dotnet_diagnostic.CS8604.severity = warning
dotnet_diagnostic.CS8605.severity = warning
dotnet_diagnostic.CS8615.severity = warning
dotnet_diagnostic.CS8617.severity = warning
dotnet_diagnostic.CS8618.severity = warning
dotnet_diagnostic.CS8619.severity = warning
dotnet_diagnostic.CS8620.severity = warning
dotnet_diagnostic.CS8625.severity = warning
dotnet_diagnostic.CS8629.severity = warning
dotnet_diagnostic.CS8631.severity = warning

4
ICSharpCode.BamlDecompiler/BamlDecompilerSettings.cs

@ -37,9 +37,9 @@ namespace ICSharpCode.BamlDecompiler @@ -37,9 +37,9 @@ namespace ICSharpCode.BamlDecompiler
}
}
public event PropertyChangedEventHandler PropertyChanged;
public event PropertyChangedEventHandler? PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null)
{
if (PropertyChanged != null)
{

1
ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj

@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
<DebugSymbols>true</DebugSymbols>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>

1
ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<RootNamespace>ICSharpCode.Decompiler.PowerShell</RootNamespace>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>

14
ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs

@ -71,7 +71,7 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler @@ -71,7 +71,7 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler
public AssemblyReferenceClassifier AssemblyReferenceClassifier { get; }
public IDebugInfoProvider DebugInfoProvider { get; }
public IDebugInfoProvider? DebugInfoProvider { get; }
/// <summary>
/// The MSBuild ProjectGuid to use for the new project.
@ -106,9 +106,9 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler @@ -106,9 +106,9 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler
public WholeProjectDecompiler(
DecompilerSettings settings,
IAssemblyResolver assemblyResolver,
IProjectFileWriter projectWriter,
AssemblyReferenceClassifier assemblyReferenceClassifier,
IDebugInfoProvider debugInfoProvider)
IProjectFileWriter? projectWriter,
AssemblyReferenceClassifier? assemblyReferenceClassifier,
IDebugInfoProvider? debugInfoProvider)
: this(settings, Guid.NewGuid(), assemblyResolver, projectWriter, assemblyReferenceClassifier, debugInfoProvider)
{
}
@ -117,9 +117,9 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler @@ -117,9 +117,9 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler
DecompilerSettings settings,
Guid projectGuid,
IAssemblyResolver assemblyResolver,
IProjectFileWriter projectWriter,
AssemblyReferenceClassifier assemblyReferenceClassifier,
IDebugInfoProvider debugInfoProvider)
IProjectFileWriter? projectWriter,
AssemblyReferenceClassifier? assemblyReferenceClassifier,
IDebugInfoProvider? debugInfoProvider)
{
Settings = settings ?? throw new ArgumentNullException(nameof(settings));
ProjectGuid = projectGuid;

14
ICSharpCode.Decompiler/Documentation/XmlDocLoader.cs

@ -31,8 +31,8 @@ namespace ICSharpCode.Decompiler.Documentation @@ -31,8 +31,8 @@ namespace ICSharpCode.Decompiler.Documentation
/// </summary>
public static class XmlDocLoader
{
static readonly Lazy<XmlDocumentationProvider> mscorlibDocumentation = new Lazy<XmlDocumentationProvider>(LoadMscorlibDocumentation);
static readonly ConditionalWeakTable<MetadataFile, XmlDocumentationProvider> cache = new();
static readonly Lazy<XmlDocumentationProvider?> mscorlibDocumentation = new Lazy<XmlDocumentationProvider?>(LoadMscorlibDocumentation);
static readonly ConditionalWeakTable<MetadataFile, XmlDocumentationProvider?> cache = new();
static XmlDocumentationProvider? LoadMscorlibDocumentation()
{
@ -44,11 +44,11 @@ namespace ICSharpCode.Decompiler.Documentation @@ -44,11 +44,11 @@ namespace ICSharpCode.Decompiler.Documentation
return null;
}
public static XmlDocumentationProvider MscorlibDocumentation {
public static XmlDocumentationProvider? MscorlibDocumentation {
get { return mscorlibDocumentation.Value; }
}
public static XmlDocumentationProvider LoadDocumentation(MetadataFile module)
public static XmlDocumentationProvider? LoadDocumentation(MetadataFile module)
{
if (module == null)
throw new ArgumentNullException(nameof(module));
@ -56,7 +56,7 @@ namespace ICSharpCode.Decompiler.Documentation @@ -56,7 +56,7 @@ namespace ICSharpCode.Decompiler.Documentation
{
if (!cache.TryGetValue(module, out XmlDocumentationProvider? xmlDoc))
{
string xmlDocFile = LookupLocalizedXmlDoc(module.FileName);
string? xmlDocFile = LookupLocalizedXmlDoc(module.FileName);
if (xmlDocFile == null)
{
xmlDocFile = FindXmlDocumentation(Path.GetFileName(module.FileName), module.GetRuntime());
@ -79,9 +79,9 @@ namespace ICSharpCode.Decompiler.Documentation @@ -79,9 +79,9 @@ namespace ICSharpCode.Decompiler.Documentation
static readonly string referenceAssembliesPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Reference Assemblies\Microsoft\\Framework");
static readonly string frameworkPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), @"Microsoft.NET\Framework");
static string FindXmlDocumentation(string assemblyFileName, TargetRuntime runtime)
static string? FindXmlDocumentation(string assemblyFileName, TargetRuntime runtime)
{
string fileName;
string? fileName;
switch (runtime)
{
case TargetRuntime.Net_1_0:

1
ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj

@ -32,7 +32,6 @@ @@ -32,7 +32,6 @@
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>ICSharpCode.Decompiler.snk</AssemblyOriginatorKeyFile>
<NoWarn>1701;1702;1591;1573</NoWarn>
<WarningsAsErrors>nullable</WarningsAsErrors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DebugType>embedded</DebugType>

2
ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs

@ -447,7 +447,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -447,7 +447,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
return delegateType;
}
(Func<ILInstruction>?, IType) ConvertArrayIndex(CallInstruction invocation)
(Func<ILInstruction?>?, IType) ConvertArrayIndex(CallInstruction invocation)
{
if (invocation.Arguments.Count != 2)
return (null, SpecialType.UnknownType);

4
ICSharpCode.Decompiler/Semantics/OperatorResolveResult.cs

@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.Semantics @@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.Semantics
public class OperatorResolveResult : ResolveResult
{
readonly ExpressionType operatorType;
readonly IMethod userDefinedOperatorMethod;
readonly IMethod? userDefinedOperatorMethod;
readonly IList<ResolveResult> operands;
readonly bool isLiftedOperator;
@ -43,7 +43,7 @@ namespace ICSharpCode.Decompiler.Semantics @@ -43,7 +43,7 @@ namespace ICSharpCode.Decompiler.Semantics
this.operands = operands;
}
public OperatorResolveResult(IType resultType, ExpressionType operatorType, IMethod userDefinedOperatorMethod, bool isLiftedOperator, IList<ResolveResult> operands)
public OperatorResolveResult(IType resultType, ExpressionType operatorType, IMethod? userDefinedOperatorMethod, bool isLiftedOperator, IList<ResolveResult> operands)
: base(resultType)
{
if (operands == null)

2
ICSharpCode.ILSpyCmd/ICSharpCode.ILSpyCmd.csproj

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
<IsPackable>true</IsPackable>
<PackAsTool>true</PackAsTool>
<InvariantGlobalization>true</InvariantGlobalization>
<Nullable>enable</Nullable>
<NeutralLanguage>en-US</NeutralLanguage>
<GenerateAssemblyVersionAttribute>False</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>False</GenerateAssemblyFileVersionAttribute>

10
ICSharpCode.ILSpyCmd/ValidationAttributes.cs

@ -14,7 +14,7 @@ namespace ICSharpCode.ILSpyCmd @@ -14,7 +14,7 @@ namespace ICSharpCode.ILSpyCmd
{
}
protected override ValidationResult IsValid(object value, ValidationContext context)
protected override ValidationResult? IsValid(object? value, ValidationContext context)
{
if (value is ILSpyCmdProgram obj)
{
@ -30,7 +30,7 @@ namespace ICSharpCode.ILSpyCmd @@ -30,7 +30,7 @@ namespace ICSharpCode.ILSpyCmd
[AttributeUsage(AttributeTargets.Property)]
public sealed class FileExistsOrNullAttribute : ValidationAttribute
{
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
protected override ValidationResult? IsValid(object? value, ValidationContext validationContext)
{
var path = value as string;
if (string.IsNullOrEmpty(path))
@ -55,7 +55,7 @@ namespace ICSharpCode.ILSpyCmd @@ -55,7 +55,7 @@ namespace ICSharpCode.ILSpyCmd
[AttributeUsage(AttributeTargets.Property)]
public sealed class FilesExistAttribute : ValidationAttribute
{
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
protected override ValidationResult? IsValid(object? value, ValidationContext validationContext)
{
switch (value)
{
@ -65,7 +65,7 @@ namespace ICSharpCode.ILSpyCmd @@ -65,7 +65,7 @@ namespace ICSharpCode.ILSpyCmd
{
foreach (string path in paths)
{
ValidationResult result = ValidatePath(path);
ValidationResult? result = ValidatePath(path);
if (result != ValidationResult.Success)
return result;
}
@ -75,7 +75,7 @@ namespace ICSharpCode.ILSpyCmd @@ -75,7 +75,7 @@ namespace ICSharpCode.ILSpyCmd
return new ValidationResult($"File '{value}' does not exist!");
}
ValidationResult ValidatePath(string path)
ValidationResult? ValidatePath(string path)
{
if (!string.IsNullOrWhiteSpace(path))
{

2
ICSharpCode.ILSpyX/Analyzers/AnalyzerHelpers.cs

@ -54,7 +54,7 @@ namespace ICSharpCode.ILSpyX.Analyzers @@ -54,7 +54,7 @@ namespace ICSharpCode.ILSpyX.Analyzers
switch (customAttribute.Parent.Kind)
{
case HandleKind.MethodDefinition:
IMethod parent = (IMethod)ts.MainModule.ResolveEntity(customAttribute.Parent);
IMethod? parent = (IMethod?)ts.MainModule.ResolveEntity(customAttribute.Parent);
return parent?.AccessorOwner ?? parent;
case HandleKind.FieldDefinition:
case HandleKind.PropertyDefinition:

3
ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj

@ -4,8 +4,7 @@ @@ -4,8 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<WarningsAsErrors>nullable</WarningsAsErrors>
<Nullable>enable</Nullable>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.snk</AssemblyOriginatorKeyFile>

4
ICSharpCode.ILSpyX/TreeView/TreeTraversal.cs

@ -43,7 +43,7 @@ namespace ICSharpCode.ILSpyX.TreeView @@ -43,7 +43,7 @@ namespace ICSharpCode.ILSpyX.TreeView
/// <param name="input">The root elements of the forest.</param>
/// <param name="recursion">The function that gets the children of an element.</param>
/// <returns>Iterator that enumerates the tree structure in pre-order.</returns>
public static IEnumerable<T> PreOrder<T>(IEnumerable<T> input, Func<T, IEnumerable<T>> recursion)
public static IEnumerable<T> PreOrder<T>(IEnumerable<T> input, Func<T, IEnumerable<T>?> recursion)
{
Stack<IEnumerator<T>> stack = new Stack<IEnumerator<T>>();
try
@ -55,7 +55,7 @@ namespace ICSharpCode.ILSpyX.TreeView @@ -55,7 +55,7 @@ namespace ICSharpCode.ILSpyX.TreeView
{
T element = stack.Peek().Current;
yield return element;
IEnumerable<T> children = recursion(element);
IEnumerable<T>? children = recursion(element);
if (children != null)
{
stack.Push(children.GetEnumerator());

1
ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
<PropertyGroup>
<IsWindowsX64 Condition="$([MSBuild]::IsOsPlatform('Windows')) And $([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture) == X64">true</IsWindowsX64>
<IsWindowsARM64 Condition="$([MSBuild]::IsOsPlatform('Windows')) And $([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture) == ARM64">true</IsWindowsARM64>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>

4
ILSpy.BamlDecompiler/BamlResourceEntryNode.cs

@ -33,13 +33,13 @@ namespace ILSpy.BamlDecompiler @@ -33,13 +33,13 @@ namespace ILSpy.BamlDecompiler
{
public sealed class BamlResourceEntryNode : ResourceEntryNode
{
public BamlResourceEntryNode(string key, Func<Stream> data) : base(key, data)
public BamlResourceEntryNode(string key, Func<Stream?> data) : base(key, data)
{
}
public override bool View(TabPageModel tabPage)
{
IHighlightingDefinition highlighting = null;
IHighlightingDefinition? highlighting = null;
tabPage.SupportsLanguageSwitching = false;
tabPage.ShowTextView(textView => textView.RunWithCancellation(

1
ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
<BaseAddress>6488064</BaseAddress>
<UseWpf>true</UseWpf>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">

1
ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj

@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
<UseWpf>true</UseWpf>
<IsPackable>false</IsPackable>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">

4
ILSpy.ReadyToRun/ReadyToRunOptionPage.xaml.cs

@ -114,9 +114,9 @@ namespace ICSharpCode.ILSpy.ReadyToRun @@ -114,9 +114,9 @@ namespace ICSharpCode.ILSpy.ReadyToRun
}
}
public event PropertyChangedEventHandler PropertyChanged;
public event PropertyChangedEventHandler? PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
protected virtual void OnPropertyChanged(string? propertyName)
{
if (PropertyChanged != null)
{

1
ILSpy.Tests/ILSpy.Tests.csproj

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">

4
ILSpy/Controls/CustomDialog.cs

@ -113,9 +113,9 @@ namespace ICSharpCode.ILSpy.Controls @@ -113,9 +113,9 @@ namespace ICSharpCode.ILSpy.Controls
}
}
void ButtonClick(object sender, EventArgs e)
void ButtonClick(object? sender, EventArgs e)
{
result = (int)((Control)sender).Tag;
result = ((int?)(sender as Control)?.Tag) ?? -1;
this.Close();
}

2
ILSpy/Docking/DockWorkspace.cs

@ -82,7 +82,7 @@ namespace ICSharpCode.ILSpy.Docking @@ -82,7 +82,7 @@ namespace ICSharpCode.ILSpy.Docking
}
}
private void Documents_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
private void Documents_CollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
{
var collection = (PaneCollection<TabPageModel>)sender;
if (e.Action == NotifyCollectionChangedAction.Add)

4
ILSpy/TreeNodes/AssemblyListTreeNode.cs

@ -203,7 +203,9 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -203,7 +203,9 @@ namespace ICSharpCode.ILSpy.TreeNodes
}
return null;
static SharpTreeNodeCollection? ExpandAndGetChildren(SharpTreeNode node)
static SharpTreeNodeCollection ExpandAndGetChildren(SharpTreeNode node)
{
if (node is not PackageFolderTreeNode)
return null;

2
ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs

@ -50,7 +50,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -50,7 +50,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
sealed class CursorResourceEntryNode : ResourceEntryNode
{
public CursorResourceEntryNode(string key, Func<Stream> openStream)
public CursorResourceEntryNode(string key, Func<Stream?> openStream)
: base(key, openStream)
{
}

2
TestPlugin/CustomOptionPage.xaml.cs

@ -86,7 +86,7 @@ namespace TestPlugin @@ -86,7 +86,7 @@ namespace TestPlugin
}
}
public event PropertyChangedEventHandler PropertyChanged;
public event PropertyChangedEventHandler? PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
{

2
TestPlugin/MainMenuCommand.cs

@ -21,7 +21,7 @@ namespace TestPlugin @@ -21,7 +21,7 @@ namespace TestPlugin
[PartCreationPolicy(CreationPolicy.Shared)]
public class UnloadAllAssembliesCommand : SimpleCommand
{
public override void Execute(object parameter)
public override void Execute(object? parameter)
{
foreach (var loadedAssembly in MainWindow.Instance.CurrentAssemblyList.GetAssemblies())
{

1
TestPlugin/TestPlugin.csproj

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
<AssemblyName>Test.Plugin</AssemblyName>
<UseWpf>true</UseWpf>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">

Loading…
Cancel
Save