WasmFunctionInfo
Namespace: Dotsider.Core.Analysis.Models
Assembly: Dotsider.Core.dll
A WebAssembly function, imported or defined in the code section.
public sealed record WasmFunctionInfo : IEquatable<WasmFunctionInfo>Inheritance
Section titled “Inheritance”Object → WasmFunctionInfo
Implements
Section titled “Implements”Constructors
Section titled “Constructors”WasmFunctionInfo(int, int?, string, string, bool, string?, string?, bool, IReadOnlyList<string>, long?, int, long?, int, IReadOnlyList<WasmLocalInfo>, IReadOnlyList<byte>, IReadOnlyList<byte>)
Section titled “WasmFunctionInfo(int, int?, string, string, bool, string?, string?, bool, IReadOnlyList<string>, long?, int, long?, int, IReadOnlyList<WasmLocalInfo>, IReadOnlyList<byte>, IReadOnlyList<byte>)”A WebAssembly function, imported or defined in the code section.
Parameters:
Index(Int32): The module-wide function index, including imported functions.TypeIndex(Nullable<Int32>): The function type index, when known.Name(String): The best display name for the function.NameSource(String): Where the display name came from.IsImported(Boolean): Whether the function is imported and has no body in this module.ImportModule(String): The import module for imported functions.ImportName(String): The import name for imported functions.IsExported(Boolean): Whether the function is exported.ExportNames(IReadOnlyList<String>): All export names that point at this function.BodyOffset(Nullable<Int64>): The file offset of the function body payload, including local declarations.BodySize(Int32): The body payload size in bytes.CodeOffset(Nullable<Int64>): The file offset of the first instruction byte after local declarations.CodeSize(Int32): The instruction byte count after local declarations.Locals(IReadOnlyList<WasmLocalInfo>): The function’s run-length encoded local declarations.ParamTypes(IReadOnlyList<Byte>): The raw Wasm parameter type bytes.ResultTypes(IReadOnlyList<Byte>): The raw Wasm result type bytes.
public WasmFunctionInfo(int Index, int? TypeIndex, string Name, string NameSource, bool IsImported, string? ImportModule, string? ImportName, bool IsExported, IReadOnlyList<string> ExportNames, long? BodyOffset, int BodySize, long? CodeOffset, int CodeSize, IReadOnlyList<WasmLocalInfo> Locals, IReadOnlyList<byte> ParamTypes, IReadOnlyList<byte> ResultTypes)Properties
Section titled “Properties”BodyOffset
Section titled “BodyOffset”The file offset of the function body payload, including local declarations.
Returns: Nullable<Int64>
public long? BodyOffset { get; init; }BodySize
Section titled “BodySize”The body payload size in bytes.
Returns: Int32
public int BodySize { get; init; }CodeOffset
Section titled “CodeOffset”The file offset of the first instruction byte after local declarations.
Returns: Nullable<Int64>
public long? CodeOffset { get; init; }CodeSize
Section titled “CodeSize”The instruction byte count after local declarations.
Returns: Int32
public int CodeSize { get; init; }ExportNames
Section titled “ExportNames”All export names that point at this function.
Returns: IReadOnlyList<String>
public IReadOnlyList<string> ExportNames { get; init; }ImportModule
Section titled “ImportModule”The import module for imported functions.
Returns: String
public string? ImportModule { get; init; }ImportName
Section titled “ImportName”The import name for imported functions.
Returns: String
public string? ImportName { get; init; }The module-wide function index, including imported functions.
Returns: Int32
public int Index { get; init; }IsExported
Section titled “IsExported”Whether the function is exported.
Returns: Boolean
public bool IsExported { get; init; }IsImported
Section titled “IsImported”Whether the function is imported and has no body in this module.
Returns: Boolean
public bool IsImported { get; init; }Locals
Section titled “Locals”The function’s run-length encoded local declarations.
Returns: IReadOnlyList<WasmLocalInfo>
public IReadOnlyList<WasmLocalInfo> Locals { get; init; }The best display name for the function.
Returns: String
public string Name { get; init; }NameSource
Section titled “NameSource”Where the display name came from.
Returns: String
public string NameSource { get; init; }ParamTypes
Section titled “ParamTypes”The raw Wasm parameter type bytes.
Returns: IReadOnlyList<Byte>
public IReadOnlyList<byte> ParamTypes { get; init; }ResultTypes
Section titled “ResultTypes”The raw Wasm result type bytes.
Returns: IReadOnlyList<Byte>
public IReadOnlyList<byte> ResultTypes { get; init; }TypeIndex
Section titled “TypeIndex”The function type index, when known.
Returns: Nullable<Int32>
public int? TypeIndex { get; init; }Methods
Section titled “Methods”Deconstruct(out int, out int?, out string, out string, out bool, out string?, out string?, out bool, out IReadOnlyList<string>, out long?, out int, out long?, out int, out IReadOnlyList<WasmLocalInfo>, out IReadOnlyList<byte>, out IReadOnlyList<byte>)
Section titled “Deconstruct(out int, out int?, out string, out string, out bool, out string?, out string?, out bool, out IReadOnlyList<string>, out long?, out int, out long?, out int, out IReadOnlyList<WasmLocalInfo>, out IReadOnlyList<byte>, out IReadOnlyList<byte>)”Parameters:
Index(Int32)TypeIndex(Nullable<Int32>)Name(String)NameSource(String)IsImported(Boolean)ImportModule(String)ImportName(String)IsExported(Boolean)ExportNames(IReadOnlyList<String>)BodyOffset(Nullable<Int64>)BodySize(Int32)CodeOffset(Nullable<Int64>)CodeSize(Int32)Locals(IReadOnlyList<WasmLocalInfo>)ParamTypes(IReadOnlyList<Byte>)ResultTypes(IReadOnlyList<Byte>)
public void Deconstruct(out int Index, out int? TypeIndex, out string Name, out string NameSource, out bool IsImported, out string? ImportModule, out string? ImportName, out bool IsExported, out IReadOnlyList<string> ExportNames, out long? BodyOffset, out int BodySize, out long? CodeOffset, out int CodeSize, out IReadOnlyList<WasmLocalInfo> Locals, out IReadOnlyList<byte> ParamTypes, out IReadOnlyList<byte> ResultTypes)Equals(object?)
Section titled “Equals(object?)”Parameters:
obj(Object)
Returns: Boolean
public override bool Equals(object? obj)Equals(WasmFunctionInfo?)
Section titled “Equals(WasmFunctionInfo?)”Parameters:
other(WasmFunctionInfo)
Returns: Boolean
public bool Equals(WasmFunctionInfo? other)GetHashCode()
Section titled “GetHashCode()”Returns: Int32
public override int GetHashCode()ToString()
Section titled “ToString()”Returns: String
public override string ToString()Members
Section titled “Members”operator !=(WasmFunctionInfo?, WasmFunctionInfo?)
Section titled “operator !=(WasmFunctionInfo?, WasmFunctionInfo?)”Parameters:
left(WasmFunctionInfo)right(WasmFunctionInfo)
Returns: Boolean
public static bool operator !=(WasmFunctionInfo? left, WasmFunctionInfo? right)operator ==(WasmFunctionInfo?, WasmFunctionInfo?)
Section titled “operator ==(WasmFunctionInfo?, WasmFunctionInfo?)”Parameters:
left(WasmFunctionInfo)right(WasmFunctionInfo)
Returns: Boolean
public static bool operator ==(WasmFunctionInfo? left, WasmFunctionInfo? right)