Table of Contents

Class DebugUtil

Namespace
Hi.Common
Assembly
HiGeom.dll

Debug utility provides functions: pause process, count execution time and show the count.

public static class DebugUtil
Inheritance
DebugUtil
Inherited Members

Properties

Count

Count of calling C(). The Count is shown by S(string). The Count helps to trigger pause by P(int).

public static int Count { get; set; }

Property Value

int

Data

The data storage for the DebugUtil class.

public static Dictionary<object, object> Data { get; }

Property Value

Dictionary<object, object>

Debugee

The object being debugged.

public static object Debugee { get; set; }

Property Value

object

WriteLineAction

The action to be performed when writing a line of text.

public static Action<string> WriteLineAction { get; set; }

Property Value

Action<string>

Methods

C()

Count++.

public static int C()

Returns

int

current count

CPS(int, string)

Execute C(). Pause and execute S(string) if count >= p.

public static int CPS(int p = 0, string text = null)

Parameters

p int

pause number

text string

text to show

Returns

int

current count

CS(string)

Call C() and then call S(string).

public static int CS(string shownText = null)

Parameters

shownText string

the text to show

Returns

int

count

CSP(int, string)

Execute the functions in sequence: C(), S(string), P(int).

public static int CSP(int p = 0, string shownText = null)

Parameters

p int

pause number

shownText string

text to show

Returns

int

count

P(int)

Pause if count >= p.

public static int P(int p = 0)

Parameters

p int

pause number

Returns

int

current count

S(string)

Call WriteLineAction?.Invoke to show the text and count.

public static int S(string shownText = null)

Parameters

shownText string

text to show

Returns

int

current count

SP(int, string)

Call S(string) and then call P(int).

public static int SP(int p = 0, string shownText = null)

Parameters

p int
shownText string

text to show

Returns

int

count

WriteLine(string)

Writes a line of text with the current count. This is an alias for S(string).

public static int WriteLine(string shownText = null)

Parameters

shownText string

The text to show.

Returns

int

The current count.