Null checks
This commit is contained in:
parent
81d6f268ee
commit
283001258f
@ -23,7 +23,8 @@ internal sealed class Inventory
|
||||
public IEnumerable<InventoryItem> GetAllItems() =>
|
||||
((IEnumerable)_getAllInventories.Invoke(_delegate, Array.Empty<object>())!)
|
||||
.Cast<IEnumerable>()
|
||||
.SelectMany(x => x.Cast<object>())
|
||||
.Select(x => new InventoryItem(x))
|
||||
.SelectMany(x => x.Cast<object?>())
|
||||
.Where(x => x != null)
|
||||
.Select(x => new InventoryItem(x!))
|
||||
.ToList();
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
namespace Influx.SubmarineTracker;
|
||||
|
||||
public class SubmarineStats
|
||||
public sealed class SubmarineStats
|
||||
{
|
||||
public string Name { get; init; }
|
||||
public int Id { get; init; }
|
||||
public ushort Level { get; init; }
|
||||
public required string Name { get; init; }
|
||||
public required int Id { get; init; }
|
||||
public required ushort Level { get; init; }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user