コード例 #1
0
ファイル: GcmChromeTests.cs プロジェクト: GrimReio/PushSharp
		public void TestOAuth()
		{
			var wait = new ManualResetEvent(false);

			var chan = new ChromePushChannel (new ChromePushChannelSettings(oauthClientId, oauthSecret)
            {
                AuthorizationCode = "4/Ndq0smr04tldagzUcJa9MFdamaAt.srbbbJRseYMTmmS0T3UFEsOetIXtfQI",
                RefreshToken = "1/3n7TKFv2xoHNBuKqHEXDLpiBZJVGkExnR1K_uHhU0H4"
			});

			var n = new ChromeNotification ();
            n.ChannelId = "14952429134341445468/nndgomkogokhhfiogeamahchcbkldiok";
            n.SubChannelId = ChromeNotificationSubChannel.SubChannel0;
			n.Payload = "Test";

			var cb = new PushSharp.Core.SendNotificationCallbackDelegate ((sender, response) => wait.Set());

			chan.SendNotification (n, cb);

			wait.WaitOne ();
		}
コード例 #2
0
ファイル: Exceptions.cs プロジェクト: genesissupsup/nkd
 public NotificationFailureException(string errorMessage, ChromeNotification notification) : base()
 {
     this.ErrorMessage = errorMessage;
     this.Notification = notification;
 }
コード例 #3
0
ファイル: Exceptions.cs プロジェクト: GrimReio/PushSharp
		public NotificationFailureException(string errorMessage, ChromeNotification notification) : base() 
		{
			this.ErrorMessage = errorMessage;
			this.Notification = notification;
		}