从.NET解析库中安装自定义列的Parse.com查询

时间:2015-05-28 12:01:16

标签: c# parse-platform

在安装类中,我已根据需要添加了两个新列ContactIDUserEmail

现在发送推送通知时,我想查询某些ContactIDUserEmail

parse.dll 提供的推送功能如下:

SendAlertAsync(string alert, ParseQuery<ParseInstallation> query);

ParseInstallation类具有预定义的属性。如何添加我的两个新属性并构建ParseQuery?

1 个答案:

答案 0 :(得分:0)

在这里找到答案

https://parse.com/docs/dotnet/guide#push-notifications-using-advanced-targeting

var push = new ParsePush();
push.Query = from installation in ParseInstallation.Query
             where installation.Get<int>("ContactID") == 12
             select installation;
push.Alert = "Willie Hayes injured by own pop fly.";
await push.SendAsync();

await ParsePush.SendAlertAsync("Hi this is test message", new ParseQuery<ParseInstallation>()
                .Where(i => i.Get<string>("UserEmail") == "abc@gmail.com"));