Override Marshal.SizeOf in Helpers and use it instead of System's.

This commit is contained in:
2019-03-01 07:35:22 +00:00
parent 0ec558da55
commit e14c19279a
116 changed files with 1138 additions and 1182 deletions

View File

@@ -39,6 +39,13 @@ namespace DiscImageChef.Helpers
/// <summary>Provides methods to marshal binary data into C# structs</summary>
public static class Marshal
{
/// <summary>
/// Returns the size of an unmanaged type in bytes.
/// </summary>
/// <typeparam name="T">The type whose size is to be returned.</typeparam>
/// <returns>The size, in bytes, of the type that is specified by the <see cref="T" /> generic type parameter.</returns>
public static int SizeOf<T>() => System.Runtime.InteropServices.Marshal.SizeOf<T>();
/// <summary>
/// Marshal little-endian binary data to a structure
/// </summary>