mirror of
https://github.com/SabreTools/SabreTools.Models.git
synced 2026-09-23 23:25:35 +00:00
Fix warnings from nullabilty
This commit is contained in:
@@ -16,46 +16,82 @@ namespace SabreTools.Models.NewExecutable
|
||||
/// <summary>
|
||||
/// MS-DOS executable stub
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public MSDOS.Executable Stub { get; set; }
|
||||
#else
|
||||
public MSDOS.Executable? Stub { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// New Executable header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ExecutableHeader Header { get; set; }
|
||||
#else
|
||||
public ExecutableHeader? Header { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Segment table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public SegmentTableEntry[] SegmentTable { get; set; }
|
||||
#else
|
||||
public SegmentTableEntry[]? SegmentTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Resource table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ResourceTable ResourceTable { get; set; }
|
||||
#else
|
||||
public ResourceTable? ResourceTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Resident-Name table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ResidentNameTableEntry[] ResidentNameTable { get; set; }
|
||||
#else
|
||||
public ResidentNameTableEntry[]? ResidentNameTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Module-Reference table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ModuleReferenceTableEntry[] ModuleReferenceTable { get; set; }
|
||||
#else
|
||||
public ModuleReferenceTableEntry[]? ModuleReferenceTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Imported-Name table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Dictionary<ushort, ImportedNameTableEntry> ImportedNameTable { get; set; }
|
||||
#else
|
||||
public Dictionary<ushort, ImportedNameTableEntry?>? ImportedNameTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Entry table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public EntryTableBundle[] EntryTable { get; set; }
|
||||
#else
|
||||
public EntryTableBundle[]? EntryTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Nonresident-Name table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public NonResidentNameTableEntry[] NonResidentNameTable { get; set; }
|
||||
#else
|
||||
public NonResidentNameTableEntry[]? NonResidentNameTable { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,11 @@ namespace SabreTools.Models.NewExecutable
|
||||
/// "E" is high-order byte.
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||
#if NET48
|
||||
public string Magic;
|
||||
#else
|
||||
public string? Magic;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Version number of the linker.
|
||||
|
||||
@@ -23,6 +23,10 @@ namespace SabreTools.Models.NewExecutable
|
||||
/// <summary>
|
||||
/// ASCII text of the name string.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] NameString;
|
||||
#else
|
||||
public byte[]? NameString;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,11 @@ namespace SabreTools.Models.NewExecutable
|
||||
/// <summary>
|
||||
/// ASCII text of the name string.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] NameString;
|
||||
#else
|
||||
public byte[]? NameString;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Ordinal number (index into entry table). This value is ignored
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
/// <summary>
|
||||
/// A table of relocation records follows.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public RelocationRecord[] RelocationRecords;
|
||||
#else
|
||||
public RelocationRecord[]? RelocationRecords;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,24 +37,40 @@ namespace SabreTools.Models.NewExecutable
|
||||
/// INTERNALREF
|
||||
/// </summary>
|
||||
/// <remarks>Must be <c>NULL</c> if <see cref="Flags"/> is not set to <see cref="RelocationRecordFlag.INTERNALREF"/></remarks>
|
||||
#if NET48
|
||||
public InternalRefRelocationRecord InternalRefRelocationRecord;
|
||||
#else
|
||||
public InternalRefRelocationRecord? InternalRefRelocationRecord;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// IMPORTNAME
|
||||
/// </summary>
|
||||
/// <remarks>Must be <c>NULL</c> if <see cref="Flags"/> is not set to <see cref="RelocationRecordFlag.IMPORTNAME"/></remarks>
|
||||
#if NET48
|
||||
public ImportNameRelocationRecord ImportNameRelocationRecord;
|
||||
#else
|
||||
public ImportNameRelocationRecord? ImportNameRelocationRecord;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// IMPORTORDINAL
|
||||
/// </summary>
|
||||
/// <remarks>Must be <c>NULL</c> if <see cref="Flags"/> is not set to <see cref="RelocationRecordFlag.IMPORTORDINAL"/></remarks>
|
||||
#if NET48
|
||||
public ImportOrdinalRelocationRecord ImportOrdinalRelocationRecord;
|
||||
#else
|
||||
public ImportOrdinalRelocationRecord? ImportOrdinalRelocationRecord;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// IMPORTORDINAL
|
||||
/// </summary>
|
||||
/// <remarks>Must be <c>NULL</c> if <see cref="Flags"/> is not set to <see cref="RelocationRecordFlag.OSFIXUP"/></remarks>
|
||||
#if NET48
|
||||
public OSFixupRelocationRecord OSFixupRelocationRecord;
|
||||
#else
|
||||
public OSFixupRelocationRecord? OSFixupRelocationRecord;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,11 @@ namespace SabreTools.Models.NewExecutable
|
||||
/// <summary>
|
||||
/// ASCII text of the name string.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] NameString;
|
||||
#else
|
||||
public byte[]? NameString;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Ordinal number (index into entry table). This value is ignored
|
||||
|
||||
@@ -25,12 +25,20 @@ namespace SabreTools.Models.NewExecutable
|
||||
/// <summary>
|
||||
/// A table of resource type information blocks follows.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ResourceTypeInformationEntry[] ResourceTypes;
|
||||
#else
|
||||
public ResourceTypeInformationEntry[]? ResourceTypes;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Resource type and name strings are stored at the end of the
|
||||
/// resource table.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Dictionary<ushort, ResourceTypeAndNameString> TypeAndNameStrings;
|
||||
#else
|
||||
public Dictionary<ushort, ResourceTypeAndNameString?>? TypeAndNameStrings;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,10 @@ namespace SabreTools.Models.NewExecutable
|
||||
/// <summary>
|
||||
/// ASCII text of the type or name string.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Text;
|
||||
#else
|
||||
public byte[]? Text;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,10 @@ namespace SabreTools.Models.NewExecutable
|
||||
/// <summary>
|
||||
/// A table of resources for this type follows.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ResourceTypeResourceEntry[] Resources;
|
||||
#else
|
||||
public ResourceTypeResourceEntry[]? Resources;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user