Members on this page
Meshline.Sdk
Meshline.Models
FieldUpdate<T> Struct
Represents an unchanged field, an assigned value, or an explicit field deletion.
public readonly struct FieldUpdate<T>
where T : notnull
Type parameters
T
The non-null type of the field value.
Remarks
The default value means no change. Delete sets IsDeleted without setting IsSpecified. Protocol serialization omits unchanged fields, writes deletions as JSON null, and writes assigned values normally. Individual operations may prohibit deleting required fields.
Constructors
FieldUpdate(T) Constructor
Initializes a new instance of FieldUpdate<T>.
public FieldUpdate(T value);
Parameters
value T
The value to assign to the field.
Properties
FieldUpdate<T>.Delete Property
An update that explicitly deletes the field instead of assigning a value.
public static Meshline.Models.FieldUpdate<T> Delete { get; }
Property Value
Meshline.Models.FieldUpdate<T>
FieldUpdate<T>.IsDeleted Property
Whether this update explicitly deletes the field.
public bool IsDeleted { get; }
Property Value
FieldUpdate<T>.IsSpecified Property
Whether this update assigns a value; deletion is represented separately by IsDeleted.
public bool IsSpecified { get; }
Property Value
FieldUpdate<T>.Unspecified Property
An update that leaves the existing field unchanged.
public static Meshline.Models.FieldUpdate<T> Unspecified { get; }
Property Value
Meshline.Models.FieldUpdate<T>
FieldUpdate<T>.Value Property
The assigned value; accessing an unchanged or deleted field throws System.InvalidOperationException.
public T Value { get; }
Property Value
Exceptions
System.InvalidOperationException
The field update does not assign a value.
Operators
FieldUpdate<T>.implicit operator FieldUpdate<T>(T) Operator
Creates a field assignment from a value.
public static Meshline.Models.FieldUpdate<T> implicit operator Meshline.Models.FieldUpdate<T>(T value);
Parameters
value T
The value to assign to the field.
Returns
Meshline.Models.FieldUpdate<T>
An update assigning the supplied value.