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
bindingNamestringThe 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
bodystringThe 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
correlationIdstringThe non-empty identifier stored as
CorrelationIdmetadata.
Returns
- ServiceBusTriggerBuilder
This builder, for chaining.
WithJsonBody<T>(T)
Serializes a value as the message JSON body.
public ServiceBusTriggerBuilder WithJsonBody<T>(T value)
Parameters
valueTThe value serialized immediately; null is emitted when permitted by
T.
Returns
- ServiceBusTriggerBuilder
This builder, for chaining, replacing the prior body.
Type Parameters
TThe value type serialized with the package's web JSON defaults.
WithMessageId(string)
Sets the Service Bus message identifier.
public ServiceBusTriggerBuilder WithMessageId(string messageId)
Parameters
messageIdstringThe non-empty identifier stored as
MessageIdmetadata.
Returns
- ServiceBusTriggerBuilder
This builder, for chaining.
WithProperty(string, object?)
Adds application or broker metadata.
public ServiceBusTriggerBuilder WithProperty(string name, object? value)
Parameters
namestringThe non-empty property key, matched case-insensitively.
valueobjectThe value retained without cloning; null is accepted.
Returns
- ServiceBusTriggerBuilder
This builder, for chaining. An existing key is replaced.