Skip to content

XMediator::Api::CustomProperties::Builder

A convenience class for creating CustomProperties.

Public Functions

Name
Builder()
Creates a new Builder with no properties.
Builder(CustomProperties customProperties)
Builder Remove(string key)
Removes a property from the custom properties by key.
Builder AddBoolean(string key, bool value)
Adds a boolean value to the custom properties.
Builder AddInt(string key, int value)
Adds an integer value to the custom properties.
Builder AddFloat(string key, float value)
Adds a float value to the custom properties.
Builder AddDouble(string key, double value)
Adds a double value to the custom properties.
Builder AddString(string key, string value)
Adds a string value to the custom properties.
Builder AddStringSet(string key, IEnumerable< string > value)
Adds a string set value to the custom properties.
CustomProperties Build()
Builds a new CustomProperties instance with all the key-value pairs specified so far.

Public Functions Documentation

function Builder

Builder()

Creates a new Builder with no properties.

function Builder

Builder(
    CustomProperties customProperties
)

function Remove

Builder Remove(
    string key
)

Removes a property from the custom properties by key.

Parameters:

  • key The key of the property to remove.

Return: The same Builder instance.

function AddBoolean

Builder AddBoolean(
    string key,
    bool value
)

Adds a boolean value to the custom properties.

Parameters:

  • key The key of the property.
  • value The value of the property.

Return: The same Builder instance.

function AddInt

Builder AddInt(
    string key,
    int value
)

Adds an integer value to the custom properties.

Parameters:

  • key The key of the property.
  • value The value of the property.

Return: The same Builder instance.

function AddFloat

Builder AddFloat(
    string key,
    float value
)

Adds a float value to the custom properties.

Parameters:

  • key The key of the property.
  • value The value of the property.

Return: The same Builder instance.

function AddDouble

Builder AddDouble(
    string key,
    double value
)

Adds a double value to the custom properties.

Parameters:

  • key The key of the property.
  • value The value of the property.

Return: The same Builder instance.

function AddString

Builder AddString(
    string key,
    string value
)

Adds a string value to the custom properties.

Parameters:

  • key The key of the property.
  • value The value of the property.

Return: The same Builder instance.

function AddStringSet

Builder AddStringSet(
    string key,
    IEnumerable< string > value
)

Adds a string set value to the custom properties.

Parameters:

  • key The key of the property.
  • value The value of the property.

Return: The same Builder instance.

function Build

CustomProperties Build()

Builds a new CustomProperties instance with all the key-value pairs specified so far.

Return: A new CustomProperties instance.


Updated on 2025-06-06 at 15:48:42 +0000