Mise à niveau de la plateforme .Net :

Mono 4.2.1 Asp.Net 4.0.30319.17020

* Web.config: l'entité nbsp n'est plus supportée

* Yavsc.csproj: mise à niveau de Newtownsoft.Json

* packages.config: mise à jour des paquets nuget

* GoogleHelpers.cs: ça marchait avant, mais c'etait mal écrit et a
  cassé à la mise à niveau de la plateforme.

* SimpleJsonPostMethod.cs: using Newtonsoft.Json
This commit is contained in:
Paul Schneider 2015-12-30 21:29:58 +01:00
commit d40679cdf4
7 changed files with 56 additions and 40 deletions

View file

@ -145,14 +145,14 @@ namespace Yavsc.Model.Google.Api
public static MessageWithPayloadResponse NotifyEvent (NominativeEventPub evpub)
{
using (var r =
new SimpleJsonPostMethod<MessageWithPayload<YaEvent>,MessageWithPayloadResponse> (
new SimpleJsonPostMethod<MessageWithPayload<NominativeEventPub>,MessageWithPayloadResponse> (
"https://gcm-http.googleapis.com/gcm/send")) {
r.SetCredential ("key="+ConfigurationManager.AppSettings ["GOOGLE_API_KEY"]);
var userprofile = ProfileBase.Create (evpub.PerformerName);
var regid = userprofile.GetPropertyValue ("gregid") as string;
if (regid == null)
throw new NotImplementedException ("Notification via e-mail");
var msg = new MessageWithPayload<YaEvent> () {
var msg = new MessageWithPayload<NominativeEventPub> () {
notification = new Notification() { title = evpub.Title, body = evpub.Description, icon = "icon" },
data = evpub, registration_ids = new string[] { regid } };
return r.Invoke (msg);