Click or drag to resize
LockHelperExecuteOnceInLifetime Method
Ensures that the given action is executed only once

Namespace: CMS.Base
Assembly: CMS.Base (in CMS.Base.dll) Version: 13.0.131
Syntax
C#
public static bool ExecuteOnceInLifetime(
	Action action,
	Object lockObject,
	ref bool executedFlag
)

Parameters

action
Type: SystemAction
Action to execute
lockObject
Type: SystemObject
Object to use for locking context to ensure only one load
executedFlag
Type: SystemBoolean
Flag that indicates if the action was already executed

Return Value

Type: Boolean
Exceptions
ExceptionCondition
ArgumentNullExceptionThrows when lock object is not defined
See Also