Table of Contents

Interface DebugPrint

Namespace
CriusNyx.Util
Assembly
CriusNyxUtil.dll

Apply this interface to an object to added .Debug support to that object. Otherwise .ToString will be used instead.

public interface DebugPrint
Extension Methods

Methods

DeregisterCustomType<T>()

Remove custom type from Debug Print.

public static void DeregisterCustomType<T>()

Type Parameters

T

EnumerateFields()

Should return a list of field names and their values so that they can be included in the .Debug output.

IEnumerable<(string, object)> EnumerateFields()

Returns

IEnumerable<(string, object)>

EnumerateWithAttributes(object)

Enumerate fields that have the DebugFieldAttribute

public static IEnumerable<(string, object)> EnumerateWithAttributes(object source)

Parameters

source object

Returns

IEnumerable<(string, object)>

EnumerateWithAttributes(object, Type)

Enumerate fields that have the DebugFieldAttribute

public static IEnumerable<(string, object)> EnumerateWithAttributes(object source, Type type)

Parameters

source object
type Type

Returns

IEnumerable<(string, object)>

EnumerateWithReflection(object)

Enumerate the fields of a type using reflection.

public static IEnumerable<(string, object)> EnumerateWithReflection(object source)

Parameters

source object

Returns

IEnumerable<(string, object)>

EnumerateWithReflection(object, Type)

Enumerate the fields of a type using reflection.

public static IEnumerable<(string, object)> EnumerateWithReflection(object source, Type type)

Parameters

source object
type Type

Returns

IEnumerable<(string, object)>

RegisterCustomType<T>(CustomDebugPrint<T>)

Register custom enumeration method for Debug Print.

public static void RegisterCustomType<T>(DebugPrint.CustomDebugPrint<T> enumerateField)

Parameters

enumerateField DebugPrint.CustomDebugPrint<T>

Type Parameters

T

RegisterCustomType<T>(CustomDebugStringPrint<T>)

Register custom string print method for Debug Print.

public static void RegisterCustomType<T>(DebugPrint.CustomDebugStringPrint<T> stringPrinter)

Parameters

stringPrinter DebugPrint.CustomDebugStringPrint<T>

Type Parameters

T