Class ThreadContextBuilder
Provides methods to configure and build ThreadContext instances.
Inheritance
System.Object
    ThreadContextBuilder
  Inherited Members
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
  Namespace: Kephas.Threading.Tasks
Assembly: Kephas.Core.dll
Syntax
public class ThreadContextBuilderConstructors
| Improve this Doc View SourceThreadContextBuilder()
Initializes a new instance of the ThreadContextBuilder class.
Declaration
public ThreadContextBuilder()Methods
| Improve this Doc View SourceCreateThreadContext()
Creates a new ThreadContext.
Declaration
public ThreadContext CreateThreadContext()Returns
| Type | Description | 
|---|---|
| ThreadContext | 
WithRestoreAction(Action<ThreadContext>)
Adds the restore action to the ambient services. This method is not thread safe, use it with caution and only when initializing the server.
Declaration
public ThreadContextBuilder WithRestoreAction(Action<ThreadContext> restoreAction)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Action<ThreadContext> | restoreAction | The restore action. | 
Returns
| Type | Description | 
|---|---|
| ThreadContextBuilder | This builder. | 
WithStoreAction(Action<ThreadContext>)
Adds the store action to the ambient services. This method is not thread safe, use it with caution and only when initializing the server.
Declaration
public ThreadContextBuilder WithStoreAction(Action<ThreadContext> storeAction)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Action<ThreadContext> | storeAction | The store action. | 
Returns
| Type | Description | 
|---|---|
| ThreadContextBuilder | This builder. |