Fix a few warnings

This commit is contained in:
Halgari 2022-11-11 22:31:37 -07:00
parent 9bf5371a32
commit f7f8d318e3
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ namespace Wabbajack.CLI.Builder;
public class CommandLineBuilder public class CommandLineBuilder
{ {
private static IServiceProvider _provider; private static IServiceProvider _provider = null!;
public CommandLineBuilder(IServiceProvider provider) public CommandLineBuilder(IServiceProvider provider)
{ {
_provider = provider; _provider = provider;

View File

@ -9,9 +9,9 @@ public class ViewLocator : IDataTemplate
{ {
public bool SupportsRecycling => false; public bool SupportsRecycling => false;
public IControl Build(object data) public IControl Build(object? data)
{ {
var name = data.GetType().FullName!.Replace("ViewModel", "View"); var name = data!.GetType().FullName!.Replace("ViewModel", "View");
var type = Type.GetType(name); var type = Type.GetType(name);
if (type != null) if (type != null)
@ -19,7 +19,7 @@ public class ViewLocator : IDataTemplate
return new TextBlock {Text = "Not Found: " + name}; return new TextBlock {Text = "Not Found: " + name};
} }
public bool Match(object data) public bool Match(object? data)
{ {
return data is ViewModelBase; return data is ViewModelBase;
} }