LazyString

References
public sealed class LazyString
A process which computes a string lazily in a background thread.

Constructors

LazyString

#
Create a lazy string with a precomputed result.
public LazyString(
final
Available result.
)

LazyString

#
Create a new lazy string.
public LazyString(
placeholder,
String to display initially. Any triple dots will be used to insert progress feedback.
computeFinal
Method for computing the final string.
)

Properties

Computed

#
Gets whether this instance has finished computing the Display(bool) string.
public bool Computed { get; }

Empty

#
Gets an empty lazy string.
public static LazyString Empty { get; }

Final

#
Gets the final, computed string. This field will return null while the computation is still ongoing.
public string Final { get; }

Placeholder

#
Gets the fallback string to be returned while the process is still computing. This never returns null.
public string Placeholder { get; }

Methods

Display

#
Gets the current display string. This will either be the Placeholder string or the Final string.
public string Display(
out bool
final
)

Convertors

OperationResultDescription
implicitstringLazyStringCreate a completed lazy string from a result.