class Lazy<T>
Provides support for lazy initialization.
TThe type of object that is being lazily initialized.
public Lazy<T>( bool isThreadSafe )
Initializes a new instance of the class. When lazy initialization occurs, the parameterless constructor of the target type and the specified initialization mode are used.
isThreadSafeto make this instance usable concurrently by multiple threads; to make the instance usable by only one thread at a time.
public Lazy<T>( LazyThreadSafetyMode mode )
Initializes a new instance of the class that uses the parameterless constructor of and the specified thread-safety mode.
modeOne of the enumeration values that specifies the thread safety mode.
public bool IsValueCreated { get; }
Gets a value that indicates whether a value has been created for this instance.
- Returns if a value has been created for this instance; otherwise, .
public T Value { get; }
Gets the lazily initialized value of the current instance.
- Returns The lazily initialized value of the current instance.
public string ToString( )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public Lazy<T>( )
😔 No documentation found.
public Lazy<T>( T value )
😔 No documentation found.
public Lazy<T>( Func<T> valueFactory )
😔 No documentation found.
public Lazy<T>( Func<T> valueFactory, bool isThreadSafe )
😔 No documentation found.
public Lazy<T>( Func<T> valueFactory, LazyThreadSafetyMode mode )
😔 No documentation found.