Class LazyBy<T>
Lazy value with params
Inheritance
System.Object
LazyBy<T>
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: LibSugar
Assembly: LibSugar.dll
Syntax
public abstract class LazyBy<T>
Type Parameters
| Name | Description |
|---|---|
| T |
Properties
| Improve this Doc View SourceIsValueCreated
Check is the value created
Declaration
public abstract bool IsValueCreated { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Value
Get the value
Declaration
public abstract T Value { get; }
Property Value
| Type | Description |
|---|---|
| T |
Methods
| Improve this Doc View SourceCreate<P>(Func<P>, Func<T>, Boolean)
Make an assoc Lazy
Declaration
public static LazyBy<T> Create<P>(Func<P> selector, Func<T> getter, bool threadSafe = true)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Func<P> | selector | |
| System.Func<T> | getter | |
| System.Boolean | threadSafe |
Returns
| Type | Description |
|---|---|
| LazyBy<T> |
Type Parameters
| Name | Description |
|---|---|
| P |
Extension Methods
Sugar.Borrow<T>(T)
Sugar.Owner<T>(T)