Table of Contents

Class SearchAttributeCollection.Builder

Namespace
Temporalio.Common
Assembly
Temporalio.dll

Builder for creating SearchAttributeCollection. This builder is not thread safe.

public class SearchAttributeCollection.Builder
Inheritance
SearchAttributeCollection.Builder
Inherited Members

Constructors

Builder()

Initializes a new instance of the SearchAttributeCollection.Builder class to an empty set.

public Builder()

Builder(SearchAttributeCollection)

Initializes a new instance of the SearchAttributeCollection.Builder class with a copy of existing values.

public Builder(SearchAttributeCollection searchAttributes)

Parameters

searchAttributes SearchAttributeCollection

Existing values to copy.

Methods

Set(SearchAttributeCollection)

Set a copy of all values in the given collection as if calling Set<T>(SearchAttributeKey<T>, T) on each.

public SearchAttributeCollection.Builder Set(SearchAttributeCollection searchAttributes)

Parameters

searchAttributes SearchAttributeCollection

Search attributes to copy.

Returns

SearchAttributeCollection.Builder

This builder for chaining.

Remarks

This will replace any existing key of the same name regardless of key type.

Set<T>(SearchAttributeKey<T>, T)

Set a specific key and value.

public SearchAttributeCollection.Builder Set<T>(SearchAttributeKey<T> key, T value) where T : notnull

Parameters

key SearchAttributeKey<T>

Key to set.

value T

Value to set.

Returns

SearchAttributeCollection.Builder

This builder for chaining.

Type Parameters

T

Key type.

Remarks

This will replace any existing key of the same name regardless of key type.

ToSearchAttributeCollection()

Build the search attribute collection.

public SearchAttributeCollection ToSearchAttributeCollection()

Returns

SearchAttributeCollection

Built collection.

Remarks

This copies the internal values when creating, so this builder can be reused.

Unset(string)

Remove the key for the given key name regardless of key type.

public SearchAttributeCollection.Builder Unset(string name)

Parameters

name string

Key name to remove.

Returns

SearchAttributeCollection.Builder

This builder for chaining.

Unset(SearchAttributeKey)

Remove the key for the given key name regardless of key type.

public SearchAttributeCollection.Builder Unset(SearchAttributeKey key)

Parameters

key SearchAttributeKey

Key with the name to remove.

Returns

SearchAttributeCollection.Builder

This builder for chaining.