Ensure more correct nullability

This commit is contained in:
Matt Nadareski
2023-09-10 20:47:25 -04:00
parent 89ba5f4508
commit e3c5c76ee5
39 changed files with 84 additions and 84 deletions

View File

@@ -19,14 +19,14 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public AssemblyIdentity[] AssemblyIdentities;
#else
public AssemblyIdentity[]? AssemblyIdentities;
public AssemblyIdentity?[]? AssemblyIdentities;
#endif
[XmlElement("noInheritable")]
#if NET48
public AssemblyNoInheritable[] NoInheritables;
#else
public AssemblyNoInheritable[]? NoInheritables;
public AssemblyNoInheritable?[]? NoInheritables;
#endif
#endregion
@@ -54,35 +54,35 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public AssemblyCOMInterfaceExternalProxyStub[] COMInterfaceExternalProxyStub;
#else
public AssemblyCOMInterfaceExternalProxyStub[]? COMInterfaceExternalProxyStub;
public AssemblyCOMInterfaceExternalProxyStub?[]? COMInterfaceExternalProxyStub;
#endif
[XmlElement("dependency")]
#if NET48
public AssemblyDependency[] Dependency;
#else
public AssemblyDependency[]? Dependency;
public AssemblyDependency?[]? Dependency;
#endif
[XmlElement("file")]
#if NET48
public AssemblyFile[] File;
#else
public AssemblyFile[]? File;
public AssemblyFile?[]? File;
#endif
[XmlElement("clrClass")]
#if NET48
public AssemblyCommonLanguageRuntimeClass[] CLRClass;
#else
public AssemblyCommonLanguageRuntimeClass[]? CLRClass;
public AssemblyCommonLanguageRuntimeClass?[]? CLRClass;
#endif
[XmlElement("clrSurrogate")]
#if NET48
public AssemblyCommonLanguageSurrogateClass[] CLRSurrogate;
#else
public AssemblyCommonLanguageSurrogateClass[]? CLRSurrogate;
public AssemblyCommonLanguageSurrogateClass?[]? CLRSurrogate;
#endif
#endregion
@@ -177,7 +177,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public AssemblyProgID[] ProgIDs;
#else
public AssemblyProgID[]? ProgIDs;
public AssemblyProgID?[]? ProgIDs;
#endif
}
@@ -329,7 +329,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public AssemblyProgID[] ProgIDs;
#else
public AssemblyProgID[]? ProgIDs;
public AssemblyProgID?[]? ProgIDs;
#endif
}
@@ -390,7 +390,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public AssemblyBindingRedirect[] BindingRedirect;
#else
public AssemblyBindingRedirect[]? BindingRedirect;
public AssemblyBindingRedirect?[]? BindingRedirect;
#endif
}
@@ -486,28 +486,28 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public AssemblyCOMClass[] COMClass;
#else
public AssemblyCOMClass[]? COMClass;
public AssemblyCOMClass?[]? COMClass;
#endif
[XmlElement("comInterfaceProxyStub")]
#if NET48
public AssemblyCOMInterfaceProxyStub[] COMInterfaceProxyStub;
#else
public AssemblyCOMInterfaceProxyStub[]? COMInterfaceProxyStub;
public AssemblyCOMInterfaceProxyStub?[]? COMInterfaceProxyStub;
#endif
[XmlElement("typelib")]
#if NET48
public AssemblyTypeLib[] Typelib;
#else
public AssemblyTypeLib[]? Typelib;
public AssemblyTypeLib?[]? Typelib;
#endif
[XmlElement("windowClass")]
#if NET48
public AssemblyWindowClass[] WindowClass;
#else
public AssemblyWindowClass[]? WindowClass;
public AssemblyWindowClass?[]? WindowClass;
#endif
#endregion

View File

@@ -49,7 +49,7 @@
#if NET48
public BaseRelocationTypeOffsetFieldEntry[] TypeOffsetFieldEntries;
#else
public BaseRelocationTypeOffsetFieldEntry[]? TypeOffsetFieldEntries;
public BaseRelocationTypeOffsetFieldEntry?[]? TypeOffsetFieldEntries;
#endif
}
}

View File

@@ -36,7 +36,7 @@
#if NET48
public DebugDirectoryEntry[] DebugDirectoryTable;
#else
public DebugDirectoryEntry[]? DebugDirectoryTable;
public DebugDirectoryEntry?[]? DebugDirectoryTable;
#endif
}
}

View File

@@ -42,7 +42,7 @@
#if NET48
public DialogItemTemplate[] DialogItemTemplates;
#else
public DialogItemTemplate[]? DialogItemTemplates;
public DialogItemTemplate?[]? DialogItemTemplates;
#endif
/// <summary>
@@ -54,7 +54,7 @@
#if NET48
public DialogItemTemplateExtended[] ExtendedDialogItemTemplates;
#else
public DialogItemTemplateExtended[]? ExtendedDialogItemTemplates;
public DialogItemTemplateExtended?[]? ExtendedDialogItemTemplates;
#endif
#endregion

View File

@@ -59,7 +59,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public SectionHeader[] SectionTable { get; set; }
#else
public SectionHeader[]? SectionTable { get; set; }
public SectionHeader?[]? SectionTable { get; set; }
#endif
/// <summary>
@@ -68,7 +68,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public COFFSymbolTableEntry[] COFFSymbolTable { get; set; }
#else
public COFFSymbolTableEntry[]? COFFSymbolTable { get; set; }
public COFFSymbolTableEntry?[]? COFFSymbolTable { get; set; }
#endif
/// <summary>
@@ -86,7 +86,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public AttributeCertificateTableEntry[] AttributeCertificateTable { get; set; }
#else
public AttributeCertificateTableEntry[]? AttributeCertificateTable { get; set; }
public AttributeCertificateTableEntry?[]? AttributeCertificateTable { get; set; }
#endif
/// <summary>
@@ -110,7 +110,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public BaseRelocationBlock[] BaseRelocationTable { get; set; }
#else
public BaseRelocationBlock[]? BaseRelocationTable { get; set; }
public BaseRelocationBlock?[]? BaseRelocationTable { get; set; }
#endif
/// <summary>

View File

@@ -34,7 +34,7 @@
#if NET48
public ExportAddressTableEntry[] ExportAddressTable;
#else
public ExportAddressTableEntry[]? ExportAddressTable;
public ExportAddressTableEntry?[]? ExportAddressTable;
#endif
/// <summary>

View File

@@ -19,7 +19,7 @@
#if NET48
public DirEntry[] DE;
#else
public DirEntry[]? DE;
public DirEntry?[]? DE;
#endif
}
}

View File

@@ -26,7 +26,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public ImportDirectoryTableEntry[] ImportDirectoryTable;
#else
public ImportDirectoryTableEntry[]? ImportDirectoryTable;
public ImportDirectoryTableEntry?[]? ImportDirectoryTable;
#endif
/// <summary>
@@ -55,7 +55,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public HintNameTableEntry[] HintNameTable;
#else
public HintNameTableEntry[]? HintNameTable;
public HintNameTableEntry?[]? HintNameTable;
#endif
}
}

View File

@@ -39,7 +39,7 @@
#if NET48
public MenuItem[] MenuItems;
#else
public MenuItem[]? MenuItems;
public MenuItem?[]? MenuItems;
#endif
/// <summary>
@@ -48,7 +48,7 @@
#if NET48
public MenuItemExtended[] ExtendedMenuItems;
#else
public MenuItemExtended[]? ExtendedMenuItems;
public MenuItemExtended?[]? ExtendedMenuItems;
#endif
#endregion

View File

@@ -20,7 +20,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public MessageResourceBlock[] Blocks;
#else
public MessageResourceBlock[]? Blocks;
public MessageResourceBlock?[]? Blocks;
#endif
/// <summary>

View File

@@ -60,7 +60,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public ResourceDirectoryEntry[] Entries;
#else
public ResourceDirectoryEntry[]? Entries;
public ResourceDirectoryEntry?[]? Entries;
#endif
}
}

View File

@@ -111,7 +111,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public COFFRelocation[] COFFRelocations;
#else
public COFFRelocation[]? COFFRelocations;
public COFFRelocation?[]? COFFRelocations;
#endif
/// <summary>
@@ -120,7 +120,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public COFFLineNumber[] COFFLineNumbers;
#else
public COFFLineNumber[]? COFFLineNumbers;
public COFFLineNumber?[]? COFFLineNumbers;
#endif
}
}

View File

@@ -70,7 +70,7 @@ namespace SabreTools.Models.PortableExecutable
#if NET48
public SecuROMAddDEntry[] Entries;
#else
public SecuROMAddDEntry[]? Entries;
public SecuROMAddDEntry?[]? Entries;
#endif
}
}

View File

@@ -45,7 +45,7 @@
#if NET48
public StringTable[] Children;
#else
public StringTable[]? Children;
public StringTable?[]? Children;
#endif
}
}

View File

@@ -48,7 +48,7 @@
#if NET48
public StringData[] Children;
#else
public StringData[]? Children;
public StringData?[]? Children;
#endif
}
}

View File

@@ -43,7 +43,7 @@
#if NET48
public VarData[] Children;
#else
public VarData[]? Children;
public VarData?[]? Children;
#endif
}
}