2016-04-19 14 views
1

登録後、Azure Notification Hub 内のインストールのタグを更新しようとしています。私はこれについていくつかのガイド、特にherehereに従っています。Azure通知ハブのインストールでタグが更新されない

両方のガイドでは、次のコードは機能するはずですが、明らかにそうではありません。タグは更新されません。エラーはなく、私はインストールIDが正しいことを保証することができます。私は間違ってタグのパス/値を設定していると思います。ここで

// in constructor: 
var _notificationHub = NotificationHubClient.CreateClientFromConnectionString(Settings.ConnectionStrings.NotificationHub, Settings.Defaults.NotificationHubName); 


// in WebApi endpoint: 
var installationUpdates = new List<PartialUpdateOperation>(); 
var userDetail = _userDetailRepo.Get(id); 

installationUpdates.Add(new PartialUpdateOperation 
{ 
    Operation = UpdateOperationType.Replace, 
    Path = "/tags/interestedin", // is this incorrect? 
    Value = interestedIn.ToUpper() 
}); 
userDetail.InterestedIn = interestedIn; 

await Task.WhenAll(
    _userDetailRepo.InsertOrReplace(userDetail), 
    _notificationHub.PatchInstallationAsync(installationId, installationUpdates)); 

がVSに従って、インストール対象のタグです:

enter image description here

私もPath = "/tags/interestedin:W"へのパスをハードコーディングしようとしたが、それは何の違いが行われていません。

私はここで何か間違っていると誰かが私に教えてください。ありがとう。

答えて

3

残念ながら、Path = "/ tags/interestedin"は今のところ動作しません。現在、ワイルドカードのサポートに取り組んでいます。それが完了すると、 "/ tags/interestedin *"のようなものがうまくいくでしょう。

Path = "/ tags/interestedin:W"はOKです。名前空間名、ハブ名、時間枠を提供できる場合は、ログを見てそこで何が起こっているのかを確認します。

関連する問題