Class ServiceBusTriggerBuilder

Namespace
XBullet.EasyTesting.AzureFunctions
Assembly
XBullet.EasyTesting.AzureFunctions.dll

Builds a Service Bus trigger value and broker metadata.

public sealed class ServiceBusTriggerBuilder
Inheritance
ServiceBusTriggerBuilder
Inherited Members

Methods

Build()

Builds trigger data whose value can be passed to a string trigger parameter.

public TestTriggerData<string> Build()

Returns

TestTriggerData<string>

New trigger data containing the current text body, binding name, and metadata.

Named(string)

Sets the input binding name.

public ServiceBusTriggerBuilder Named(string bindingName)

Parameters

bindingName string

The non-empty worker input name. The default is message.

Returns

ServiceBusTriggerBuilder

This builder, for chaining.

WithBody(string)

Sets the message body as text.

public ServiceBusTriggerBuilder WithBody(string body)

Parameters

body string

The non-null body retained as text; an empty body is accepted.

Returns

ServiceBusTriggerBuilder

This builder, for chaining, replacing the prior body.

WithCorrelationId(string)

Sets the Service Bus correlation identifier.

public ServiceBusTriggerBuilder WithCorrelationId(string correlationId)

Parameters

correlationId string

The non-empty identifier stored as CorrelationId metadata.

Returns

ServiceBusTriggerBuilder

This builder, for chaining.

WithJsonBody<T>(T)

Serializes a value as the message JSON body.

public ServiceBusTriggerBuilder WithJsonBody<T>(T value)

Parameters

value T

The value serialized immediately; null is emitted when permitted by T.

Returns

ServiceBusTriggerBuilder

This builder, for chaining, replacing the prior body.

Type Parameters

T

The value type serialized with the package's web JSON defaults.

WithMessageId(string)

Sets the Service Bus message identifier.

public ServiceBusTriggerBuilder WithMessageId(string messageId)

Parameters

messageId string

The non-empty identifier stored as MessageId metadata.

Returns

ServiceBusTriggerBuilder

This builder, for chaining.

WithProperty(string, object?)

Adds application or broker metadata.

public ServiceBusTriggerBuilder WithProperty(string name, object? value)

Parameters

name string

The non-empty property key, matched case-insensitively.

value object

The value retained without cloning; null is accepted.

Returns

ServiceBusTriggerBuilder

This builder, for chaining. An existing key is replaced.