Class BlobTriggerBuilder

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

Builds a Blob Storage trigger stream and blob metadata.

public sealed class BlobTriggerBuilder
Inheritance
BlobTriggerBuilder
Inherited Members

Methods

Build()

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

public TestTriggerData<Stream> Build()

Returns

TestTriggerData<Stream>

New trigger data containing a caller-owned, read-only memory stream positioned at zero and the current metadata. Dispose the stream after invocation.

Named(string)

Sets the input binding name.

public BlobTriggerBuilder Named(string bindingName)

Parameters

bindingName string

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

Returns

BlobTriggerBuilder

This builder, for chaining.

WithContent(byte[])

Sets binary blob content.

public BlobTriggerBuilder WithContent(byte[] content)

Parameters

content byte[]

The non-null bytes copied immediately; an empty array is accepted.

Returns

BlobTriggerBuilder

This builder, for chaining, replacing prior content.

WithContent(string)

Sets UTF-8 blob content.

public BlobTriggerBuilder WithContent(string content)

Parameters

content string

The non-null text encoded immediately as UTF-8; empty text is accepted.

Returns

BlobTriggerBuilder

This builder, for chaining, replacing prior content.

WithJsonContent<T>(T)

Serializes a value as UTF-8 JSON blob content.

public BlobTriggerBuilder WithJsonContent<T>(T value)

Parameters

value T

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

Returns

BlobTriggerBuilder

This builder, for chaining, replacing prior content.

Type Parameters

T

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

WithMetadata(string, object?)

Adds blob binding metadata.

public BlobTriggerBuilder WithMetadata(string name, object? value)

Parameters

name string

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

value object

The value retained without cloning; null is accepted.

Returns

BlobTriggerBuilder

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

WithPath(string)

Sets the blob path exposed as binding data.

public BlobTriggerBuilder WithPath(string path)

Parameters

path string

The non-empty path stored as both BlobTrigger and Uri metadata.

Returns

BlobTriggerBuilder

This builder, for chaining.