You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i copied the CheckGeneratorFunctions from the book I noticed I had missing using references
using SixLabors.ImageSharp; // To use Image Class.
using SixLabors.ImageSharp.PixelFormats; // To use Rgba32 type.
using SixLabors.ImageSharp.Processing; // To use mutate.
I needed to change public byte[] Run( [QueueTrigger("checksQueue")] string message)
to public byte[] Run([QueueTrigger("checksQueue")] Azure.Storage.Queues.Models.QueueMessage message)
and the following mislabeled variables. log.LogInformation($"Blobs folder: {folder}");
to _logger.LogInformation($"Blobs folder: {folder}");
log.LogError(ex.Message);
to _logger.LogError(ex.Message);
The text was updated successfully, but these errors were encountered:
The first issue was due to a breaking change in ImageSharp.
The second issue with the logger was my mistake not updating all the variable references in the book after changing them in code.
The issue you had with the message parameter I think might have been caused by something else: I had not created a .http test file to trigger the check generation. I think you might have run the other test file that calls the NumbersToWords function. I think that because that's exactly what I did too! And that doesn't trigger the queue. So I thought it was broken too initially. But then I noticed the missing test file and tried again and it worked correctly. I also updated the Azure packages to their current latest and they still work with the message parameter as a string as in the book. If you change the parameter to a QueueMessage then that'd work too but only if you also make more changes throughout the code to convert the message.Body into a string value for printing.
When i copied the CheckGeneratorFunctions from the book I noticed I had missing using references
I needed to change
public byte[] Run( [QueueTrigger("checksQueue")] string message)
to
public byte[] Run([QueueTrigger("checksQueue")] Azure.Storage.Queues.Models.QueueMessage message)
and the following mislabeled variables.
log.LogInformation($"Blobs folder: {folder}");
to
_logger.LogInformation($"Blobs folder: {folder}");
log.LogError(ex.Message);
to
_logger.LogError(ex.Message);
The text was updated successfully, but these errors were encountered: