Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are Azure WebJob's BlobInput and BlobOutput classes?

I am creating a Azure WebJob console application that resizes images uploaded to blob storage. When following any of the code samples online I am unable to reference and use the BlobInput and BlobOutput input parameter attributes. I am using the NuGet package Microsoft.Azure.Jobs 0.3.0-beta (and Microsoft.Azure.Jobs.Core).

Which namespaces are BlogInput and BlobOutput found in? Is there another NuGet package that I need?

Here is my code which does not compile because it cannot resolve BlobInput and BlobOutput:

using Microsoft.Azure.Jobs;
using System.IO;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            JobHost host = new JobHost();
            host.RunAndBlock();
        }

        public static void SquishNewlyUploadedPNGs([BlobInput("input/{name}")] Stream input, [BlobOutput("output/{name}")] Stream output)
        {
            //...
        }
    }
}
like image 607
Andy Mehalick Avatar asked Jun 18 '14 12:06

Andy Mehalick


1 Answers

In the Beta version of Azure WebJobs SDK we changed the attribute names as described below. The functionality remained the same.

BlobInputAttribute   -> BlobTriggerAttribute
BlobOutputAttribute  -> BlobAttribute
QueueInputAttribute  -> QueueTriggerAttribute
QueueOutputAttribute -> QueueAttribute

Also, the package names changed. You should use:

http://www.nuget.org/packages/Microsoft.Azure.Jobs/0.3.0-beta
http://www.nuget.org/packages/Microsoft.Azure.Jobs.Core/0.3.0-beta
like image 52
Victor Hurdugaci Avatar answered Sep 22 '22 11:09

Victor Hurdugaci