+ if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Microsoft::Windows::PushNotifications::PushNotificationChannel ^>(info[0]))
+ {
+ Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no object provided, or given object could not be casted to requested type")));
+ if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Microsoft::Windows::PushNotifications::PushNotificationCreateChannelResult ^>(info[0]))
+ {
+ Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no object provided, or given object could not be casted to requested type")));
+ if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Microsoft::Windows::PushNotifications::PushNotificationManager ^>(info[0]))
+ {
+ Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no object provided, or given object could not be casted to requested type")));
+ if (NodeRT::Utils::CaseInsenstiveEquals(L"pushReceived", str))
+ {
+ if (!NodeRT::Utils::IsWinRtWrapperOf<::Microsoft::Windows::PushNotifications::PushNotificationManager ^>(info.This()))
+ {
+ Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"The caller of this method isn't of the expected type or internal WinRt object was disposed")));
+ if (NodeRT::Utils::CaseInsenstiveEquals(L"pushReceived", str))
+ {
+ if (!NodeRT::Utils::IsWinRtWrapperOf<::Microsoft::Windows::PushNotifications::PushNotificationManager ^>(info.This()))
+ {
+ Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"The caller of this method isn't of the expected type or internal WinRt object was disposed")));
+ if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Microsoft::Windows::PushNotifications::PushNotificationReceivedEventArgs ^>(info[0]))
+ {
+ Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no object provided, or given object could not be casted to requested type")));
+ if (NodeRT::Utils::CaseInsenstiveEquals(L"canceled", str))
+ {
+ if (!NodeRT::Utils::IsWinRtWrapperOf<::Microsoft::Windows::PushNotifications::PushNotificationReceivedEventArgs ^>(info.This()))
+ {
+ Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"The caller of this method isn't of the expected type or internal WinRt object was disposed")));
+ if (NodeRT::Utils::CaseInsenstiveEquals(L"canceled", str))
+ {
+ if (!NodeRT::Utils::IsWinRtWrapperOf<::Microsoft::Windows::PushNotifications::PushNotificationReceivedEventArgs ^>(info.This()))
+ {
+ Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"The caller of this method isn't of the expected type or internal WinRt object was disposed")));