WinPhoneClient.Intf.WindowsPhonePushProviderService_AsyncProxy.BeginUnregisterDevice C# (CSharp) Method

BeginUnregisterDevice() public method

public BeginUnregisterDevice ( string deviceId, System @__Callback, object @__UserData ) : System.IAsyncResult
deviceId string
@__Callback System
@__UserData object
return System.IAsyncResult
        public virtual System.IAsyncResult BeginUnregisterDevice(string deviceId, System.AsyncCallback @__Callback, object @__UserData)
        {
            RemObjects.SDK.IMessage @__LocalMessage = this.@__GetMessage();
            @__LocalMessage.InitializeRequestMessage(@__ClientChannel, "PushProvider", @__GetActiveInterfaceName(), "UnregisterDevice");
            @__LocalMessage.WriteAnsiString("deviceId", deviceId);
            @__LocalMessage.FinalizeMessage();
            return @__ClientChannel.AsyncDispatch(@__LocalMessage, @__Callback, @__UserData);
        }

Usage Example

Ejemplo n.º 1
0
 private void UnregisterOnServer()
 {
     var lService = new WindowsPhonePushProviderService_AsyncProxy(message, clientChannel);
     lService.BeginUnregisterDevice(deviceId.ToString(),
                                  ar =>
                                  {
                                      try
                                      {
                                          lService.EndUnregisterDevice(ar);
                                          Log("Device unsubscribed from notifications.\n");
                                      }
                                      catch (Exception ex)
                                      {
                                          Log("Exception during unsivscribing.\n{0}", ex.Message);
                                      }
                                  }, null);
 }