Table of Contents

Method ExecuteWithTimeout

Namespace
SharpVectors.Renderers.Wpf
Assembly
SharpVectors.Runtime.Wpf.dll

ExecuteWithTimeout(Action, int)

Executes an action with timeout protection, useful for preventing designer hangs.

public static bool ExecuteWithTimeout(Action action, int timeoutMs = 3000)

Parameters

action Action
timeoutMs int

Returns

bool

ExecuteWithTimeout<T>(Func<T>, T, int)

Executes a function with timeout protection, useful for preventing designer hangs.

public static T ExecuteWithTimeout<T>(Func<T> func, T defaultValue = default, int timeoutMs = 3000)

Parameters

func Func<T>
defaultValue T
timeoutMs int

Returns

T

Type Parameters

T