Where are Azure WebJob's BlobInput and BlobOutput classes?

痞子三分冷 提交于 2019-12-07 02:50:17

问题


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)
        {
            //...
        }
    }
}

回答1:


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


来源:https://stackoverflow.com/questions/24286214/where-are-azure-webjobs-blobinput-and-bloboutput-classes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!