mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-22 23:05:12 +00:00
Handle nullable better
This commit is contained in:
@@ -18,22 +18,22 @@ namespace SabreTools.Serialization.Wrappers
|
||||
/// <summary>
|
||||
/// Number of components in the cabinet set
|
||||
/// </summary>
|
||||
public int ComponentCount => Model.Components!.Length;
|
||||
public int ComponentCount => Model.Components?.Length ?? 0;
|
||||
|
||||
/// <summary>
|
||||
/// Number of directories in the cabinet set
|
||||
/// </summary>
|
||||
public ushort DirectoryCount => Model.Descriptor!.DirectoryCount;
|
||||
public ushort DirectoryCount => Model.Descriptor?.DirectoryCount ?? 0;
|
||||
|
||||
/// <summary>
|
||||
/// Number of files in the cabinet set
|
||||
/// </summary>
|
||||
public uint FileCount => Model.Descriptor!.FileCount;
|
||||
public uint FileCount => Model.Descriptor?.FileCount ?? 0;
|
||||
|
||||
/// <summary>
|
||||
/// Number of file groups in the cabinet set
|
||||
/// </summary>
|
||||
public int FileGroupCount => Model.FileGroups!.Length;
|
||||
public int FileGroupCount => Model.FileGroups?.Length ?? 0;
|
||||
|
||||
/// <summary>
|
||||
/// The major version of the cabinet
|
||||
|
||||
Reference in New Issue
Block a user