Compartir a través de


AsyncLazy<T> Constructor

Initializes a new instance of AsyncLazy.

Namespace:  Microsoft.VisualStudio.Threading
Assembly:  Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)

Syntax

'Declaration
Public Sub New ( _
    valueFactory As Func(Of Task(Of T)), _
    joinableTaskFactory As JoinableTaskFactory _
)
public AsyncLazy(
    Func<Task<T>> valueFactory,
    JoinableTaskFactory joinableTaskFactory
)
public:
AsyncLazy(
    Func<Task<T>^>^ valueFactory, 
    JoinableTaskFactory^ joinableTaskFactory
)
new : 
        valueFactory:Func<Task<'T>> * 
        joinableTaskFactory:JoinableTaskFactory -> AsyncLazy
public function AsyncLazy(
    valueFactory : Func<Task<T>>, 
    joinableTaskFactory : JoinableTaskFactory
)

Parameters

  • valueFactory
    Type: System.Func<Task<T>>

    The asynchronous function that produces the value. the function should be invoked at most once.

.NET Framework Security

See Also

Reference

AsyncLazy<T> Class

Microsoft.VisualStudio.Threading Namespace