Class WriteOnce<T>

Represents a variable that can be set only once.

Inheritance
System.Object
WriteOnce<T>
WriteOnce
Namespace: Solti.Utils.Primitives.Patterns
Assembly: Solti.Utils.Primitives.dll
Syntax
public class WriteOnce<T> : Object where T : class
Type Parameters
Name Description
T

Constructors

WriteOnce(Boolean)

Creates a new WriteOnce<T> instance.

Declaration
public WriteOnce(bool strict = true)
Parameters
Type Name Description
System.Boolean strict

Properties

HasValue

Indicates whether the Value has already been set.

Declaration
public bool HasValue { get; }
Property Value
Type Description
System.Boolean

Strict

Returns true if this instance is strict.

Declaration
public bool Strict { get; }
Property Value
Type Description
System.Boolean

Value

The held value of this instance.

Declaration
public T Value { get; set; }
Property Value
Type Description
T
In This Article
Back to top Generated by DocFX