Код: Выделить всё
var hubClient = NotificationHubClient.CreateClientFromConnectionString(connectionString, hubName);
var notification = new Dictionary {
{ "message", "New Message" }
};
var userIdTag = "userId:12345";
await hubClient.SendTemplateNotificationAsync(notification, userTag);
Код: Выделить всё
var hubClient = NotificationHubClient.CreateClientFromConnectionString(connectionString, hubName);
var installation = new Installation
{
InstallationId = Guid.NewGuid().ToString(), //or use userId?
PushChannel = deviceToken, //sent by app
Tags = new List { "userId:12345" }
};
await hubClient.CreateOrUpdateInstallationAsync(installation);
Подробнее здесь: https://stackoverflow.com/questions/781 ... by-the-bac