Class FieldMask.MergeOptions (3.23.0)

public sealed class FieldMask.MergeOptions

Options to customize merging behavior.

Inheritance

object > FieldMask.MergeOptions

Namespace

Google.Protobuf.WellKnownTypes

Assembly

Google.Protobuf.dll

Properties

ReplaceMessageFields

public bool ReplaceMessageFields { get; set; }

Whether to replace message fields(i.e., discard existing content in destination message fields) when merging. Default behavior is to merge the source message field into the destination message field.

Property Value
Type Description
bool

ReplacePrimitiveFields

public bool ReplacePrimitiveFields { get; set; }

Whether to replace primitive (non-repeated and non-message) fields in destination message fields with the source primitive fields (i.e., if the field is set in the source, the value is copied to the destination; if the field is unset in the source, the field is cleared from the destination) when merging.

Default behavior is to always set the value of the source primitive field to the destination primitive field, and if the source field is unset, the default value of the source field is copied to the destination.

Property Value
Type Description
bool

ReplaceRepeatedFields

public bool ReplaceRepeatedFields { get; set; }

Whether to replace repeated fields (i.e., discard existing content in destination repeated fields) when merging. Default behavior is to append elements from source repeated field to the destination repeated field.

Property Value
Type Description
bool