Azure notificationhub 如何添加notifcationhubs库
如何将notificationhubs库包含到azure函数中?这是我的尝试,但不起作用Azure notificationhub 如何添加notifcationhubs库,azure-notificationhub,azure-functions,Azure Notificationhub,Azure Functions,如何将notificationhubs库包含到azure函数中?这是我的尝试,但不起作用 using System; using System.Threading.Tasks; using System.Collections.Generic; using Microsoft.Azure.NotificationHubs; public static void Run(string myQueueItem, TraceWriter log) { log.Info($"C# Queue t
using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using Microsoft.Azure.NotificationHubs;
public static void Run(string myQueueItem, TraceWriter log)
{
log.Info($"C# Queue trigger function processed: {myQueueItem}");
Notification a;
}
网站上的样品应该会有所帮助。如果您还有其他问题,请告诉我。我们将向内置程序集列表中添加NotificationHubs,但现在您可以通过为您的函数添加一个project.json文件(如文档中所述)来添加对NoficationHubs的包引用 在此基础上,您可以为NotificationHubs添加using语句,例如:
using System.Net;
using Microsoft.Azure.NotificationHubs;
public static HttpResponseMessage Run(
HttpRequestMessage req,
TraceWriter log,
out Notification notification)
{
log.Info($"C# HTTP trigger function RequestUri={req.RequestUri}");
// TODO
notification = null;
return req.CreateResponse(HttpStatusCode.OK);
}
谢谢工作起来很有魅力!
using System.Net;
using Microsoft.Azure.NotificationHubs;
public static HttpResponseMessage Run(
HttpRequestMessage req,
TraceWriter log,
out Notification notification)
{
log.Info($"C# HTTP trigger function RequestUri={req.RequestUri}");
// TODO
notification = null;
return req.CreateResponse(HttpStatusCode.OK);
}