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:  ShellBoost.Core.Utilities
Assembly:  ShellBoost.Core (in ShellBoost.Core.dll) Version: 1.8.3.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