哪里天青WebJob的BlobInput和BlobOutput类? [英] Where are Azure WebJob's BlobInput and BlobOutput classes?
问题描述
我创建调整大小上传到Blob存储图像的Azure WebJob控制台应用程序。当下面的任何代码示例在线我无法引用和使用的BlobInput和BlobOutput输入参数属性。我使用的NuGet包Microsoft.Azure.Jobs 0.3.0-β(和Microsoft.Azure.Jobs.Core)。
哪个命名空间是BlogInput和BlobOutput发现? ?是否有其他的NuGet包,我需要
下面是我的代码不编译,因为它不能解析BlobInput和BlobOutput:
使用Microsoft.Azure.Jobs;
:使用System.IO;
命名空间ConsoleApplication2
{
类节目
{
静态无效的主要(字串[] args)
{
JobHost主机=新JobHost();
host.RunAndBlock();
}
公共静态无效SquishNewlyUploadedPNGs([BlobInput(输入/ {名})]流输入,[BlobOutput(输出/ {名})]流输出)
{
// ...
}
}
}
< DIV CLASS =h2_lin>解决方案
在Azure中WebJobs SDK Beta版,我们改变了属性名,如下所述。该功能保持不变。
BlobInputAttribute - > BlobTriggerAttribute
BlobOutputAttribute - > BlobAttribute
QueueInputAttribute - > QueueTriggerAttribute
QueueOutputAttribute - > QueueAttribute
此外,包名改变。您应该使用:
http://www.nuget.org/packages/Microsoft.Azure.Jobs/0.3.0-公测
http://www.nuget.org/packages/Microsoft.Azure.Jobs.Core/0.3.0-beta
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)
{
//...
}
}
}
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
这篇关于哪里天青WebJob的BlobInput和BlobOutput类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!