Click or drag to resize
LockHelper.ExecuteOnceInLifetime Method
Ensures that the given action is executed only once

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

Parameters

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

Return Value

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