Class SetOptions (2.3.1)

public sealed class SetOptions

Immutable class representing options for Set operations.

Inheritance

Object > SetOptions

Namespace

Google.Cloud.Firestore

Assembly

Google.Cloud.Firestore.dll

Properties

FieldMask

public IReadOnlyList<FieldPath> FieldMask { get; }

The fields to merge. This property is never null; if the mask is empty, all fields will be merged or overwritten.

Property Value
TypeDescription
IReadOnlyList<FieldPath>

Merge

public bool Merge { get; }

Whether or not to merge values. If FieldMask is non-empty, this is always true.

Property Value
TypeDescription
Boolean

MergeAll

public static SetOptions MergeAll { get; }

Returns an instance that merges all fields.

Property Value
TypeDescription
SetOptions

Overwrite

public static SetOptions Overwrite { get; }

Returns an instance that overwrites the target object. This is the default when no options are provided.

Property Value
TypeDescription
SetOptions

Methods

MergeFields(FieldPath[])

public static SetOptions MergeFields(params FieldPath[] fieldMask)

Returns an instance that merges the given fields.

Parameter
NameDescription
fieldMaskFieldPath[]

The fields to merge. An empty array is equivalent to using MergeAll. Must not be null or contain any null elements.

Returns
TypeDescription
SetOptions

An instance that merges the given fields.

MergeFields(String[])

public static SetOptions MergeFields(params string[] fieldMask)

Returns an instance that merges the given fields.

Parameter
NameDescription
fieldMaskString[]

The fields to merge. An empty array is equivalent to using MergeAll. Must not be null or contain any empty or null elements. Each field is treated as a dot-separated list of segments.

Returns
TypeDescription
SetOptions

An instance that merges the given fields.