mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Override Marshal.SizeOf in Helpers and use it instead of System's.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user