Show / Hide Table of Contents

Class FieldMask.MergeOptions

Options to customize merging behavior.

Inheritance
System.Object
FieldMask.MergeOptions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Protobuf.WellKnownTypes
Assembly: Google.Protobuf.dll
Syntax
public sealed class MergeOptions

Properties

ReplaceMessageFields

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.

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

ReplacePrimitiveFields

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.

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

ReplaceRepeatedFields

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.

Declaration
public bool ReplaceRepeatedFields { get; set; }
Property Value
Type Description
System.Boolean
Back to top