Click or drag to resize

ShellUtilitiesWithSiteT Method (Object, Object, FuncT, Boolean)

Runs an function. If the sited object implements IObjectWithSite, the site object will be set before the function and unset after the function.

Namespace:  callback.ShellBoost.Core.Utilities
Assembly:  callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.0
Syntax
C#
public static T WithSite<T>(
	Object sited,
	Object site,
	Func<T> func,
	bool throwOnError = true
)

Parameters

sited
Type: SystemObject
The sited. If null, the function will be ran.
site
Type: SystemObject
The site. If null, the function will be ran.
func
Type: SystemFuncT
The function.
throwOnError (Optional)
Type: SystemBoolean
if set to true [throw on error].

Type Parameters

T
The function return type.

Return Value

Type: T
The result of the function call.
Exceptions
ExceptionCondition
ArgumentNullExceptionfunc is null.
See Also