FuncUtils
Assembly: ServiceStack.Common.dll
View Source
Declaration
public static class FuncUtils
Methods
TryExec(Action)
Invokes the action provided and returns true if no exception was thrown. Otherwise logs the exception and returns false if an exception was thrown.
View Source
Declaration
public static bool TryExec(Action action)
Returns
System.Boolean
Parameters
| Type | Name | Description |
|---|---|---|
System.Action | action | The action. |
|
TryExec<T>(Func<T>)
View Source
Declaration
public static T TryExec<T>(Func<T> func)
Returns
<T>
Parameters
| Type | Name |
|---|---|
System.Func<<T>> | func |
Type Parameters
T
TryExec<T>(Func<T>, T)
View Source
Declaration
public static T TryExec<T>(Func<T> func, T defaultValue)
Returns
<T>
Parameters
| Type | Name |
|---|---|
System.Func<<T>> | func |
<T> | defaultValue |
Type Parameters
T
WaitWhile(Func<Boolean>, Int32, Int32)
View Source
Declaration
public static void WaitWhile(Func<bool> condition, int millisecondTimeout, int millsecondPollPeriod = 10)
Parameters
| Type | Name |
|---|---|
System.Func<System.Boolean> | condition |
System.Int32 | millisecondTimeout |
System.Int32 | millsecondPollPeriod |