Edytuj

Udostępnij za pośrednictwem


AsyncLocal<T> Constructors

Definition

Instantiates an AsyncLocal<T> instance.

Overloads

AsyncLocal<T>()

Instantiates an AsyncLocal<T> instance that does not receive change notifications.

AsyncLocal<T>(Action<AsyncLocalValueChangedArgs<T>>)

Instantiates an AsyncLocal<T> local instance that receives change notifications.

AsyncLocal<T>()

Source:
AsyncLocal.cs
Source:
AsyncLocal.cs
Source:
AsyncLocal.cs

Instantiates an AsyncLocal<T> instance that does not receive change notifications.

public:
 AsyncLocal();
public AsyncLocal ();
Public Sub New ()

Applies to

AsyncLocal<T>(Action<AsyncLocalValueChangedArgs<T>>)

Source:
AsyncLocal.cs
Source:
AsyncLocal.cs
Source:
AsyncLocal.cs

Instantiates an AsyncLocal<T> local instance that receives change notifications.

public:
 AsyncLocal(Action<System::Threading::AsyncLocalValueChangedArgs<T>> ^ valueChangedHandler);
[System.Security.SecurityCritical]
public AsyncLocal (Action<System.Threading.AsyncLocalValueChangedArgs<T>> valueChangedHandler);
public AsyncLocal (Action<System.Threading.AsyncLocalValueChangedArgs<T>>? valueChangedHandler);
public AsyncLocal (Action<System.Threading.AsyncLocalValueChangedArgs<T>> valueChangedHandler);
[<System.Security.SecurityCritical>]
new System.Threading.AsyncLocal<'T> : Action<System.Threading.AsyncLocalValueChangedArgs<'T>> -> System.Threading.AsyncLocal<'T>
new System.Threading.AsyncLocal<'T> : Action<System.Threading.AsyncLocalValueChangedArgs<'T>> -> System.Threading.AsyncLocal<'T>
Public Sub New (valueChangedHandler As Action(Of AsyncLocalValueChangedArgs(Of T)))

Parameters

valueChangedHandler
Action<AsyncLocalValueChangedArgs<T>>

The delegate that is called whenever the current value changes on any thread.

Attributes

Remarks

The delegate's signature is Action<AsyncLocalValueChangedArgs<T>>.

See also

Applies to