CallerContextServiceCloneAndSetCurrentContextIfRequired Method |
Ensures that the properties of the specified context are associated with the current thread.
Namespace:
Dundas.BI.Services
Assembly:
Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.3.0.1000)
Syntax public CallerContext? CloneAndSetCurrentContextIfRequired(
CallerContext context
)
Public Function CloneAndSetCurrentContextIfRequired (
context As CallerContext
) As CallerContext
public:
virtual CallerContext^ CloneAndSetCurrentContextIfRequired(
CallerContext^ context
) sealed
abstract CloneAndSetCurrentContextIfRequired :
context : CallerContext -> CallerContext
override CloneAndSetCurrentContextIfRequired :
context : CallerContext -> CallerContext
Parameters
- context
- Type: Dundas.BICallerContext
The context object which needs to be associated with the current thread.
Return Value
Type:
CallerContextIf it was necessary to create a new context, the context; otherwise,
.
Implements
ICallerContextServiceCloneAndSetCurrentContextIfRequired(CallerContext)Exceptions 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