Skip to content

[Blob] Design for enabling inference of collection binding without the IsBatched property #1333

Closed
@jviau

Description

@jviau

Using blob extension as an example:

We should explore if we can remove the need for the explicit IsBatched value in BlobInputAttribute and instead infer it on some set of defined rules. This may be possible by both considering the target parameter type as well is if the described blob is a file or not. We will need to explore how this affects binding metadata sent to/from the host.

Examples

Is File? Target Type Result
true IEnumerable<T>, Array<T> deserialize single file into target type, Behavior of deserialization depends on how the configured serializer performs collection deserialization.
true T (not an enumerable or array) deserialize single file into target type.
true string, Stream, byte[] blob contents. The check for byte[] will need to take precedence over the array check above.
true BlobClient provide BlobClient for described blob
true IEnumerable<BlobClient> / Array<BlobClient> enumerable/array with single client
true BlobContainerClient error (need to verify this)
true IEnumerable<BlobContainerClient> / Array<BlobContainerClient> error (need to verify this)
false IEnumerable<T>, Array<T> deserialize single file into target type, Behavior of deserialization depends on how the configured serializer performs collection deserialization.
false T (not an enumerable or array) error
false string, Stream, byte[] error
false BlobClient provide BlobClient for indicated blob (IsFile will be false - this does work today).
false IEnumerable<BlobClient> / Array<BlobClient> enumerable/array with a BlobClient per child.
false BlobContainerClient provide BlobContainerClient for the indicated blob.
false IEnumerable<BlobContainerClient> / Array<BlobContainerClient> enumerable / array with single BlobContainerClient. Or error? There is never a case this would yield more than 1.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions