WebCoreDoWorkTResult Method (FuncTResult)Awesomium.NET 1.7.6Awesomium.NET
Executes an action synchronously on Awesomium's main thread, returning a value of the type specified by the TResult parameter.

Namespace: Awesomium.Core
Assembly: Awesomium.Core (in Awesomium.Core.dll) Version: 1.7.6.0
Syntax

public static TResult DoWork<TResult>(
	Func<TResult> action
)

Parameters

action
Type: SystemFuncTResult
The delegate encapsulating a method that has no parameters and returns a value of the type specified by the TResult parameter, to be executed on Awesomium's main thread.

Type Parameters

TResult
The type of the return value of the method that this delegate encapsulates. This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived.

Return Value

Type: TResult
The return value of the method that action encapsulates.
Remarks

The action will be executed in WebCore's next Update pass.

Actions executed using DoWorkTResult(FuncTResult), are guaranteed to be executed on Awesomium's main thread. This allows cross-thread access to Awesomium's API.

See Also

Reference