AsyncLazy<T> Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A thread-safe, lazily and asynchronously evaluated value factory.
generic <typename T>
public ref class AsyncLazy
template <typename T>
[Windows::Foundation::Metadata::WebHostHidden]
class AsyncLazy
public class AsyncLazy<T>
type AsyncLazy<'T> = class
Public Class AsyncLazy(Of T)
- T
The type of value generated by the value factory.
- Inheritance
-
AsyncLazy<T>
This class does not itself carry any resources needful of disposing. But the value factory may produce a value that needs to be disposed of, which is why this class carries a DisposeValueAsync() method but does not implement IDisposable.
Async |
Initializes a new instance of the AsyncLazy<T> class. |
Is |
Gets a value indicating whether the value factory has been invoked. |
Is |
Gets a value indicating whether DisposeValue() has already been called. |
Is |
Gets a value indicating whether the value factory has been invoked and has run to completion. |
Suppress |
Gets a value indicating whether to suppress detection of a value factory depending on itself. |
Dispose |
Disposes of the lazily-initialized value if disposable, and causes all subsequent attempts to obtain the value to fail. |
Dispose |
Disposes of the lazily-initialized value if disposable, and causes all subsequent attempts to obtain the value to fail. |
Get |
Gets the lazily computed value. |
Get |
Gets the lazily computed value. |
Get |
Gets the task that produces or has produced the value. |
Get |
Gets the task that produces or has produced the value. |
Suppress |
Marks the code that follows as irrelevant to the receiving AsyncLazy<T> value factory. |
To |
Renders a string describing an uncreated value, or the string representation of the created value. |
Tuote | Versiot |
---|---|
Visual Studio SDK | 2015, 2017, 2019, 2022 |
This type is thread-safe for all members.