Skip to content

Commit

Permalink
修改winphone 平台封装错误
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangqinghe committed Dec 19, 2014
1 parent 5b419b1 commit a5235b4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions cn.jpush.api.test/remote/NotificationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,16 @@ public void sendNotification_ios_badge()
var result = _client.SendPush(payload);
Assert.IsTrue(result.isResultOK());
}
[TestMethod]
public void sendNotification_winphone()
{
PushPayload payload = new PushPayload();
payload.platform = Platform.winphone();
payload.audience = Audience.all();
payload.notification =new Notification().setAlert("alert");

var result = _client.SendPush(payload);
Assert.IsTrue(result.isResultOK());
}
}
}
Binary file modified cn.jpush.api.v12.suo
Binary file not shown.
2 changes: 1 addition & 1 deletion cn.jpush.api/common/DeviceType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public enum DeviceType
{
[Description("android")] android,
[Description("ios")] ios,
[Description("wp")] wp
[Description("winphone")] winphone

}
}
6 changes: 3 additions & 3 deletions cn.jpush.api/push/mode/Platform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static Platform android()
public static Platform winphone()
{
HashSet<string> types = new HashSet<string>();
types.Add(DeviceType.wp.ToString());
types.Add(DeviceType.winphone.ToString());
return new Platform(false, types).Check();
}
public static Platform android_ios()
Expand All @@ -79,14 +79,14 @@ public static Platform android_winphone()
{
HashSet<string> types = new HashSet<string>();
types.Add(DeviceType.android.ToString());
types.Add(DeviceType.wp.ToString());
types.Add(DeviceType.winphone.ToString());
return new Platform(false, types).Check();
}
public static Platform ios_winphone()
{
HashSet<string> types = new HashSet<string>();
types.Add(DeviceType.ios.ToString());
types.Add(DeviceType.wp.ToString());
types.Add(DeviceType.winphone.ToString());

return new Platform(false, types).Check();
}
Expand Down

0 comments on commit a5235b4

Please sign in to comment.