LockHelperExecuteOnceInLifetime Method |
Ensures that the given action is executed only once
Namespace: CMS.BaseAssembly: CMS.Base (in CMS.Base.dll) Version: 13.0.131
Syntax 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:
BooleanExceptions Exception | Condition |
---|
ArgumentNullException | Throws when lock object is not defined |
See Also