Table of Contents

Class MetadataBuilderCollectionExtensions

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

Extension methods for adding collection-based metadata to IMessageMetadataBuilder.

public static class MetadataBuilderCollectionExtensions
Inheritance
MetadataBuilderCollectionExtensions
Inherited Members

Methods

AddAttribute(IMessageMetadataBuilder, string, object)

Adds a single attribute to the message metadata.

public static IMessageMetadataBuilder AddAttribute(this IMessageMetadataBuilder builder, string key, object value)

Parameters

builder IMessageMetadataBuilder

The builder instance.

key string

The attribute key.

value object

The attribute value.

Returns

IMessageMetadataBuilder

The builder instance for method chaining.

AddAttributes(IMessageMetadataBuilder, IEnumerable<KeyValuePair<string, object>>)

Adds (merges) the supplied attributes into the message metadata, preserving any already-added attributes. Same-key entries are overwritten; other keys are retained. For a full reset, pass null to WithProperty(string, object?) with the attributes key.

public static IMessageMetadataBuilder AddAttributes(this IMessageMetadataBuilder builder, IEnumerable<KeyValuePair<string, object>> attributes)

Parameters

builder IMessageMetadataBuilder

The builder instance.

attributes IEnumerable<KeyValuePair<string, object>>

The attributes to add.

Returns

IMessageMetadataBuilder

The builder instance for method chaining.

AddHeaders(IMessageMetadataBuilder, IEnumerable<KeyValuePair<string, string>>)

Adds multiple headers to the message metadata.

public static IMessageMetadataBuilder AddHeaders(this IMessageMetadataBuilder builder, IEnumerable<KeyValuePair<string, string>> headers)

Parameters

builder IMessageMetadataBuilder

The builder instance.

headers IEnumerable<KeyValuePair<string, string>>

The headers to add.

Returns

IMessageMetadataBuilder

The builder instance for method chaining.

AddItem(IMessageMetadataBuilder, string, object)

Adds a single item to the message metadata.

public static IMessageMetadataBuilder AddItem(this IMessageMetadataBuilder builder, string key, object value)

Parameters

builder IMessageMetadataBuilder

The builder instance.

key string

The item key.

value object

The item value.

Returns

IMessageMetadataBuilder

The builder instance for method chaining.

AddItems(IMessageMetadataBuilder, IEnumerable<KeyValuePair<string, object>>)

Adds (merges) the supplied items into the message metadata, preserving any already-added items Same-key entries are overwritten; other keys are retained. For a full reset, pass null to WithProperty(string, object?) with the items key.

public static IMessageMetadataBuilder AddItems(this IMessageMetadataBuilder builder, IEnumerable<KeyValuePair<string, object>> items)

Parameters

builder IMessageMetadataBuilder

The builder instance.

items IEnumerable<KeyValuePair<string, object>>

The items to add.

Returns

IMessageMetadataBuilder

The builder instance for method chaining.

AddProperties(IMessageMetadataBuilder, IEnumerable<KeyValuePair<string, object>>)

Adds multiple custom properties to the message metadata.

public static IMessageMetadataBuilder AddProperties(this IMessageMetadataBuilder builder, IEnumerable<KeyValuePair<string, object>> properties)

Parameters

builder IMessageMetadataBuilder

The builder instance.

properties IEnumerable<KeyValuePair<string, object>>

The properties to add.

Returns

IMessageMetadataBuilder

The builder instance for method chaining.

AddProperty(IMessageMetadataBuilder, string, object)

Adds a single custom property to the message metadata.

public static IMessageMetadataBuilder AddProperty(this IMessageMetadataBuilder builder, string key, object value)

Parameters

builder IMessageMetadataBuilder

The builder instance.

key string

The property key.

value object

The property value.

Returns

IMessageMetadataBuilder

The builder instance for method chaining.