Fixed some null errors

This commit is contained in:
2024-04-09 20:40:18 +03:00
parent 0323c888b3
commit 123e8e90a1
5 changed files with 18 additions and 19 deletions

View File

@@ -9,14 +9,15 @@ public class PluginLoadResultData
public string? ErrorMessage { get; init; }
public bool IsSuccess { get; init; }
public object? Plugin { get; init; }
public object Plugin { get; init; }
public PluginLoadResultData(string pluginName, PluginType pluginType, bool isSuccess, string? errorMessage = null, object plugin = null)
public PluginLoadResultData(string pluginName, PluginType pluginType, bool isSuccess, string? errorMessage = null,
object? plugin = null)
{
PluginName = pluginName;
PluginType = pluginType;
IsSuccess = isSuccess;
ErrorMessage = errorMessage;
Plugin = plugin;
Plugin = plugin is null ? new() : plugin;
}
}