Show / Hide Table of Contents

Class Util

Class providing various helper methods for use in Dalamud and plugins.

Inheritance
System.Object
Util
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Dalamud.Utility
Assembly: Dalamud.dll
Syntax
public static class Util

Properties

| Improve this Doc View Source

AssemblyVersion

Gets the assembly version of Dalamud.

Declaration
public static string AssemblyVersion { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

ByteArrayToHex(Byte[], Int32, Int32)

Create a hexdump of the provided bytes.

Declaration
public static string ByteArrayToHex(byte[] bytes, int offset = 0, int bytesPerLine = 16)
Parameters
Type Name Description
System.Byte[] bytes

The bytes to hexdump.

System.Int32 offset

The offset in the byte array to start at.

System.Int32 bytesPerLine

The amount of bytes to display per line.

Returns
Type Description
System.String

The generated hexdump in string form.

| Improve this Doc View Source

DumpMemory(IntPtr, Int32)

Read memory from an offset and hexdump them via Serilog.

Declaration
public static void DumpMemory(IntPtr offset, int len = 512)
Parameters
Type Name Description
System.IntPtr offset

The offset to read from.

System.Int32 len

The length to read.

| Improve this Doc View Source

Fatal(String, String)

Display an error MessageBox and exit the current process.

Declaration
public static void Fatal(string message, string caption)
Parameters
Type Name Description
System.String message

MessageBox body.

System.String caption

MessageBox caption (title).

| Improve this Doc View Source

GetGitHash()

Gets the git hash value from the assembly or null if it cannot be found.

Declaration
public static string GetGitHash()
Returns
Type Description
System.String

The git hash of the assembly.

| Improve this Doc View Source

GetUTF8String(Byte[])

Retrieve a UTF8 string from a null terminated byte array.

Declaration
public static string GetUTF8String(byte[] array)
Parameters
Type Name Description
System.Byte[] array

A null terminated UTF8 byte array.

Returns
Type Description
System.String

A UTF8 encoded string.

| Improve this Doc View Source

ShowObject(Object)

Show all properties and fields of the provided object via ImGui.

Declaration
public static void ShowObject(object obj)
Parameters
Type Name Description
System.Object obj

The object to show.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX