ICallerContextServiceCloneAndSetCurrentContextIfRequired Method

Ensures that the properties of the specified context are associated with the current thread.

Namespace:  Dundas.BI
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.3.0.1000)
Syntax
CallerContext? CloneAndSetCurrentContextIfRequired(
	CallerContext context
)

Parameters

context
Type: Dundas.BICallerContext
The context object which needs to be associated with the current thread.

Return Value

Type: CallerContext
If it was necessary to create a new context, the context; otherwise, .
Exceptions
ExceptionCondition
ArgumentNullExceptioncontext is .
Remarks
Use this method in multi-threading scenarios where you need the properties of a specific context to be associated with a different thread. If called on the same thread, nothing will happen and the method will return . If called on a different thread, the provided context will be cloned, and the clone will be associated with that thread.
See Also