December 2019
Intermediate to advanced
494 pages
11h 41m
English
In the previous examples, we used a string to represent blob files and Service Bus queue items. The runtime somehow recognizes this and all is well. However, if you use an int or a class you've created, things will break. That being said, a string isn't the only thing you can bind to. For example, a blob can be represented by a stream, TextReader, Byte[], CloudBlockBlob, and more. The same goes for the Service Bus queue item, which could also be a message. This means your function could look as follows:
public static void WriteFile2([ServiceBusTrigger("myqueue", Connection = "ServiceBus")]Message myQueueItem, ILogger log, [Blob("queue-messages/somefile.txt", FileAccess.Read, Connection = "StorageAccount")]Stream inputBlob, ...