How do we bind to properties inside of a blob?
My bindings:
public static async Task Run(
[BlobTrigger("%triggerContainer%/{name}")] Stream myBlob,
[Blob("%triggerContainer%/{name}", Read)] CloudBlockBlob @in,
[Blob("%outputContainer%/{name}", Write)] CloudBlockBlob @out,
string name, ILogger log)
{
I'd like to be able to change the blobtrigger type to a POCO:
[BlobTrigger("%triggerContainer%/{name}")] MyPoco myBlob
Where MyPoco might be something like this:
public class MyPoco
{
public string id {get;set;}
public string filename {get;set;}
}
From within the function I'd like to be able to do something like this:
var thisId = myBlob.id;
var thisfileName = myBlob.filename;
How do we bind to the actual contents of the blob with a POCO object?
According to this:
JavaScript and Java functions load the entire blob into memory, and C# functions do that if you bind to string, Byte[], or POCO.
The 'Function1' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Function1'. Microsoft.Azure.WebJobs.Host: Can't bind BlobTrigger to type 'FunctionApp6.MyPoco'.- is that what you get?