// Copyright (c) The NodeRT Contributors
// All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the ""License""); you may
// not use this file except in compliance with the License. You may obtain a
// copy of the License at http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED ON AN  *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS
// OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY
// IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.
//
// See the Apache Version 2.0 License for specific language governing permissions
// and limitations under the License.

// TODO: Verify that this is is still needed..
#define NTDDI_VERSION 0x06010000

#include <v8.h>
#include "nan.h"
#include <string>
#include <ppltasks.h>
#include "CollectionsConverter.h"
#include "CollectionsWrap.h"
#include "node-async.h"
#include "NodeRtUtils.h"
#include "OpaqueWrapper.h"
#include "WrapperBase.h"

#using <Windows.WinMD>

// this undefs fixes the issues of compiling Windows.Data.Json, Windows.Storag.FileProperties, and Windows.Stroage.Search
// Some of the node header files brings windows definitions with the same names as some of the WinRT methods
#undef DocumentProperties
#undef GetObject
#undef CreateEvent
#undef FindText
#undef SendMessage

const char* REGISTRATION_TOKEN_MAP_PROPERTY_NAME = "__registrationTokenMap__";

using v8::Array;
using v8::String;
using v8::Value;
using v8::Boolean;
using v8::Integer;
using v8::FunctionTemplate;
using v8::Object;
using v8::Local;
using v8::Function;
using v8::Date;
using v8::Number;
using v8::PropertyAttribute;
using v8::Primitive;
using Nan::HandleScope;
using Nan::Persistent;
using Nan::Undefined;
using Nan::True;
using Nan::False;
using Nan::Null;
using Nan::MaybeLocal;
using Nan::EscapableHandleScope;
using Nan::HandleScope;
using Nan::TryCatch;
using namespace concurrency;

namespace NodeRT { namespace Windows { namespace UI { namespace WebUI { 
  v8::Local<v8::Value> WrapActivatedDeferral(::Windows::UI::WebUI::ActivatedDeferral^ wintRtInstance);
  ::Windows::UI::WebUI::ActivatedDeferral^ UnwrapActivatedDeferral(Local<Value> value);
  
  v8::Local<v8::Value> WrapActivatedOperation(::Windows::UI::WebUI::ActivatedOperation^ wintRtInstance);
  ::Windows::UI::WebUI::ActivatedOperation^ UnwrapActivatedOperation(Local<Value> value);
  
  v8::Local<v8::Value> WrapBackgroundActivatedEventArgs(::Windows::UI::WebUI::BackgroundActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::BackgroundActivatedEventArgs^ UnwrapBackgroundActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapEnteredBackgroundEventArgs(::Windows::UI::WebUI::EnteredBackgroundEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::EnteredBackgroundEventArgs^ UnwrapEnteredBackgroundEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapHtmlPrintDocumentSource(::Windows::UI::WebUI::HtmlPrintDocumentSource^ wintRtInstance);
  ::Windows::UI::WebUI::HtmlPrintDocumentSource^ UnwrapHtmlPrintDocumentSource(Local<Value> value);
  
  v8::Local<v8::Value> WrapIActivatedEventArgsDeferral(::Windows::UI::WebUI::IActivatedEventArgsDeferral^ wintRtInstance);
  ::Windows::UI::WebUI::IActivatedEventArgsDeferral^ UnwrapIActivatedEventArgsDeferral(Local<Value> value);
  
  v8::Local<v8::Value> WrapIWebUIBackgroundTaskInstance(::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^ wintRtInstance);
  ::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^ UnwrapIWebUIBackgroundTaskInstance(Local<Value> value);
  
  v8::Local<v8::Value> WrapIWebUINavigatedEventArgs(::Windows::UI::WebUI::IWebUINavigatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::IWebUINavigatedEventArgs^ UnwrapIWebUINavigatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapLeavingBackgroundEventArgs(::Windows::UI::WebUI::LeavingBackgroundEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::LeavingBackgroundEventArgs^ UnwrapLeavingBackgroundEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapNewWebUIViewCreatedEventArgs(::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^ UnwrapNewWebUIViewCreatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapSuspendingDeferral(::Windows::UI::WebUI::SuspendingDeferral^ wintRtInstance);
  ::Windows::UI::WebUI::SuspendingDeferral^ UnwrapSuspendingDeferral(Local<Value> value);
  
  v8::Local<v8::Value> WrapSuspendingEventArgs(::Windows::UI::WebUI::SuspendingEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::SuspendingEventArgs^ UnwrapSuspendingEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapSuspendingOperation(::Windows::UI::WebUI::SuspendingOperation^ wintRtInstance);
  ::Windows::UI::WebUI::SuspendingOperation^ UnwrapSuspendingOperation(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIApplication(::Windows::UI::WebUI::WebUIApplication^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIApplication^ UnwrapWebUIApplication(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIAppointmentsProviderAddAppointmentActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^ UnwrapWebUIAppointmentsProviderAddAppointmentActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^ UnwrapWebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^ UnwrapWebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^ UnwrapWebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIAppointmentsProviderShowTimeFrameActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^ UnwrapWebUIAppointmentsProviderShowTimeFrameActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIBackgroundTaskInstance(::Windows::UI::WebUI::WebUIBackgroundTaskInstance^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIBackgroundTaskInstance^ UnwrapWebUIBackgroundTaskInstance(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIBackgroundTaskInstanceRuntimeClass(::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^ UnwrapWebUIBackgroundTaskInstanceRuntimeClass(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIBarcodeScannerPreviewActivatedEventArgs(::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^ UnwrapWebUIBarcodeScannerPreviewActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUICachedFileUpdaterActivatedEventArgs(::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^ UnwrapWebUICachedFileUpdaterActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUICameraSettingsActivatedEventArgs(::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^ UnwrapWebUICameraSettingsActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUICommandLineActivatedEventArgs(::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^ UnwrapWebUICommandLineActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIContactCallActivatedEventArgs(::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^ UnwrapWebUIContactCallActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIContactMapActivatedEventArgs(::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^ UnwrapWebUIContactMapActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIContactMessageActivatedEventArgs(::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^ UnwrapWebUIContactMessageActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIContactPanelActivatedEventArgs(::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^ UnwrapWebUIContactPanelActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIContactPickerActivatedEventArgs(::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^ UnwrapWebUIContactPickerActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIContactPostActivatedEventArgs(::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^ UnwrapWebUIContactPostActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIContactVideoCallActivatedEventArgs(::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^ UnwrapWebUIContactVideoCallActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIDeviceActivatedEventArgs(::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^ UnwrapWebUIDeviceActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIDevicePairingActivatedEventArgs(::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^ UnwrapWebUIDevicePairingActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIDialReceiverActivatedEventArgs(::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^ UnwrapWebUIDialReceiverActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIFileActivatedEventArgs(::Windows::UI::WebUI::WebUIFileActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIFileActivatedEventArgs^ UnwrapWebUIFileActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIFileOpenPickerActivatedEventArgs(::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^ UnwrapWebUIFileOpenPickerActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIFileOpenPickerContinuationEventArgs(::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^ UnwrapWebUIFileOpenPickerContinuationEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIFileSavePickerActivatedEventArgs(::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^ UnwrapWebUIFileSavePickerActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIFileSavePickerContinuationEventArgs(::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^ UnwrapWebUIFileSavePickerContinuationEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIFolderPickerContinuationEventArgs(::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^ UnwrapWebUIFolderPickerContinuationEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUILaunchActivatedEventArgs(::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^ UnwrapWebUILaunchActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUILockScreenActivatedEventArgs(::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^ UnwrapWebUILockScreenActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUILockScreenCallActivatedEventArgs(::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^ UnwrapWebUILockScreenCallActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUILockScreenComponentActivatedEventArgs(::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^ UnwrapWebUILockScreenComponentActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUINavigatedDeferral(::Windows::UI::WebUI::WebUINavigatedDeferral^ wintRtInstance);
  ::Windows::UI::WebUI::WebUINavigatedDeferral^ UnwrapWebUINavigatedDeferral(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUINavigatedEventArgs(::Windows::UI::WebUI::WebUINavigatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUINavigatedEventArgs^ UnwrapWebUINavigatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUINavigatedOperation(::Windows::UI::WebUI::WebUINavigatedOperation^ wintRtInstance);
  ::Windows::UI::WebUI::WebUINavigatedOperation^ UnwrapWebUINavigatedOperation(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIPhoneCallActivatedEventArgs(::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^ UnwrapWebUIPhoneCallActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIPrint3DWorkflowActivatedEventArgs(::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^ UnwrapWebUIPrint3DWorkflowActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIPrintTaskSettingsActivatedEventArgs(::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^ UnwrapWebUIPrintTaskSettingsActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIPrintWorkflowForegroundTaskActivatedEventArgs(::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^ UnwrapWebUIPrintWorkflowForegroundTaskActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIProtocolActivatedEventArgs(::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^ UnwrapWebUIProtocolActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIProtocolForResultsActivatedEventArgs(::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^ UnwrapWebUIProtocolForResultsActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIRestrictedLaunchActivatedEventArgs(::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^ UnwrapWebUIRestrictedLaunchActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUISearchActivatedEventArgs(::Windows::UI::WebUI::WebUISearchActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUISearchActivatedEventArgs^ UnwrapWebUISearchActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIShareTargetActivatedEventArgs(::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^ UnwrapWebUIShareTargetActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIStartupTaskActivatedEventArgs(::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^ UnwrapWebUIStartupTaskActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIToastNotificationActivatedEventArgs(::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^ UnwrapWebUIToastNotificationActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIUserDataAccountProviderActivatedEventArgs(::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^ UnwrapWebUIUserDataAccountProviderActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIView(::Windows::UI::WebUI::WebUIView^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIView^ UnwrapWebUIView(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIVoiceCommandActivatedEventArgs(::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^ UnwrapWebUIVoiceCommandActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIWalletActionActivatedEventArgs(::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^ UnwrapWebUIWalletActionActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIWebAccountProviderActivatedEventArgs(::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^ UnwrapWebUIWebAccountProviderActivatedEventArgs(Local<Value> value);
  
  v8::Local<v8::Value> WrapWebUIWebAuthenticationBrokerContinuationEventArgs(::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^ wintRtInstance);
  ::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^ UnwrapWebUIWebAuthenticationBrokerContinuationEventArgs(Local<Value> value);
  



  static void InitPrintContentEnum(const Local<Object> exports) {
    HandleScope scope;

    Local<Object> enumObject = Nan::New<Object>();

    Nan::Set(exports, Nan::New<String>("PrintContent").ToLocalChecked(), enumObject);
    Nan::Set(enumObject, Nan::New<String>("allPages").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::UI::WebUI::PrintContent::AllPages)));
    Nan::Set(enumObject, Nan::New<String>("currentPage").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::UI::WebUI::PrintContent::CurrentPage)));
    Nan::Set(enumObject, Nan::New<String>("customPageRange").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::UI::WebUI::PrintContent::CustomPageRange)));
    Nan::Set(enumObject, Nan::New<String>("currentSelection").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::UI::WebUI::PrintContent::CurrentSelection)));
  }


  static bool IsColorJsObject(Local<Value> value) {
    if (!value->IsObject()) {
      return false;
    }

    Local<String> symbol;
    Local<Object> obj = Nan::To<Object>(value).ToLocalChecked();

    return true;
  }

  ::Windows::UI::Color ColorFromJsObject(Local<Value> value) {
    HandleScope scope;
    ::Windows::UI::Color returnValue;

    if (!value->IsObject()) {
      Nan::ThrowError(Nan::TypeError(NodeRT::Utils::NewString(L"Unexpected type, expected an object")));
      return returnValue;
    }

    Local<Object> obj = Nan::To<Object>(value).ToLocalChecked();
    Local<String> symbol;

    return returnValue;
  }

  Local<Value> ColorToJsObject(::Windows::UI::Color value) {
    EscapableHandleScope scope;

    Local<Object> obj = Nan::New<Object>();


    return scope.Escape(obj);
  }

  class ActivatedDeferral : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("ActivatedDeferral").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "complete", Complete);
          




        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("ActivatedDeferral").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      ActivatedDeferral(::Windows::UI::WebUI::ActivatedDeferral^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::ActivatedDeferral^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::ActivatedDeferral^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::ActivatedDeferral^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      ActivatedDeferral *wrapperInstance = new ActivatedDeferral(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::ActivatedDeferral^>(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")));
        return;
      }

      ::Windows::UI::WebUI::ActivatedDeferral^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::ActivatedDeferral^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapActivatedDeferral(winRtInstance));
    }


    static void Complete(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::ActivatedDeferral^>(info.This())) {
        return;
      }

      ActivatedDeferral *wrapper = ActivatedDeferral::Unwrap<ActivatedDeferral>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          wrapper->_instance->Complete();
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }





    private:
      ::Windows::UI::WebUI::ActivatedDeferral^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapActivatedDeferral(::Windows::UI::WebUI::ActivatedDeferral^ wintRtInstance);
      friend ::Windows::UI::WebUI::ActivatedDeferral^ UnwrapActivatedDeferral(Local<Value> value);
  };

  Persistent<FunctionTemplate> ActivatedDeferral::s_constructorTemplate;

  v8::Local<v8::Value> WrapActivatedDeferral(::Windows::UI::WebUI::ActivatedDeferral^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(ActivatedDeferral::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::ActivatedDeferral^ UnwrapActivatedDeferral(Local<Value> value) {
     return ActivatedDeferral::Unwrap<ActivatedDeferral>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitActivatedDeferral(Local<Object> exports) {
    ActivatedDeferral::Init(exports);
  }

  class ActivatedOperation : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("ActivatedOperation").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getDeferral", GetDeferral);
          




        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("ActivatedOperation").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      ActivatedOperation(::Windows::UI::WebUI::ActivatedOperation^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::ActivatedOperation^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::ActivatedOperation^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::ActivatedOperation^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      ActivatedOperation *wrapperInstance = new ActivatedOperation(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::ActivatedOperation^>(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")));
        return;
      }

      ::Windows::UI::WebUI::ActivatedOperation^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::ActivatedOperation^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapActivatedOperation(winRtInstance));
    }


    static void GetDeferral(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::ActivatedOperation^>(info.This())) {
        return;
      }

      ActivatedOperation *wrapper = ActivatedOperation::Unwrap<ActivatedOperation>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          ::Windows::UI::WebUI::ActivatedDeferral^ result;
          result = wrapper->_instance->GetDeferral();
          info.GetReturnValue().Set(WrapActivatedDeferral(result));
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }





    private:
      ::Windows::UI::WebUI::ActivatedOperation^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapActivatedOperation(::Windows::UI::WebUI::ActivatedOperation^ wintRtInstance);
      friend ::Windows::UI::WebUI::ActivatedOperation^ UnwrapActivatedOperation(Local<Value> value);
  };

  Persistent<FunctionTemplate> ActivatedOperation::s_constructorTemplate;

  v8::Local<v8::Value> WrapActivatedOperation(::Windows::UI::WebUI::ActivatedOperation^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(ActivatedOperation::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::ActivatedOperation^ UnwrapActivatedOperation(Local<Value> value) {
     return ActivatedOperation::Unwrap<ActivatedOperation>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitActivatedOperation(Local<Object> exports) {
    ActivatedOperation::Init(exports);
  }

  class BackgroundActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("BackgroundActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("taskInstance").ToLocalChecked(), TaskInstanceGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("BackgroundActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      BackgroundActivatedEventArgs(::Windows::UI::WebUI::BackgroundActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::BackgroundActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::BackgroundActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::BackgroundActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      BackgroundActivatedEventArgs *wrapperInstance = new BackgroundActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::BackgroundActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::BackgroundActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::BackgroundActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapBackgroundActivatedEventArgs(winRtInstance));
    }





    static void TaskInstanceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::BackgroundActivatedEventArgs^>(info.This())) {
        return;
      }

      BackgroundActivatedEventArgs *wrapper = BackgroundActivatedEventArgs::Unwrap<BackgroundActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Background::IBackgroundTaskInstance^ result = wrapper->_instance->TaskInstance;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Background", "IBackgroundTaskInstance", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::BackgroundActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapBackgroundActivatedEventArgs(::Windows::UI::WebUI::BackgroundActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::BackgroundActivatedEventArgs^ UnwrapBackgroundActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> BackgroundActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapBackgroundActivatedEventArgs(::Windows::UI::WebUI::BackgroundActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(BackgroundActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::BackgroundActivatedEventArgs^ UnwrapBackgroundActivatedEventArgs(Local<Value> value) {
     return BackgroundActivatedEventArgs::Unwrap<BackgroundActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitBackgroundActivatedEventArgs(Local<Object> exports) {
    BackgroundActivatedEventArgs::Init(exports);
  }

  class EnteredBackgroundEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("EnteredBackgroundEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getDeferral", GetDeferral);
          




        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("EnteredBackgroundEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      EnteredBackgroundEventArgs(::Windows::UI::WebUI::EnteredBackgroundEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::EnteredBackgroundEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::EnteredBackgroundEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::EnteredBackgroundEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      EnteredBackgroundEventArgs *wrapperInstance = new EnteredBackgroundEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::EnteredBackgroundEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::EnteredBackgroundEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::EnteredBackgroundEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapEnteredBackgroundEventArgs(winRtInstance));
    }


    static void GetDeferral(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::EnteredBackgroundEventArgs^>(info.This())) {
        return;
      }

      EnteredBackgroundEventArgs *wrapper = EnteredBackgroundEventArgs::Unwrap<EnteredBackgroundEventArgs>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          ::Windows::Foundation::Deferral^ result;
          result = wrapper->_instance->GetDeferral();
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Deferral", result));
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }





    private:
      ::Windows::UI::WebUI::EnteredBackgroundEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapEnteredBackgroundEventArgs(::Windows::UI::WebUI::EnteredBackgroundEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::EnteredBackgroundEventArgs^ UnwrapEnteredBackgroundEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> EnteredBackgroundEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapEnteredBackgroundEventArgs(::Windows::UI::WebUI::EnteredBackgroundEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(EnteredBackgroundEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::EnteredBackgroundEventArgs^ UnwrapEnteredBackgroundEventArgs(Local<Value> value) {
     return EnteredBackgroundEventArgs::Unwrap<EnteredBackgroundEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitEnteredBackgroundEventArgs(Local<Object> exports) {
    EnteredBackgroundEventArgs::Init(exports);
  }

  class HtmlPrintDocumentSource : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("HtmlPrintDocumentSource").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "trySetPageRange", TrySetPageRange);
            Nan::SetPrototypeMethod(localRef, "close", Close);
          



          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("topMargin").ToLocalChecked(), TopMarginGetter, TopMarginSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("shrinkToFit").ToLocalChecked(), ShrinkToFitGetter, ShrinkToFitSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("rightMargin").ToLocalChecked(), RightMarginGetter, RightMarginSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("percentScale").ToLocalChecked(), PercentScaleGetter, PercentScaleSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("leftMargin").ToLocalChecked(), LeftMarginGetter, LeftMarginSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("enableHeaderFooter").ToLocalChecked(), EnableHeaderFooterGetter, EnableHeaderFooterSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("content").ToLocalChecked(), ContentGetter, ContentSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("bottomMargin").ToLocalChecked(), BottomMarginGetter, BottomMarginSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("pageRange").ToLocalChecked(), PageRangeGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("HtmlPrintDocumentSource").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      HtmlPrintDocumentSource(::Windows::UI::WebUI::HtmlPrintDocumentSource^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::HtmlPrintDocumentSource^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::HtmlPrintDocumentSource^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      HtmlPrintDocumentSource *wrapperInstance = new HtmlPrintDocumentSource(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(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")));
        return;
      }

      ::Windows::UI::WebUI::HtmlPrintDocumentSource^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::HtmlPrintDocumentSource^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapHtmlPrintDocumentSource(winRtInstance));
    }


    static void TrySetPageRange(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      if (info.Length() == 1
        && info[0]->IsString())
      {
        try
        {
          Platform::String^ arg0 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[0])));
          
          bool result;
          result = wrapper->_instance->TrySetPageRange(arg0);
          info.GetReturnValue().Set(Nan::New<Boolean>(result));
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }

    static void Close(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      if (info.Length() == 0) {
        try {
          delete wrapper->_instance;
          wrapper->_instance = nullptr;
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      } else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }



    static void TopMarginGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try  {
        float result = wrapper->_instance->TopMargin;
        info.GetReturnValue().Set(Nan::New<Number>(static_cast<double>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TopMarginSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsNumber()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try {

        float winRtValue = static_cast<float>(Nan::To<double>(value).FromMaybe(0.0));

        wrapper->_instance->TopMargin = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void ShrinkToFitGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try  {
        bool result = wrapper->_instance->ShrinkToFit;
        info.GetReturnValue().Set(Nan::New<Boolean>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ShrinkToFitSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsBoolean()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try {

        bool winRtValue = Nan::To<bool>(value).FromMaybe(false);

        wrapper->_instance->ShrinkToFit = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void RightMarginGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try  {
        float result = wrapper->_instance->RightMargin;
        info.GetReturnValue().Set(Nan::New<Number>(static_cast<double>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void RightMarginSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsNumber()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try {

        float winRtValue = static_cast<float>(Nan::To<double>(value).FromMaybe(0.0));

        wrapper->_instance->RightMargin = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void PercentScaleGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try  {
        float result = wrapper->_instance->PercentScale;
        info.GetReturnValue().Set(Nan::New<Number>(static_cast<double>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PercentScaleSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsNumber()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try {

        float winRtValue = static_cast<float>(Nan::To<double>(value).FromMaybe(0.0));

        wrapper->_instance->PercentScale = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LeftMarginGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try  {
        float result = wrapper->_instance->LeftMargin;
        info.GetReturnValue().Set(Nan::New<Number>(static_cast<double>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void LeftMarginSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsNumber()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try {

        float winRtValue = static_cast<float>(Nan::To<double>(value).FromMaybe(0.0));

        wrapper->_instance->LeftMargin = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void EnableHeaderFooterGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try  {
        bool result = wrapper->_instance->EnableHeaderFooter;
        info.GetReturnValue().Set(Nan::New<Boolean>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void EnableHeaderFooterSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsBoolean()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try {

        bool winRtValue = Nan::To<bool>(value).FromMaybe(false);

        wrapper->_instance->EnableHeaderFooter = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void ContentGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try  {
        ::Windows::UI::WebUI::PrintContent result = wrapper->_instance->Content;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContentSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsInt32()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try {

        ::Windows::UI::WebUI::PrintContent winRtValue = static_cast<::Windows::UI::WebUI::PrintContent>(Nan::To<int32_t>(value).FromMaybe(0));

        wrapper->_instance->Content = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void BottomMarginGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try  {
        float result = wrapper->_instance->BottomMargin;
        info.GetReturnValue().Set(Nan::New<Number>(static_cast<double>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BottomMarginSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsNumber()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try {

        float winRtValue = static_cast<float>(Nan::To<double>(value).FromMaybe(0.0));

        wrapper->_instance->BottomMargin = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void PageRangeGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::HtmlPrintDocumentSource^>(info.This())) {
        return;
      }

      HtmlPrintDocumentSource *wrapper = HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->PageRange;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::HtmlPrintDocumentSource^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapHtmlPrintDocumentSource(::Windows::UI::WebUI::HtmlPrintDocumentSource^ wintRtInstance);
      friend ::Windows::UI::WebUI::HtmlPrintDocumentSource^ UnwrapHtmlPrintDocumentSource(Local<Value> value);
  };

  Persistent<FunctionTemplate> HtmlPrintDocumentSource::s_constructorTemplate;

  v8::Local<v8::Value> WrapHtmlPrintDocumentSource(::Windows::UI::WebUI::HtmlPrintDocumentSource^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(HtmlPrintDocumentSource::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::HtmlPrintDocumentSource^ UnwrapHtmlPrintDocumentSource(Local<Value> value) {
     return HtmlPrintDocumentSource::Unwrap<HtmlPrintDocumentSource>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitHtmlPrintDocumentSource(Local<Object> exports) {
    HtmlPrintDocumentSource::Init(exports);
  }

  class IActivatedEventArgsDeferral : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("IActivatedEventArgsDeferral").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("IActivatedEventArgsDeferral").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      IActivatedEventArgsDeferral(::Windows::UI::WebUI::IActivatedEventArgsDeferral^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::IActivatedEventArgsDeferral^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::IActivatedEventArgsDeferral^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::IActivatedEventArgsDeferral^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      IActivatedEventArgsDeferral *wrapperInstance = new IActivatedEventArgsDeferral(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::IActivatedEventArgsDeferral^>(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")));
        return;
      }

      ::Windows::UI::WebUI::IActivatedEventArgsDeferral^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::IActivatedEventArgsDeferral^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapIActivatedEventArgsDeferral(winRtInstance));
    }





    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::IActivatedEventArgsDeferral^>(info.This())) {
        return;
      }

      IActivatedEventArgsDeferral *wrapper = IActivatedEventArgsDeferral::Unwrap<IActivatedEventArgsDeferral>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::IActivatedEventArgsDeferral^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapIActivatedEventArgsDeferral(::Windows::UI::WebUI::IActivatedEventArgsDeferral^ wintRtInstance);
      friend ::Windows::UI::WebUI::IActivatedEventArgsDeferral^ UnwrapIActivatedEventArgsDeferral(Local<Value> value);
  };

  Persistent<FunctionTemplate> IActivatedEventArgsDeferral::s_constructorTemplate;

  v8::Local<v8::Value> WrapIActivatedEventArgsDeferral(::Windows::UI::WebUI::IActivatedEventArgsDeferral^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(IActivatedEventArgsDeferral::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::IActivatedEventArgsDeferral^ UnwrapIActivatedEventArgsDeferral(Local<Value> value) {
     return IActivatedEventArgsDeferral::Unwrap<IActivatedEventArgsDeferral>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitIActivatedEventArgsDeferral(Local<Object> exports) {
    IActivatedEventArgsDeferral::Init(exports);
  }

  class IWebUIBackgroundTaskInstance : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("IWebUIBackgroundTaskInstance").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("succeeded").ToLocalChecked(), SucceededGetter, SucceededSetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("IWebUIBackgroundTaskInstance").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      IWebUIBackgroundTaskInstance(::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      IWebUIBackgroundTaskInstance *wrapperInstance = new IWebUIBackgroundTaskInstance(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^>(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")));
        return;
      }

      ::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapIWebUIBackgroundTaskInstance(winRtInstance));
    }





    static void SucceededGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^>(info.This())) {
        return;
      }

      IWebUIBackgroundTaskInstance *wrapper = IWebUIBackgroundTaskInstance::Unwrap<IWebUIBackgroundTaskInstance>(info.This());

      try  {
        bool result = wrapper->_instance->Succeeded;
        info.GetReturnValue().Set(Nan::New<Boolean>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SucceededSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsBoolean()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^>(info.This())) {
        return;
      }

      IWebUIBackgroundTaskInstance *wrapper = IWebUIBackgroundTaskInstance::Unwrap<IWebUIBackgroundTaskInstance>(info.This());

      try {

        bool winRtValue = Nan::To<bool>(value).FromMaybe(false);

        wrapper->_instance->Succeeded = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      


    private:
      ::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapIWebUIBackgroundTaskInstance(::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^ wintRtInstance);
      friend ::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^ UnwrapIWebUIBackgroundTaskInstance(Local<Value> value);
  };

  Persistent<FunctionTemplate> IWebUIBackgroundTaskInstance::s_constructorTemplate;

  v8::Local<v8::Value> WrapIWebUIBackgroundTaskInstance(::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(IWebUIBackgroundTaskInstance::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^ UnwrapIWebUIBackgroundTaskInstance(Local<Value> value) {
     return IWebUIBackgroundTaskInstance::Unwrap<IWebUIBackgroundTaskInstance>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitIWebUIBackgroundTaskInstance(Local<Object> exports) {
    IWebUIBackgroundTaskInstance::Init(exports);
  }

  class IWebUINavigatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("IWebUINavigatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("navigatedOperation").ToLocalChecked(), NavigatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("IWebUINavigatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      IWebUINavigatedEventArgs(::Windows::UI::WebUI::IWebUINavigatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::IWebUINavigatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::IWebUINavigatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::IWebUINavigatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      IWebUINavigatedEventArgs *wrapperInstance = new IWebUINavigatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::IWebUINavigatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::IWebUINavigatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::IWebUINavigatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapIWebUINavigatedEventArgs(winRtInstance));
    }





    static void NavigatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::IWebUINavigatedEventArgs^>(info.This())) {
        return;
      }

      IWebUINavigatedEventArgs *wrapper = IWebUINavigatedEventArgs::Unwrap<IWebUINavigatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::WebUINavigatedOperation^ result = wrapper->_instance->NavigatedOperation;
        info.GetReturnValue().Set(WrapWebUINavigatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::IWebUINavigatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapIWebUINavigatedEventArgs(::Windows::UI::WebUI::IWebUINavigatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::IWebUINavigatedEventArgs^ UnwrapIWebUINavigatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> IWebUINavigatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapIWebUINavigatedEventArgs(::Windows::UI::WebUI::IWebUINavigatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(IWebUINavigatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::IWebUINavigatedEventArgs^ UnwrapIWebUINavigatedEventArgs(Local<Value> value) {
     return IWebUINavigatedEventArgs::Unwrap<IWebUINavigatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitIWebUINavigatedEventArgs(Local<Object> exports) {
    IWebUINavigatedEventArgs::Init(exports);
  }

  class LeavingBackgroundEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("LeavingBackgroundEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getDeferral", GetDeferral);
          




        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("LeavingBackgroundEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      LeavingBackgroundEventArgs(::Windows::UI::WebUI::LeavingBackgroundEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::LeavingBackgroundEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::LeavingBackgroundEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::LeavingBackgroundEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      LeavingBackgroundEventArgs *wrapperInstance = new LeavingBackgroundEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::LeavingBackgroundEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::LeavingBackgroundEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::LeavingBackgroundEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapLeavingBackgroundEventArgs(winRtInstance));
    }


    static void GetDeferral(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::LeavingBackgroundEventArgs^>(info.This())) {
        return;
      }

      LeavingBackgroundEventArgs *wrapper = LeavingBackgroundEventArgs::Unwrap<LeavingBackgroundEventArgs>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          ::Windows::Foundation::Deferral^ result;
          result = wrapper->_instance->GetDeferral();
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Deferral", result));
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }





    private:
      ::Windows::UI::WebUI::LeavingBackgroundEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapLeavingBackgroundEventArgs(::Windows::UI::WebUI::LeavingBackgroundEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::LeavingBackgroundEventArgs^ UnwrapLeavingBackgroundEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> LeavingBackgroundEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapLeavingBackgroundEventArgs(::Windows::UI::WebUI::LeavingBackgroundEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(LeavingBackgroundEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::LeavingBackgroundEventArgs^ UnwrapLeavingBackgroundEventArgs(Local<Value> value) {
     return LeavingBackgroundEventArgs::Unwrap<LeavingBackgroundEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitLeavingBackgroundEventArgs(Local<Object> exports) {
    LeavingBackgroundEventArgs::Init(exports);
  }

  class NewWebUIViewCreatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("NewWebUIViewCreatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getDeferral", GetDeferral);
          



          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedEventArgs").ToLocalChecked(), ActivatedEventArgsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("hasPendingNavigate").ToLocalChecked(), HasPendingNavigateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("webUIView").ToLocalChecked(), WebUIViewGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("NewWebUIViewCreatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      NewWebUIViewCreatedEventArgs(::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      NewWebUIViewCreatedEventArgs *wrapperInstance = new NewWebUIViewCreatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapNewWebUIViewCreatedEventArgs(winRtInstance));
    }


    static void GetDeferral(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^>(info.This())) {
        return;
      }

      NewWebUIViewCreatedEventArgs *wrapper = NewWebUIViewCreatedEventArgs::Unwrap<NewWebUIViewCreatedEventArgs>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          ::Windows::Foundation::Deferral^ result;
          result = wrapper->_instance->GetDeferral();
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Deferral", result));
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }



    static void ActivatedEventArgsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^>(info.This())) {
        return;
      }

      NewWebUIViewCreatedEventArgs *wrapper = NewWebUIViewCreatedEventArgs::Unwrap<NewWebUIViewCreatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::IActivatedEventArgs^ result = wrapper->_instance->ActivatedEventArgs;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "IActivatedEventArgs", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void HasPendingNavigateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^>(info.This())) {
        return;
      }

      NewWebUIViewCreatedEventArgs *wrapper = NewWebUIViewCreatedEventArgs::Unwrap<NewWebUIViewCreatedEventArgs>(info.This());

      try  {
        bool result = wrapper->_instance->HasPendingNavigate;
        info.GetReturnValue().Set(Nan::New<Boolean>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void WebUIViewGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^>(info.This())) {
        return;
      }

      NewWebUIViewCreatedEventArgs *wrapper = NewWebUIViewCreatedEventArgs::Unwrap<NewWebUIViewCreatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::WebUIView^ result = wrapper->_instance->WebUIView;
        info.GetReturnValue().Set(WrapWebUIView(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapNewWebUIViewCreatedEventArgs(::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^ UnwrapNewWebUIViewCreatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> NewWebUIViewCreatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapNewWebUIViewCreatedEventArgs(::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(NewWebUIViewCreatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^ UnwrapNewWebUIViewCreatedEventArgs(Local<Value> value) {
     return NewWebUIViewCreatedEventArgs::Unwrap<NewWebUIViewCreatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitNewWebUIViewCreatedEventArgs(Local<Object> exports) {
    NewWebUIViewCreatedEventArgs::Init(exports);
  }

  class SuspendingDeferral : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("SuspendingDeferral").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "complete", Complete);
          




        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SuspendingDeferral").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SuspendingDeferral(::Windows::UI::WebUI::SuspendingDeferral^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::SuspendingDeferral^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::SuspendingDeferral^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::SuspendingDeferral^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      SuspendingDeferral *wrapperInstance = new SuspendingDeferral(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::SuspendingDeferral^>(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")));
        return;
      }

      ::Windows::UI::WebUI::SuspendingDeferral^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::SuspendingDeferral^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSuspendingDeferral(winRtInstance));
    }


    static void Complete(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::SuspendingDeferral^>(info.This())) {
        return;
      }

      SuspendingDeferral *wrapper = SuspendingDeferral::Unwrap<SuspendingDeferral>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          wrapper->_instance->Complete();
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }





    private:
      ::Windows::UI::WebUI::SuspendingDeferral^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSuspendingDeferral(::Windows::UI::WebUI::SuspendingDeferral^ wintRtInstance);
      friend ::Windows::UI::WebUI::SuspendingDeferral^ UnwrapSuspendingDeferral(Local<Value> value);
  };

  Persistent<FunctionTemplate> SuspendingDeferral::s_constructorTemplate;

  v8::Local<v8::Value> WrapSuspendingDeferral(::Windows::UI::WebUI::SuspendingDeferral^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(SuspendingDeferral::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::SuspendingDeferral^ UnwrapSuspendingDeferral(Local<Value> value) {
     return SuspendingDeferral::Unwrap<SuspendingDeferral>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSuspendingDeferral(Local<Object> exports) {
    SuspendingDeferral::Init(exports);
  }

  class SuspendingEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("SuspendingEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("suspendingOperation").ToLocalChecked(), SuspendingOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SuspendingEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SuspendingEventArgs(::Windows::UI::WebUI::SuspendingEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::SuspendingEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::SuspendingEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::SuspendingEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      SuspendingEventArgs *wrapperInstance = new SuspendingEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::SuspendingEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::SuspendingEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::SuspendingEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSuspendingEventArgs(winRtInstance));
    }





    static void SuspendingOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::SuspendingEventArgs^>(info.This())) {
        return;
      }

      SuspendingEventArgs *wrapper = SuspendingEventArgs::Unwrap<SuspendingEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::SuspendingOperation^ result = wrapper->_instance->SuspendingOperation;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel", "SuspendingOperation", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::SuspendingEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSuspendingEventArgs(::Windows::UI::WebUI::SuspendingEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::SuspendingEventArgs^ UnwrapSuspendingEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> SuspendingEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapSuspendingEventArgs(::Windows::UI::WebUI::SuspendingEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(SuspendingEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::SuspendingEventArgs^ UnwrapSuspendingEventArgs(Local<Value> value) {
     return SuspendingEventArgs::Unwrap<SuspendingEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSuspendingEventArgs(Local<Object> exports) {
    SuspendingEventArgs::Init(exports);
  }

  class SuspendingOperation : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("SuspendingOperation").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getDeferral", GetDeferral);
          



          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("deadline").ToLocalChecked(), DeadlineGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SuspendingOperation").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SuspendingOperation(::Windows::UI::WebUI::SuspendingOperation^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::SuspendingOperation^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::SuspendingOperation^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::SuspendingOperation^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      SuspendingOperation *wrapperInstance = new SuspendingOperation(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::SuspendingOperation^>(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")));
        return;
      }

      ::Windows::UI::WebUI::SuspendingOperation^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::SuspendingOperation^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSuspendingOperation(winRtInstance));
    }


    static void GetDeferral(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::SuspendingOperation^>(info.This())) {
        return;
      }

      SuspendingOperation *wrapper = SuspendingOperation::Unwrap<SuspendingOperation>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          ::Windows::ApplicationModel::SuspendingDeferral^ result;
          result = wrapper->_instance->GetDeferral();
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel", "SuspendingDeferral", result));
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }



    static void DeadlineGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::SuspendingOperation^>(info.This())) {
        return;
      }

      SuspendingOperation *wrapper = SuspendingOperation::Unwrap<SuspendingOperation>(info.This());

      try  {
        ::Windows::Foundation::DateTime result = wrapper->_instance->Deadline;
        info.GetReturnValue().Set(NodeRT::Utils::DateTimeToJS(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::SuspendingOperation^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSuspendingOperation(::Windows::UI::WebUI::SuspendingOperation^ wintRtInstance);
      friend ::Windows::UI::WebUI::SuspendingOperation^ UnwrapSuspendingOperation(Local<Value> value);
  };

  Persistent<FunctionTemplate> SuspendingOperation::s_constructorTemplate;

  v8::Local<v8::Value> WrapSuspendingOperation(::Windows::UI::WebUI::SuspendingOperation^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(SuspendingOperation::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::SuspendingOperation^ UnwrapSuspendingOperation(Local<Value> value) {
     return SuspendingOperation::Unwrap<SuspendingOperation>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSuspendingOperation(Local<Object> exports) {
    SuspendingOperation::Init(exports);
  }

  class WebUIApplication : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIApplication").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);

        Local<Function> func;
        Local<FunctionTemplate> funcTemplate;





        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);

        Nan::SetMethod(constructor, "enablePrelaunch", EnablePrelaunch);
        func = Nan::GetFunction(Nan::New<FunctionTemplate>(RequestRestartAsync)).ToLocalChecked();
        Nan::Set(constructor, Nan::New<String>("requestRestartAsync").ToLocalChecked(), func);
        func = Nan::GetFunction(Nan::New<FunctionTemplate>(RequestRestartForUserAsync)).ToLocalChecked();
        Nan::Set(constructor, Nan::New<String>("requestRestartForUserAsync").ToLocalChecked(), func);
        
              Local<Function> addListenerFunc = Nan::GetFunction(Nan::New<FunctionTemplate>(AddListener)).ToLocalChecked();
              Nan::Set(constructor, Nan::New<String>("addListener").ToLocalChecked(), addListenerFunc);
              Nan::Set(constructor, Nan::New<String>("on").ToLocalChecked(), addListenerFunc);
              Local<Function> removeListenerFunc = Nan::GetFunction(Nan::New<FunctionTemplate>(RemoveListener)).ToLocalChecked();
              Nan::Set(constructor, Nan::New<String>("removeListener").ToLocalChecked(), removeListenerFunc);
              Nan::Set(constructor, Nan::New<String>("off").ToLocalChecked(), removeListenerFunc);


        Nan::Set(exports, Nan::New<String>("WebUIApplication").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIApplication(::Windows::UI::WebUI::WebUIApplication^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIApplication^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIApplication^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIApplication^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIApplication *wrapperInstance = new WebUIApplication(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIApplication^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIApplication^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIApplication^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIApplication(winRtInstance));
    }




    static void RequestRestartAsync(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (info.Length() == 0 || !info[info.Length() -1]->IsFunction()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: No callback was given")));
        return;
      }

      ::Windows::Foundation::IAsyncOperation<::Windows::ApplicationModel::Core::AppRestartFailureReason>^ op;


      if (info.Length() == 2
          && info[0]->IsString())
      {
        try
        {
          Platform::String^ arg0 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[0])));
            
          op = ::Windows::UI::WebUI::WebUIApplication::RequestRestartAsync(arg0);
        } catch (Platform::Exception ^exception) {
            NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
            return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }

      auto opTask = create_task(op);
      uv_async_t* asyncToken = NodeUtils::Async::GetAsyncToken(info[info.Length() -1].As<Function>());

      opTask.then( [asyncToken] (task<::Windows::ApplicationModel::Core::AppRestartFailureReason> t)
      {
        try {
          auto result = t.get();
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [result](NodeUtils::InvokeCallbackDelegate invokeCallback) {


            Local<Value> error;
            Local<Value> arg1;
            {
              TryCatch tryCatch;
              arg1 = Nan::New<Integer>(static_cast<int>(result));
              if (tryCatch.HasCaught())
              {
                error = Nan::To<Object>(tryCatch.Exception()).ToLocalChecked();
              }
              else
              {
                error = Undefined();
              }
              if (arg1.IsEmpty()) arg1 = Undefined();
            }
            Local<Value> args[] = {error, arg1};


            invokeCallback(_countof(args), args);
          });
        }
        catch (Platform::Exception^ exception)
        {
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [exception](NodeUtils::InvokeCallbackDelegate invokeCallback) {

            Local<Value> error = NodeRT::Utils::WinRtExceptionToJsError(exception);

            Local<Value> args[] = {error};
            invokeCallback(_countof(args), args);
          });
        }
      });
    }

    static void RequestRestartForUserAsync(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (info.Length() == 0 || !info[info.Length() -1]->IsFunction()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: No callback was given")));
        return;
      }

      ::Windows::Foundation::IAsyncOperation<::Windows::ApplicationModel::Core::AppRestartFailureReason>^ op;


      if (info.Length() == 3
          && NodeRT::Utils::IsWinRtWrapperOf<::Windows::System::User^>(info[0])
          && info[1]->IsString())
      {
        try
        {
          ::Windows::System::User^ arg0 = dynamic_cast<::Windows::System::User^>(NodeRT::Utils::GetObjectInstance(info[0]));
          Platform::String^ arg1 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[1])));
            
          op = ::Windows::UI::WebUI::WebUIApplication::RequestRestartForUserAsync(arg0,arg1);
        } catch (Platform::Exception ^exception) {
            NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
            return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }

      auto opTask = create_task(op);
      uv_async_t* asyncToken = NodeUtils::Async::GetAsyncToken(info[info.Length() -1].As<Function>());

      opTask.then( [asyncToken] (task<::Windows::ApplicationModel::Core::AppRestartFailureReason> t)
      {
        try {
          auto result = t.get();
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [result](NodeUtils::InvokeCallbackDelegate invokeCallback) {


            Local<Value> error;
            Local<Value> arg1;
            {
              TryCatch tryCatch;
              arg1 = Nan::New<Integer>(static_cast<int>(result));
              if (tryCatch.HasCaught())
              {
                error = Nan::To<Object>(tryCatch.Exception()).ToLocalChecked();
              }
              else
              {
                error = Undefined();
              }
              if (arg1.IsEmpty()) arg1 = Undefined();
            }
            Local<Value> args[] = {error, arg1};


            invokeCallback(_countof(args), args);
          });
        }
        catch (Platform::Exception^ exception)
        {
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [exception](NodeUtils::InvokeCallbackDelegate invokeCallback) {

            Local<Value> error = NodeRT::Utils::WinRtExceptionToJsError(exception);

            Local<Value> args[] = {error};
            invokeCallback(_countof(args), args);
          });
        }
      });
    }


    static void EnablePrelaunch(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (info.Length() == 1
        && info[0]->IsBoolean())
      {
        try
        {
          bool arg0 = Nan::To<bool>(info[0]).FromMaybe(false);
          
          ::Windows::UI::WebUI::WebUIApplication::EnablePrelaunch(arg0);
          return;
        }
        catch (Platform::Exception ^exception)
        {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else  {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }



    static void AddListener(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (info.Length() < 2 || !info[0]->IsString() || !info[1]->IsFunction()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"wrong arguments, expected arguments are eventName(string),callback(function)")));
        return;
      }

      String::Value eventName(v8::Isolate::GetCurrent(), info[0]);
      auto str = *eventName;

      Local<Function> callback = info[1].As<Function>();

      ::Windows::Foundation::EventRegistrationToken registrationToken;
      if (NodeRT::Utils::CaseInsenstiveEquals(L"backgroundActivated", str))
      {
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = ::Windows::UI::WebUI::WebUIApplication::BackgroundActivated::add(
            ref new ::Windows::UI::WebUI::BackgroundActivatedEventHandler(
            [callbackObjPtr](::Platform::Object^ arg0, ::Windows::ApplicationModel::Activation::IBackgroundActivatedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = CreateOpaqueWrapper(arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "IBackgroundActivatedEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"newWebUIViewCreated", str))
      {
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = ::Windows::UI::WebUI::WebUIApplication::NewWebUIViewCreated::add(
            ref new ::Windows::Foundation::EventHandler<::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^>(
            [callbackObjPtr](::Platform::Object^ arg0, ::Windows::UI::WebUI::NewWebUIViewCreatedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = CreateOpaqueWrapper(arg0);
                  wrappedArg1 = WrapNewWebUIViewCreatedEventArgs(arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"enteredBackground", str))
      {
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = ::Windows::UI::WebUI::WebUIApplication::EnteredBackground::add(
            ref new ::Windows::UI::WebUI::EnteredBackgroundEventHandler(
            [callbackObjPtr](::Platform::Object^ arg0, ::Windows::ApplicationModel::IEnteredBackgroundEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = CreateOpaqueWrapper(arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel", "IEnteredBackgroundEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"leavingBackground", str))
      {
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = ::Windows::UI::WebUI::WebUIApplication::LeavingBackground::add(
            ref new ::Windows::UI::WebUI::LeavingBackgroundEventHandler(
            [callbackObjPtr](::Platform::Object^ arg0, ::Windows::ApplicationModel::ILeavingBackgroundEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = CreateOpaqueWrapper(arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel", "ILeavingBackgroundEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"activated", str))
      {
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = ::Windows::UI::WebUI::WebUIApplication::Activated::add(
            ref new ::Windows::UI::WebUI::ActivatedEventHandler(
            [callbackObjPtr](::Platform::Object^ arg0, ::Windows::ApplicationModel::Activation::IActivatedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = CreateOpaqueWrapper(arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "IActivatedEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"navigated", str))
      {
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = ::Windows::UI::WebUI::WebUIApplication::Navigated::add(
            ref new ::Windows::UI::WebUI::NavigatedEventHandler(
            [callbackObjPtr](::Platform::Object^ arg0, ::Windows::UI::WebUI::IWebUINavigatedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = CreateOpaqueWrapper(arg0);
                  wrappedArg1 = WrapIWebUINavigatedEventArgs(arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"resuming", str))
      {
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = ::Windows::UI::WebUI::WebUIApplication::Resuming::add(
            ref new ::Windows::UI::WebUI::ResumingEventHandler(
            [callbackObjPtr](::Platform::Object^ arg0) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0]() {
                HandleScope scope;


                Local<Value> wrappedArg0;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = CreateOpaqueWrapper(arg0);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"suspending", str))
      {
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = ::Windows::UI::WebUI::WebUIApplication::Suspending::add(
            ref new ::Windows::UI::WebUI::SuspendingEventHandler(
            [callbackObjPtr](::Platform::Object^ arg0, ::Windows::ApplicationModel::ISuspendingEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = CreateOpaqueWrapper(arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel", "ISuspendingEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
 else  {
        Nan::ThrowError(Nan::Error(String::Concat(v8::Isolate::GetCurrent(), NodeRT::Utils::NewString(L"given event name isn't supported: "), info[0].As<String>())));
        return;
      }

      Local<Value> tokenMapVal = NodeRT::Utils::GetHiddenValue(callback, Nan::New<String>(REGISTRATION_TOKEN_MAP_PROPERTY_NAME).ToLocalChecked());
      Local<Object> tokenMap;

      if (tokenMapVal.IsEmpty() || Nan::Equals(tokenMapVal, Undefined()).FromMaybe(false)) {
        tokenMap = Nan::New<Object>();
        NodeRT::Utils::SetHiddenValueWithObject(callback, Nan::New<String>(REGISTRATION_TOKEN_MAP_PROPERTY_NAME).ToLocalChecked(), tokenMap);
      } else {
        tokenMap = Nan::To<Object>(tokenMapVal).ToLocalChecked();
      }

      Nan::Set(tokenMap, info[0], CreateOpaqueWrapper(::Windows::Foundation::PropertyValue::CreateInt64(registrationToken.Value)));
    }

    static void RemoveListener(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (info.Length() < 2 || !info[0]->IsString() || !info[1]->IsFunction()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"wrong arguments, expected a string and a callback")));
        return;
      }

      String::Value eventName(v8::Isolate::GetCurrent(), info[0]);
      auto str = *eventName;

      if ((!NodeRT::Utils::CaseInsenstiveEquals(L"backgroundActivated", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"newWebUIViewCreated", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"enteredBackground", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"leavingBackground", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"activated", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"navigated", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"resuming", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"suspending", str))) {
        Nan::ThrowError(Nan::Error(String::Concat(v8::Isolate::GetCurrent(), NodeRT::Utils::NewString(L"given event name isn't supported: "), info[0].As<String>())));
        return;
      }

      Local<Function> callback = info[1].As<Function>();
      Local<Value> tokenMap = NodeRT::Utils::GetHiddenValue(callback, Nan::New<String>(REGISTRATION_TOKEN_MAP_PROPERTY_NAME).ToLocalChecked());

      if (tokenMap.IsEmpty() || Nan::Equals(tokenMap, Undefined()).FromMaybe(false)) {
        return;
      }

      Local<Value> opaqueWrapperObj =  Nan::Get(Nan::To<Object>(tokenMap).ToLocalChecked(), info[0]).ToLocalChecked();

      if (opaqueWrapperObj.IsEmpty() || Nan::Equals(opaqueWrapperObj,Undefined()).FromMaybe(false)) {
        return;
      }

      OpaqueWrapper *opaqueWrapper = OpaqueWrapper::Unwrap<OpaqueWrapper>(opaqueWrapperObj.As<Object>());

      long long tokenValue = (long long) opaqueWrapper->GetObjectInstance();
      ::Windows::Foundation::EventRegistrationToken registrationToken;
      registrationToken.Value = tokenValue;

      try  {
        if (NodeRT::Utils::CaseInsenstiveEquals(L"backgroundActivated", str)) {
          ::Windows::UI::WebUI::WebUIApplication::BackgroundActivated::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"newWebUIViewCreated", str))
        {
          ::Windows::UI::WebUI::WebUIApplication::NewWebUIViewCreated::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"enteredBackground", str))
        {
          ::Windows::UI::WebUI::WebUIApplication::EnteredBackground::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"leavingBackground", str))
        {
          ::Windows::UI::WebUI::WebUIApplication::LeavingBackground::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"activated", str))
        {
          ::Windows::UI::WebUI::WebUIApplication::Activated::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"navigated", str))
        {
          ::Windows::UI::WebUI::WebUIApplication::Navigated::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"resuming", str))
        {
          ::Windows::UI::WebUI::WebUIApplication::Resuming::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"suspending", str))
        {
          ::Windows::UI::WebUI::WebUIApplication::Suspending::remove(registrationToken);
        }
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }

      Nan::Delete(Nan::To<Object>(tokenMap).ToLocalChecked(), Nan::To<String>(info[0]).ToLocalChecked());
    }
    private:
      ::Windows::UI::WebUI::WebUIApplication^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIApplication(::Windows::UI::WebUI::WebUIApplication^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIApplication^ UnwrapWebUIApplication(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIApplication::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIApplication(::Windows::UI::WebUI::WebUIApplication^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIApplication::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIApplication^ UnwrapWebUIApplication(Local<Value> value) {
     return WebUIApplication::Unwrap<WebUIApplication>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIApplication(Local<Object> exports) {
    WebUIApplication::Init(exports);
  }

  class WebUIAppointmentsProviderAddAppointmentActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIAppointmentsProviderAddAppointmentActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("verb").ToLocalChecked(), VerbGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("addAppointmentOperation").ToLocalChecked(), AddAppointmentOperationGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIAppointmentsProviderAddAppointmentActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIAppointmentsProviderAddAppointmentActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIAppointmentsProviderAddAppointmentActivatedEventArgs *wrapperInstance = new WebUIAppointmentsProviderAddAppointmentActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIAppointmentsProviderAddAppointmentActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderAddAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderAddAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderAddAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderAddAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderAddAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderAddAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderAddAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderAddAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderAddAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderAddAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderAddAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderAddAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VerbGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderAddAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderAddAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderAddAppointmentActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Verb;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void AddAppointmentOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderAddAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderAddAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderAddAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation^ result = wrapper->_instance->AddAppointmentOperation;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Appointments.AppointmentsProvider", "AddAppointmentOperation", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderAddAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderAddAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderAddAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIAppointmentsProviderAddAppointmentActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^ UnwrapWebUIAppointmentsProviderAddAppointmentActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIAppointmentsProviderAddAppointmentActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIAppointmentsProviderAddAppointmentActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIAppointmentsProviderAddAppointmentActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs^ UnwrapWebUIAppointmentsProviderAddAppointmentActivatedEventArgs(Local<Value> value) {
     return WebUIAppointmentsProviderAddAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderAddAppointmentActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIAppointmentsProviderAddAppointmentActivatedEventArgs(Local<Object> exports) {
    WebUIAppointmentsProviderAddAppointmentActivatedEventArgs::Init(exports);
  }

  class WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("verb").ToLocalChecked(), VerbGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("removeAppointmentOperation").ToLocalChecked(), RemoveAppointmentOperationGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs *wrapperInstance = new WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VerbGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Verb;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void RemoveAppointmentOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation^ result = wrapper->_instance->RemoveAppointmentOperation;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Appointments.AppointmentsProvider", "RemoveAppointmentOperation", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^ UnwrapWebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs^ UnwrapWebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs(Local<Value> value) {
     return WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs(Local<Object> exports) {
    WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs::Init(exports);
  }

  class WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("verb").ToLocalChecked(), VerbGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("replaceAppointmentOperation").ToLocalChecked(), ReplaceAppointmentOperationGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs *wrapperInstance = new WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VerbGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Verb;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ReplaceAppointmentOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation^ result = wrapper->_instance->ReplaceAppointmentOperation;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Appointments.AppointmentsProvider", "ReplaceAppointmentOperation", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs *wrapper = WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^ UnwrapWebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs^ UnwrapWebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs(Local<Value> value) {
     return WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs::Unwrap<WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs(Local<Object> exports) {
    WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs::Init(exports);
  }

  class WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("verb").ToLocalChecked(), VerbGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("instanceStartDate").ToLocalChecked(), InstanceStartDateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("localId").ToLocalChecked(), LocalIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("roamingId").ToLocalChecked(), RoamingIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs *wrapperInstance = new WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VerbGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Verb;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void InstanceStartDateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs>(info.This());

      try  {
        ::Platform::IBox<::Windows::Foundation::DateTime>^ result = wrapper->_instance->InstanceStartDate;
        info.GetReturnValue().Set(result ? static_cast<Local<Value>>(NodeRT::Utils::DateTimeToJS(result->Value)) : Undefined());
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void LocalIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->LocalId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void RoamingIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->RoamingId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^ UnwrapWebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs^ UnwrapWebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs(Local<Value> value) {
     return WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs(Local<Object> exports) {
    WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::Init(exports);
  }

  class WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("verb").ToLocalChecked(), VerbGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("duration").ToLocalChecked(), DurationGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("timeToShow").ToLocalChecked(), TimeToShowGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs *wrapperInstance = new WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIAppointmentsProviderShowTimeFrameActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VerbGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Verb;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void DurationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs>(info.This());

      try  {
        ::Windows::Foundation::TimeSpan result = wrapper->_instance->Duration;
        info.GetReturnValue().Set(Nan::New<Number>(result.Duration/10000.0));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TimeToShowGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs>(info.This());

      try  {
        ::Windows::Foundation::DateTime result = wrapper->_instance->TimeToShow;
        info.GetReturnValue().Set(NodeRT::Utils::DateTimeToJS(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs *wrapper = WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIAppointmentsProviderShowTimeFrameActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^ UnwrapWebUIAppointmentsProviderShowTimeFrameActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIAppointmentsProviderShowTimeFrameActivatedEventArgs(::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs^ UnwrapWebUIAppointmentsProviderShowTimeFrameActivatedEventArgs(Local<Value> value) {
     return WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs::Unwrap<WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIAppointmentsProviderShowTimeFrameActivatedEventArgs(Local<Object> exports) {
    WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs::Init(exports);
  }

  class WebUIBackgroundTaskInstance : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIBackgroundTaskInstance").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);






        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);

        Nan::SetAccessor(constructor, Nan::New<String>("current").ToLocalChecked(), CurrentGetter);


        Nan::Set(exports, Nan::New<String>("WebUIBackgroundTaskInstance").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIBackgroundTaskInstance(::Windows::UI::WebUI::WebUIBackgroundTaskInstance^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIBackgroundTaskInstance^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstance^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIBackgroundTaskInstance^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIBackgroundTaskInstance *wrapperInstance = new WebUIBackgroundTaskInstance(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstance^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIBackgroundTaskInstance^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIBackgroundTaskInstance^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIBackgroundTaskInstance(winRtInstance));
    }







    static void CurrentGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      try
      {
        ::Windows::UI::WebUI::IWebUIBackgroundTaskInstance^ result = ::Windows::UI::WebUI::WebUIBackgroundTaskInstance::Current;
        info.GetReturnValue().Set(WrapIWebUIBackgroundTaskInstance(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      

    private:
      ::Windows::UI::WebUI::WebUIBackgroundTaskInstance^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIBackgroundTaskInstance(::Windows::UI::WebUI::WebUIBackgroundTaskInstance^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIBackgroundTaskInstance^ UnwrapWebUIBackgroundTaskInstance(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIBackgroundTaskInstance::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIBackgroundTaskInstance(::Windows::UI::WebUI::WebUIBackgroundTaskInstance^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIBackgroundTaskInstance::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIBackgroundTaskInstance^ UnwrapWebUIBackgroundTaskInstance(Local<Value> value) {
     return WebUIBackgroundTaskInstance::Unwrap<WebUIBackgroundTaskInstance>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIBackgroundTaskInstance(Local<Object> exports) {
    WebUIBackgroundTaskInstance::Init(exports);
  }

  class WebUIBackgroundTaskInstanceRuntimeClass : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIBackgroundTaskInstanceRuntimeClass").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getDeferral", GetDeferral);
          


          
          Nan::SetPrototypeMethod(localRef,"addListener", AddListener);
          Nan::SetPrototypeMethod(localRef,"on", AddListener);
          Nan::SetPrototypeMethod(localRef,"removeListener", RemoveListener);
          Nan::SetPrototypeMethod(localRef, "off", RemoveListener);

          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("progress").ToLocalChecked(), ProgressGetter, ProgressSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("instanceId").ToLocalChecked(), InstanceIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("suspendedCount").ToLocalChecked(), SuspendedCountGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("task").ToLocalChecked(), TaskGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("triggerDetails").ToLocalChecked(), TriggerDetailsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("succeeded").ToLocalChecked(), SucceededGetter, SucceededSetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIBackgroundTaskInstanceRuntimeClass").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIBackgroundTaskInstanceRuntimeClass(::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIBackgroundTaskInstanceRuntimeClass *wrapperInstance = new WebUIBackgroundTaskInstanceRuntimeClass(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIBackgroundTaskInstanceRuntimeClass(winRtInstance));
    }


    static void GetDeferral(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^>(info.This())) {
        return;
      }

      WebUIBackgroundTaskInstanceRuntimeClass *wrapper = WebUIBackgroundTaskInstanceRuntimeClass::Unwrap<WebUIBackgroundTaskInstanceRuntimeClass>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          ::Windows::ApplicationModel::Background::BackgroundTaskDeferral^ result;
          result = wrapper->_instance->GetDeferral();
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Background", "BackgroundTaskDeferral", result));
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }



    static void ProgressGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^>(info.This())) {
        return;
      }

      WebUIBackgroundTaskInstanceRuntimeClass *wrapper = WebUIBackgroundTaskInstanceRuntimeClass::Unwrap<WebUIBackgroundTaskInstanceRuntimeClass>(info.This());

      try  {
        unsigned int result = wrapper->_instance->Progress;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ProgressSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsUint32()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^>(info.This())) {
        return;
      }

      WebUIBackgroundTaskInstanceRuntimeClass *wrapper = WebUIBackgroundTaskInstanceRuntimeClass::Unwrap<WebUIBackgroundTaskInstanceRuntimeClass>(info.This());

      try {

        unsigned int winRtValue = static_cast<unsigned int>(Nan::To<uint32_t>(value).FromMaybe(0));

        wrapper->_instance->Progress = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void InstanceIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^>(info.This())) {
        return;
      }

      WebUIBackgroundTaskInstanceRuntimeClass *wrapper = WebUIBackgroundTaskInstanceRuntimeClass::Unwrap<WebUIBackgroundTaskInstanceRuntimeClass>(info.This());

      try  {
        ::Platform::Guid result = wrapper->_instance->InstanceId;
        info.GetReturnValue().Set(NodeRT::Utils::GuidToJs(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SuspendedCountGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^>(info.This())) {
        return;
      }

      WebUIBackgroundTaskInstanceRuntimeClass *wrapper = WebUIBackgroundTaskInstanceRuntimeClass::Unwrap<WebUIBackgroundTaskInstanceRuntimeClass>(info.This());

      try  {
        unsigned int result = wrapper->_instance->SuspendedCount;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TaskGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^>(info.This())) {
        return;
      }

      WebUIBackgroundTaskInstanceRuntimeClass *wrapper = WebUIBackgroundTaskInstanceRuntimeClass::Unwrap<WebUIBackgroundTaskInstanceRuntimeClass>(info.This());

      try  {
        ::Windows::ApplicationModel::Background::BackgroundTaskRegistration^ result = wrapper->_instance->Task;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Background", "BackgroundTaskRegistration", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TriggerDetailsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^>(info.This())) {
        return;
      }

      WebUIBackgroundTaskInstanceRuntimeClass *wrapper = WebUIBackgroundTaskInstanceRuntimeClass::Unwrap<WebUIBackgroundTaskInstanceRuntimeClass>(info.This());

      try  {
        ::Platform::Object^ result = wrapper->_instance->TriggerDetails;
        info.GetReturnValue().Set(CreateOpaqueWrapper(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SucceededGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^>(info.This())) {
        return;
      }

      WebUIBackgroundTaskInstanceRuntimeClass *wrapper = WebUIBackgroundTaskInstanceRuntimeClass::Unwrap<WebUIBackgroundTaskInstanceRuntimeClass>(info.This());

      try  {
        bool result = wrapper->_instance->Succeeded;
        info.GetReturnValue().Set(Nan::New<Boolean>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SucceededSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsBoolean()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^>(info.This())) {
        return;
      }

      WebUIBackgroundTaskInstanceRuntimeClass *wrapper = WebUIBackgroundTaskInstanceRuntimeClass::Unwrap<WebUIBackgroundTaskInstanceRuntimeClass>(info.This());

      try {

        bool winRtValue = Nan::To<bool>(value).FromMaybe(false);

        wrapper->_instance->Succeeded = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      


    static void AddListener(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (info.Length() < 2 || !info[0]->IsString() || !info[1]->IsFunction()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"wrong arguments, expected arguments are eventName(string),callback(function)")));
        return;
      }

      String::Value eventName(v8::Isolate::GetCurrent(), info[0]);
      auto str = *eventName;

      Local<Function> callback = info[1].As<Function>();

      ::Windows::Foundation::EventRegistrationToken registrationToken;
      if (NodeRT::Utils::CaseInsenstiveEquals(L"canceled", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^>(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")));
      return;
        }
        WebUIBackgroundTaskInstanceRuntimeClass *wrapper = WebUIBackgroundTaskInstanceRuntimeClass::Unwrap<WebUIBackgroundTaskInstanceRuntimeClass>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->Canceled::add(
            ref new ::Windows::ApplicationModel::Background::BackgroundTaskCanceledEventHandler(
            [callbackObjPtr](::Windows::ApplicationModel::Background::IBackgroundTaskInstance^ arg0, ::Windows::ApplicationModel::Background::BackgroundTaskCancellationReason arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Background", "IBackgroundTaskInstance", arg0);
                  wrappedArg1 = Nan::New<Integer>(static_cast<int>(arg1));


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
 else  {
        Nan::ThrowError(Nan::Error(String::Concat(v8::Isolate::GetCurrent(), NodeRT::Utils::NewString(L"given event name isn't supported: "), info[0].As<String>())));
        return;
      }

      Local<Value> tokenMapVal = NodeRT::Utils::GetHiddenValue(callback, Nan::New<String>(REGISTRATION_TOKEN_MAP_PROPERTY_NAME).ToLocalChecked());
      Local<Object> tokenMap;

      if (tokenMapVal.IsEmpty() || Nan::Equals(tokenMapVal, Undefined()).FromMaybe(false)) {
        tokenMap = Nan::New<Object>();
        NodeRT::Utils::SetHiddenValueWithObject(callback, Nan::New<String>(REGISTRATION_TOKEN_MAP_PROPERTY_NAME).ToLocalChecked(), tokenMap);
      } else {
        tokenMap = Nan::To<Object>(tokenMapVal).ToLocalChecked();
      }

      Nan::Set(tokenMap, info[0], CreateOpaqueWrapper(::Windows::Foundation::PropertyValue::CreateInt64(registrationToken.Value)));
    }

    static void RemoveListener(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (info.Length() < 2 || !info[0]->IsString() || !info[1]->IsFunction()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"wrong arguments, expected a string and a callback")));
        return;
      }

      String::Value eventName(v8::Isolate::GetCurrent(), info[0]);
      auto str = *eventName;

      if ((!NodeRT::Utils::CaseInsenstiveEquals(L"canceled", str))) {
        Nan::ThrowError(Nan::Error(String::Concat(v8::Isolate::GetCurrent(), NodeRT::Utils::NewString(L"given event name isn't supported: "), info[0].As<String>())));
        return;
      }

      Local<Function> callback = info[1].As<Function>();
      Local<Value> tokenMap = NodeRT::Utils::GetHiddenValue(callback, Nan::New<String>(REGISTRATION_TOKEN_MAP_PROPERTY_NAME).ToLocalChecked());

      if (tokenMap.IsEmpty() || Nan::Equals(tokenMap, Undefined()).FromMaybe(false)) {
        return;
      }

      Local<Value> opaqueWrapperObj =  Nan::Get(Nan::To<Object>(tokenMap).ToLocalChecked(), info[0]).ToLocalChecked();

      if (opaqueWrapperObj.IsEmpty() || Nan::Equals(opaqueWrapperObj,Undefined()).FromMaybe(false)) {
        return;
      }

      OpaqueWrapper *opaqueWrapper = OpaqueWrapper::Unwrap<OpaqueWrapper>(opaqueWrapperObj.As<Object>());

      long long tokenValue = (long long) opaqueWrapper->GetObjectInstance();
      ::Windows::Foundation::EventRegistrationToken registrationToken;
      registrationToken.Value = tokenValue;

      try  {
        if (NodeRT::Utils::CaseInsenstiveEquals(L"canceled", str)) {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^>(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")));
            return;
          }
          WebUIBackgroundTaskInstanceRuntimeClass *wrapper = WebUIBackgroundTaskInstanceRuntimeClass::Unwrap<WebUIBackgroundTaskInstanceRuntimeClass>(info.This());
          wrapper->_instance->Canceled::remove(registrationToken);
        }
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }

      Nan::Delete(Nan::To<Object>(tokenMap).ToLocalChecked(), Nan::To<String>(info[0]).ToLocalChecked());
    }
    private:
      ::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIBackgroundTaskInstanceRuntimeClass(::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^ UnwrapWebUIBackgroundTaskInstanceRuntimeClass(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIBackgroundTaskInstanceRuntimeClass::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIBackgroundTaskInstanceRuntimeClass(::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIBackgroundTaskInstanceRuntimeClass::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass^ UnwrapWebUIBackgroundTaskInstanceRuntimeClass(Local<Value> value) {
     return WebUIBackgroundTaskInstanceRuntimeClass::Unwrap<WebUIBackgroundTaskInstanceRuntimeClass>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIBackgroundTaskInstanceRuntimeClass(Local<Object> exports) {
    WebUIBackgroundTaskInstanceRuntimeClass::Init(exports);
  }

  class WebUIBarcodeScannerPreviewActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIBarcodeScannerPreviewActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("connectionId").ToLocalChecked(), ConnectionIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIBarcodeScannerPreviewActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIBarcodeScannerPreviewActivatedEventArgs(::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIBarcodeScannerPreviewActivatedEventArgs *wrapperInstance = new WebUIBarcodeScannerPreviewActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIBarcodeScannerPreviewActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIBarcodeScannerPreviewActivatedEventArgs *wrapper = WebUIBarcodeScannerPreviewActivatedEventArgs::Unwrap<WebUIBarcodeScannerPreviewActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIBarcodeScannerPreviewActivatedEventArgs *wrapper = WebUIBarcodeScannerPreviewActivatedEventArgs::Unwrap<WebUIBarcodeScannerPreviewActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIBarcodeScannerPreviewActivatedEventArgs *wrapper = WebUIBarcodeScannerPreviewActivatedEventArgs::Unwrap<WebUIBarcodeScannerPreviewActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIBarcodeScannerPreviewActivatedEventArgs *wrapper = WebUIBarcodeScannerPreviewActivatedEventArgs::Unwrap<WebUIBarcodeScannerPreviewActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ConnectionIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIBarcodeScannerPreviewActivatedEventArgs *wrapper = WebUIBarcodeScannerPreviewActivatedEventArgs::Unwrap<WebUIBarcodeScannerPreviewActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->ConnectionId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIBarcodeScannerPreviewActivatedEventArgs *wrapper = WebUIBarcodeScannerPreviewActivatedEventArgs::Unwrap<WebUIBarcodeScannerPreviewActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIBarcodeScannerPreviewActivatedEventArgs(::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^ UnwrapWebUIBarcodeScannerPreviewActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIBarcodeScannerPreviewActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIBarcodeScannerPreviewActivatedEventArgs(::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIBarcodeScannerPreviewActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIBarcodeScannerPreviewActivatedEventArgs^ UnwrapWebUIBarcodeScannerPreviewActivatedEventArgs(Local<Value> value) {
     return WebUIBarcodeScannerPreviewActivatedEventArgs::Unwrap<WebUIBarcodeScannerPreviewActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIBarcodeScannerPreviewActivatedEventArgs(Local<Object> exports) {
    WebUIBarcodeScannerPreviewActivatedEventArgs::Init(exports);
  }

  class WebUICachedFileUpdaterActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUICachedFileUpdaterActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("cachedFileUpdaterUI").ToLocalChecked(), CachedFileUpdaterUIGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUICachedFileUpdaterActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUICachedFileUpdaterActivatedEventArgs(::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUICachedFileUpdaterActivatedEventArgs *wrapperInstance = new WebUICachedFileUpdaterActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUICachedFileUpdaterActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICachedFileUpdaterActivatedEventArgs *wrapper = WebUICachedFileUpdaterActivatedEventArgs::Unwrap<WebUICachedFileUpdaterActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICachedFileUpdaterActivatedEventArgs *wrapper = WebUICachedFileUpdaterActivatedEventArgs::Unwrap<WebUICachedFileUpdaterActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICachedFileUpdaterActivatedEventArgs *wrapper = WebUICachedFileUpdaterActivatedEventArgs::Unwrap<WebUICachedFileUpdaterActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICachedFileUpdaterActivatedEventArgs *wrapper = WebUICachedFileUpdaterActivatedEventArgs::Unwrap<WebUICachedFileUpdaterActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CachedFileUpdaterUIGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICachedFileUpdaterActivatedEventArgs *wrapper = WebUICachedFileUpdaterActivatedEventArgs::Unwrap<WebUICachedFileUpdaterActivatedEventArgs>(info.This());

      try  {
        ::Windows::Storage::Provider::CachedFileUpdaterUI^ result = wrapper->_instance->CachedFileUpdaterUI;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Storage.Provider", "CachedFileUpdaterUI", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICachedFileUpdaterActivatedEventArgs *wrapper = WebUICachedFileUpdaterActivatedEventArgs::Unwrap<WebUICachedFileUpdaterActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUICachedFileUpdaterActivatedEventArgs(::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^ UnwrapWebUICachedFileUpdaterActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUICachedFileUpdaterActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUICachedFileUpdaterActivatedEventArgs(::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUICachedFileUpdaterActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs^ UnwrapWebUICachedFileUpdaterActivatedEventArgs(Local<Value> value) {
     return WebUICachedFileUpdaterActivatedEventArgs::Unwrap<WebUICachedFileUpdaterActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUICachedFileUpdaterActivatedEventArgs(Local<Object> exports) {
    WebUICachedFileUpdaterActivatedEventArgs::Init(exports);
  }

  class WebUICameraSettingsActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUICameraSettingsActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("videoDeviceController").ToLocalChecked(), VideoDeviceControllerGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("videoDeviceExtension").ToLocalChecked(), VideoDeviceExtensionGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUICameraSettingsActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUICameraSettingsActivatedEventArgs(::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUICameraSettingsActivatedEventArgs *wrapperInstance = new WebUICameraSettingsActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUICameraSettingsActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICameraSettingsActivatedEventArgs *wrapper = WebUICameraSettingsActivatedEventArgs::Unwrap<WebUICameraSettingsActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICameraSettingsActivatedEventArgs *wrapper = WebUICameraSettingsActivatedEventArgs::Unwrap<WebUICameraSettingsActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICameraSettingsActivatedEventArgs *wrapper = WebUICameraSettingsActivatedEventArgs::Unwrap<WebUICameraSettingsActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VideoDeviceControllerGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICameraSettingsActivatedEventArgs *wrapper = WebUICameraSettingsActivatedEventArgs::Unwrap<WebUICameraSettingsActivatedEventArgs>(info.This());

      try  {
        ::Platform::Object^ result = wrapper->_instance->VideoDeviceController;
        info.GetReturnValue().Set(CreateOpaqueWrapper(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VideoDeviceExtensionGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICameraSettingsActivatedEventArgs *wrapper = WebUICameraSettingsActivatedEventArgs::Unwrap<WebUICameraSettingsActivatedEventArgs>(info.This());

      try  {
        ::Platform::Object^ result = wrapper->_instance->VideoDeviceExtension;
        info.GetReturnValue().Set(CreateOpaqueWrapper(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICameraSettingsActivatedEventArgs *wrapper = WebUICameraSettingsActivatedEventArgs::Unwrap<WebUICameraSettingsActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUICameraSettingsActivatedEventArgs(::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^ UnwrapWebUICameraSettingsActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUICameraSettingsActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUICameraSettingsActivatedEventArgs(::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUICameraSettingsActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs^ UnwrapWebUICameraSettingsActivatedEventArgs(Local<Value> value) {
     return WebUICameraSettingsActivatedEventArgs::Unwrap<WebUICameraSettingsActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUICameraSettingsActivatedEventArgs(Local<Object> exports) {
    WebUICameraSettingsActivatedEventArgs::Init(exports);
  }

  class WebUICommandLineActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUICommandLineActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("operation").ToLocalChecked(), OperationGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUICommandLineActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUICommandLineActivatedEventArgs(::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUICommandLineActivatedEventArgs *wrapperInstance = new WebUICommandLineActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUICommandLineActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICommandLineActivatedEventArgs *wrapper = WebUICommandLineActivatedEventArgs::Unwrap<WebUICommandLineActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICommandLineActivatedEventArgs *wrapper = WebUICommandLineActivatedEventArgs::Unwrap<WebUICommandLineActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICommandLineActivatedEventArgs *wrapper = WebUICommandLineActivatedEventArgs::Unwrap<WebUICommandLineActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICommandLineActivatedEventArgs *wrapper = WebUICommandLineActivatedEventArgs::Unwrap<WebUICommandLineActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void OperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICommandLineActivatedEventArgs *wrapper = WebUICommandLineActivatedEventArgs::Unwrap<WebUICommandLineActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::CommandLineActivationOperation^ result = wrapper->_instance->Operation;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "CommandLineActivationOperation", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUICommandLineActivatedEventArgs *wrapper = WebUICommandLineActivatedEventArgs::Unwrap<WebUICommandLineActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUICommandLineActivatedEventArgs(::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^ UnwrapWebUICommandLineActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUICommandLineActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUICommandLineActivatedEventArgs(::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUICommandLineActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUICommandLineActivatedEventArgs^ UnwrapWebUICommandLineActivatedEventArgs(Local<Value> value) {
     return WebUICommandLineActivatedEventArgs::Unwrap<WebUICommandLineActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUICommandLineActivatedEventArgs(Local<Object> exports) {
    WebUICommandLineActivatedEventArgs::Init(exports);
  }

  class WebUIContactCallActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIContactCallActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("verb").ToLocalChecked(), VerbGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("contact").ToLocalChecked(), ContactGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("serviceId").ToLocalChecked(), ServiceIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("serviceUserId").ToLocalChecked(), ServiceUserIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIContactCallActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIContactCallActivatedEventArgs(::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIContactCallActivatedEventArgs *wrapperInstance = new WebUIContactCallActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIContactCallActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactCallActivatedEventArgs *wrapper = WebUIContactCallActivatedEventArgs::Unwrap<WebUIContactCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactCallActivatedEventArgs *wrapper = WebUIContactCallActivatedEventArgs::Unwrap<WebUIContactCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactCallActivatedEventArgs *wrapper = WebUIContactCallActivatedEventArgs::Unwrap<WebUIContactCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VerbGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactCallActivatedEventArgs *wrapper = WebUIContactCallActivatedEventArgs::Unwrap<WebUIContactCallActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Verb;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContactGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactCallActivatedEventArgs *wrapper = WebUIContactCallActivatedEventArgs::Unwrap<WebUIContactCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Contacts::Contact^ result = wrapper->_instance->Contact;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Contacts", "Contact", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ServiceIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactCallActivatedEventArgs *wrapper = WebUIContactCallActivatedEventArgs::Unwrap<WebUIContactCallActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->ServiceId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ServiceUserIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactCallActivatedEventArgs *wrapper = WebUIContactCallActivatedEventArgs::Unwrap<WebUIContactCallActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->ServiceUserId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactCallActivatedEventArgs *wrapper = WebUIContactCallActivatedEventArgs::Unwrap<WebUIContactCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIContactCallActivatedEventArgs(::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^ UnwrapWebUIContactCallActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIContactCallActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIContactCallActivatedEventArgs(::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIContactCallActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs^ UnwrapWebUIContactCallActivatedEventArgs(Local<Value> value) {
     return WebUIContactCallActivatedEventArgs::Unwrap<WebUIContactCallActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIContactCallActivatedEventArgs(Local<Object> exports) {
    WebUIContactCallActivatedEventArgs::Init(exports);
  }

  class WebUIContactMapActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIContactMapActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("verb").ToLocalChecked(), VerbGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("address").ToLocalChecked(), AddressGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("contact").ToLocalChecked(), ContactGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIContactMapActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIContactMapActivatedEventArgs(::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIContactMapActivatedEventArgs *wrapperInstance = new WebUIContactMapActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIContactMapActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMapActivatedEventArgs *wrapper = WebUIContactMapActivatedEventArgs::Unwrap<WebUIContactMapActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMapActivatedEventArgs *wrapper = WebUIContactMapActivatedEventArgs::Unwrap<WebUIContactMapActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMapActivatedEventArgs *wrapper = WebUIContactMapActivatedEventArgs::Unwrap<WebUIContactMapActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VerbGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMapActivatedEventArgs *wrapper = WebUIContactMapActivatedEventArgs::Unwrap<WebUIContactMapActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Verb;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void AddressGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMapActivatedEventArgs *wrapper = WebUIContactMapActivatedEventArgs::Unwrap<WebUIContactMapActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Contacts::ContactAddress^ result = wrapper->_instance->Address;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Contacts", "ContactAddress", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContactGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMapActivatedEventArgs *wrapper = WebUIContactMapActivatedEventArgs::Unwrap<WebUIContactMapActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Contacts::Contact^ result = wrapper->_instance->Contact;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Contacts", "Contact", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMapActivatedEventArgs *wrapper = WebUIContactMapActivatedEventArgs::Unwrap<WebUIContactMapActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIContactMapActivatedEventArgs(::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^ UnwrapWebUIContactMapActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIContactMapActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIContactMapActivatedEventArgs(::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIContactMapActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs^ UnwrapWebUIContactMapActivatedEventArgs(Local<Value> value) {
     return WebUIContactMapActivatedEventArgs::Unwrap<WebUIContactMapActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIContactMapActivatedEventArgs(Local<Object> exports) {
    WebUIContactMapActivatedEventArgs::Init(exports);
  }

  class WebUIContactMessageActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIContactMessageActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("verb").ToLocalChecked(), VerbGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("contact").ToLocalChecked(), ContactGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("serviceId").ToLocalChecked(), ServiceIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("serviceUserId").ToLocalChecked(), ServiceUserIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIContactMessageActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIContactMessageActivatedEventArgs(::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIContactMessageActivatedEventArgs *wrapperInstance = new WebUIContactMessageActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIContactMessageActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMessageActivatedEventArgs *wrapper = WebUIContactMessageActivatedEventArgs::Unwrap<WebUIContactMessageActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMessageActivatedEventArgs *wrapper = WebUIContactMessageActivatedEventArgs::Unwrap<WebUIContactMessageActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMessageActivatedEventArgs *wrapper = WebUIContactMessageActivatedEventArgs::Unwrap<WebUIContactMessageActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VerbGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMessageActivatedEventArgs *wrapper = WebUIContactMessageActivatedEventArgs::Unwrap<WebUIContactMessageActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Verb;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContactGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMessageActivatedEventArgs *wrapper = WebUIContactMessageActivatedEventArgs::Unwrap<WebUIContactMessageActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Contacts::Contact^ result = wrapper->_instance->Contact;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Contacts", "Contact", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ServiceIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMessageActivatedEventArgs *wrapper = WebUIContactMessageActivatedEventArgs::Unwrap<WebUIContactMessageActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->ServiceId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ServiceUserIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMessageActivatedEventArgs *wrapper = WebUIContactMessageActivatedEventArgs::Unwrap<WebUIContactMessageActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->ServiceUserId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactMessageActivatedEventArgs *wrapper = WebUIContactMessageActivatedEventArgs::Unwrap<WebUIContactMessageActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIContactMessageActivatedEventArgs(::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^ UnwrapWebUIContactMessageActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIContactMessageActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIContactMessageActivatedEventArgs(::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIContactMessageActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs^ UnwrapWebUIContactMessageActivatedEventArgs(Local<Value> value) {
     return WebUIContactMessageActivatedEventArgs::Unwrap<WebUIContactMessageActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIContactMessageActivatedEventArgs(Local<Object> exports) {
    WebUIContactMessageActivatedEventArgs::Init(exports);
  }

  class WebUIContactPanelActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIContactPanelActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("contact").ToLocalChecked(), ContactGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("contactPanel").ToLocalChecked(), ContactPanelGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIContactPanelActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIContactPanelActivatedEventArgs(::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIContactPanelActivatedEventArgs *wrapperInstance = new WebUIContactPanelActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIContactPanelActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPanelActivatedEventArgs *wrapper = WebUIContactPanelActivatedEventArgs::Unwrap<WebUIContactPanelActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPanelActivatedEventArgs *wrapper = WebUIContactPanelActivatedEventArgs::Unwrap<WebUIContactPanelActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPanelActivatedEventArgs *wrapper = WebUIContactPanelActivatedEventArgs::Unwrap<WebUIContactPanelActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPanelActivatedEventArgs *wrapper = WebUIContactPanelActivatedEventArgs::Unwrap<WebUIContactPanelActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContactGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPanelActivatedEventArgs *wrapper = WebUIContactPanelActivatedEventArgs::Unwrap<WebUIContactPanelActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Contacts::Contact^ result = wrapper->_instance->Contact;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Contacts", "Contact", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContactPanelGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPanelActivatedEventArgs *wrapper = WebUIContactPanelActivatedEventArgs::Unwrap<WebUIContactPanelActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Contacts::ContactPanel^ result = wrapper->_instance->ContactPanel;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Contacts", "ContactPanel", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPanelActivatedEventArgs *wrapper = WebUIContactPanelActivatedEventArgs::Unwrap<WebUIContactPanelActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIContactPanelActivatedEventArgs(::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^ UnwrapWebUIContactPanelActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIContactPanelActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIContactPanelActivatedEventArgs(::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIContactPanelActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIContactPanelActivatedEventArgs^ UnwrapWebUIContactPanelActivatedEventArgs(Local<Value> value) {
     return WebUIContactPanelActivatedEventArgs::Unwrap<WebUIContactPanelActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIContactPanelActivatedEventArgs(Local<Object> exports) {
    WebUIContactPanelActivatedEventArgs::Init(exports);
  }

  class WebUIContactPickerActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIContactPickerActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("contactPickerUI").ToLocalChecked(), ContactPickerUIGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIContactPickerActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIContactPickerActivatedEventArgs(::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIContactPickerActivatedEventArgs *wrapperInstance = new WebUIContactPickerActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIContactPickerActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPickerActivatedEventArgs *wrapper = WebUIContactPickerActivatedEventArgs::Unwrap<WebUIContactPickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPickerActivatedEventArgs *wrapper = WebUIContactPickerActivatedEventArgs::Unwrap<WebUIContactPickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPickerActivatedEventArgs *wrapper = WebUIContactPickerActivatedEventArgs::Unwrap<WebUIContactPickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContactPickerUIGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPickerActivatedEventArgs *wrapper = WebUIContactPickerActivatedEventArgs::Unwrap<WebUIContactPickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Contacts::Provider::ContactPickerUI^ result = wrapper->_instance->ContactPickerUI;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Contacts.Provider", "ContactPickerUI", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPickerActivatedEventArgs *wrapper = WebUIContactPickerActivatedEventArgs::Unwrap<WebUIContactPickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIContactPickerActivatedEventArgs(::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^ UnwrapWebUIContactPickerActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIContactPickerActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIContactPickerActivatedEventArgs(::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIContactPickerActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs^ UnwrapWebUIContactPickerActivatedEventArgs(Local<Value> value) {
     return WebUIContactPickerActivatedEventArgs::Unwrap<WebUIContactPickerActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIContactPickerActivatedEventArgs(Local<Object> exports) {
    WebUIContactPickerActivatedEventArgs::Init(exports);
  }

  class WebUIContactPostActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIContactPostActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("verb").ToLocalChecked(), VerbGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("contact").ToLocalChecked(), ContactGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("serviceId").ToLocalChecked(), ServiceIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("serviceUserId").ToLocalChecked(), ServiceUserIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIContactPostActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIContactPostActivatedEventArgs(::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIContactPostActivatedEventArgs *wrapperInstance = new WebUIContactPostActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIContactPostActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPostActivatedEventArgs *wrapper = WebUIContactPostActivatedEventArgs::Unwrap<WebUIContactPostActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPostActivatedEventArgs *wrapper = WebUIContactPostActivatedEventArgs::Unwrap<WebUIContactPostActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPostActivatedEventArgs *wrapper = WebUIContactPostActivatedEventArgs::Unwrap<WebUIContactPostActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VerbGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPostActivatedEventArgs *wrapper = WebUIContactPostActivatedEventArgs::Unwrap<WebUIContactPostActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Verb;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContactGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPostActivatedEventArgs *wrapper = WebUIContactPostActivatedEventArgs::Unwrap<WebUIContactPostActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Contacts::Contact^ result = wrapper->_instance->Contact;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Contacts", "Contact", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ServiceIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPostActivatedEventArgs *wrapper = WebUIContactPostActivatedEventArgs::Unwrap<WebUIContactPostActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->ServiceId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ServiceUserIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPostActivatedEventArgs *wrapper = WebUIContactPostActivatedEventArgs::Unwrap<WebUIContactPostActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->ServiceUserId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactPostActivatedEventArgs *wrapper = WebUIContactPostActivatedEventArgs::Unwrap<WebUIContactPostActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIContactPostActivatedEventArgs(::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^ UnwrapWebUIContactPostActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIContactPostActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIContactPostActivatedEventArgs(::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIContactPostActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs^ UnwrapWebUIContactPostActivatedEventArgs(Local<Value> value) {
     return WebUIContactPostActivatedEventArgs::Unwrap<WebUIContactPostActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIContactPostActivatedEventArgs(Local<Object> exports) {
    WebUIContactPostActivatedEventArgs::Init(exports);
  }

  class WebUIContactVideoCallActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIContactVideoCallActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("verb").ToLocalChecked(), VerbGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("contact").ToLocalChecked(), ContactGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("serviceId").ToLocalChecked(), ServiceIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("serviceUserId").ToLocalChecked(), ServiceUserIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIContactVideoCallActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIContactVideoCallActivatedEventArgs(::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIContactVideoCallActivatedEventArgs *wrapperInstance = new WebUIContactVideoCallActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIContactVideoCallActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactVideoCallActivatedEventArgs *wrapper = WebUIContactVideoCallActivatedEventArgs::Unwrap<WebUIContactVideoCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactVideoCallActivatedEventArgs *wrapper = WebUIContactVideoCallActivatedEventArgs::Unwrap<WebUIContactVideoCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactVideoCallActivatedEventArgs *wrapper = WebUIContactVideoCallActivatedEventArgs::Unwrap<WebUIContactVideoCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VerbGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactVideoCallActivatedEventArgs *wrapper = WebUIContactVideoCallActivatedEventArgs::Unwrap<WebUIContactVideoCallActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Verb;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContactGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactVideoCallActivatedEventArgs *wrapper = WebUIContactVideoCallActivatedEventArgs::Unwrap<WebUIContactVideoCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Contacts::Contact^ result = wrapper->_instance->Contact;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Contacts", "Contact", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ServiceIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactVideoCallActivatedEventArgs *wrapper = WebUIContactVideoCallActivatedEventArgs::Unwrap<WebUIContactVideoCallActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->ServiceId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ServiceUserIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactVideoCallActivatedEventArgs *wrapper = WebUIContactVideoCallActivatedEventArgs::Unwrap<WebUIContactVideoCallActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->ServiceUserId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIContactVideoCallActivatedEventArgs *wrapper = WebUIContactVideoCallActivatedEventArgs::Unwrap<WebUIContactVideoCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIContactVideoCallActivatedEventArgs(::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^ UnwrapWebUIContactVideoCallActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIContactVideoCallActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIContactVideoCallActivatedEventArgs(::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIContactVideoCallActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs^ UnwrapWebUIContactVideoCallActivatedEventArgs(Local<Value> value) {
     return WebUIContactVideoCallActivatedEventArgs::Unwrap<WebUIContactVideoCallActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIContactVideoCallActivatedEventArgs(Local<Object> exports) {
    WebUIContactVideoCallActivatedEventArgs::Init(exports);
  }

  class WebUIDeviceActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIDeviceActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("currentlyShownApplicationViewId").ToLocalChecked(), CurrentlyShownApplicationViewIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("deviceInformationId").ToLocalChecked(), DeviceInformationIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("verb").ToLocalChecked(), VerbGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIDeviceActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIDeviceActivatedEventArgs(::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIDeviceActivatedEventArgs *wrapperInstance = new WebUIDeviceActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIDeviceActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDeviceActivatedEventArgs *wrapper = WebUIDeviceActivatedEventArgs::Unwrap<WebUIDeviceActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDeviceActivatedEventArgs *wrapper = WebUIDeviceActivatedEventArgs::Unwrap<WebUIDeviceActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDeviceActivatedEventArgs *wrapper = WebUIDeviceActivatedEventArgs::Unwrap<WebUIDeviceActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDeviceActivatedEventArgs *wrapper = WebUIDeviceActivatedEventArgs::Unwrap<WebUIDeviceActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CurrentlyShownApplicationViewIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDeviceActivatedEventArgs *wrapper = WebUIDeviceActivatedEventArgs::Unwrap<WebUIDeviceActivatedEventArgs>(info.This());

      try  {
        int result = wrapper->_instance->CurrentlyShownApplicationViewId;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void DeviceInformationIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDeviceActivatedEventArgs *wrapper = WebUIDeviceActivatedEventArgs::Unwrap<WebUIDeviceActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->DeviceInformationId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VerbGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDeviceActivatedEventArgs *wrapper = WebUIDeviceActivatedEventArgs::Unwrap<WebUIDeviceActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Verb;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDeviceActivatedEventArgs *wrapper = WebUIDeviceActivatedEventArgs::Unwrap<WebUIDeviceActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIDeviceActivatedEventArgs(::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^ UnwrapWebUIDeviceActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIDeviceActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIDeviceActivatedEventArgs(::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIDeviceActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs^ UnwrapWebUIDeviceActivatedEventArgs(Local<Value> value) {
     return WebUIDeviceActivatedEventArgs::Unwrap<WebUIDeviceActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIDeviceActivatedEventArgs(Local<Object> exports) {
    WebUIDeviceActivatedEventArgs::Init(exports);
  }

  class WebUIDevicePairingActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIDevicePairingActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("deviceInformation").ToLocalChecked(), DeviceInformationGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIDevicePairingActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIDevicePairingActivatedEventArgs(::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIDevicePairingActivatedEventArgs *wrapperInstance = new WebUIDevicePairingActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIDevicePairingActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDevicePairingActivatedEventArgs *wrapper = WebUIDevicePairingActivatedEventArgs::Unwrap<WebUIDevicePairingActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDevicePairingActivatedEventArgs *wrapper = WebUIDevicePairingActivatedEventArgs::Unwrap<WebUIDevicePairingActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDevicePairingActivatedEventArgs *wrapper = WebUIDevicePairingActivatedEventArgs::Unwrap<WebUIDevicePairingActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDevicePairingActivatedEventArgs *wrapper = WebUIDevicePairingActivatedEventArgs::Unwrap<WebUIDevicePairingActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void DeviceInformationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDevicePairingActivatedEventArgs *wrapper = WebUIDevicePairingActivatedEventArgs::Unwrap<WebUIDevicePairingActivatedEventArgs>(info.This());

      try  {
        ::Windows::Devices::Enumeration::DeviceInformation^ result = wrapper->_instance->DeviceInformation;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Devices.Enumeration", "DeviceInformation", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDevicePairingActivatedEventArgs *wrapper = WebUIDevicePairingActivatedEventArgs::Unwrap<WebUIDevicePairingActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIDevicePairingActivatedEventArgs(::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^ UnwrapWebUIDevicePairingActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIDevicePairingActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIDevicePairingActivatedEventArgs(::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIDevicePairingActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs^ UnwrapWebUIDevicePairingActivatedEventArgs(Local<Value> value) {
     return WebUIDevicePairingActivatedEventArgs::Unwrap<WebUIDevicePairingActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIDevicePairingActivatedEventArgs(Local<Object> exports) {
    WebUIDevicePairingActivatedEventArgs::Init(exports);
  }

  class WebUIDialReceiverActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIDialReceiverActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("currentlyShownApplicationViewId").ToLocalChecked(), CurrentlyShownApplicationViewIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("appName").ToLocalChecked(), AppNameGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("arguments").ToLocalChecked(), ArgumentsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("tileId").ToLocalChecked(), TileIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIDialReceiverActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIDialReceiverActivatedEventArgs(::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIDialReceiverActivatedEventArgs *wrapperInstance = new WebUIDialReceiverActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIDialReceiverActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDialReceiverActivatedEventArgs *wrapper = WebUIDialReceiverActivatedEventArgs::Unwrap<WebUIDialReceiverActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDialReceiverActivatedEventArgs *wrapper = WebUIDialReceiverActivatedEventArgs::Unwrap<WebUIDialReceiverActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDialReceiverActivatedEventArgs *wrapper = WebUIDialReceiverActivatedEventArgs::Unwrap<WebUIDialReceiverActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDialReceiverActivatedEventArgs *wrapper = WebUIDialReceiverActivatedEventArgs::Unwrap<WebUIDialReceiverActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CurrentlyShownApplicationViewIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDialReceiverActivatedEventArgs *wrapper = WebUIDialReceiverActivatedEventArgs::Unwrap<WebUIDialReceiverActivatedEventArgs>(info.This());

      try  {
        int result = wrapper->_instance->CurrentlyShownApplicationViewId;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void AppNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDialReceiverActivatedEventArgs *wrapper = WebUIDialReceiverActivatedEventArgs::Unwrap<WebUIDialReceiverActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->AppName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ArgumentsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDialReceiverActivatedEventArgs *wrapper = WebUIDialReceiverActivatedEventArgs::Unwrap<WebUIDialReceiverActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Arguments;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TileIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDialReceiverActivatedEventArgs *wrapper = WebUIDialReceiverActivatedEventArgs::Unwrap<WebUIDialReceiverActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->TileId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIDialReceiverActivatedEventArgs *wrapper = WebUIDialReceiverActivatedEventArgs::Unwrap<WebUIDialReceiverActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIDialReceiverActivatedEventArgs(::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^ UnwrapWebUIDialReceiverActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIDialReceiverActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIDialReceiverActivatedEventArgs(::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIDialReceiverActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs^ UnwrapWebUIDialReceiverActivatedEventArgs(Local<Value> value) {
     return WebUIDialReceiverActivatedEventArgs::Unwrap<WebUIDialReceiverActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIDialReceiverActivatedEventArgs(Local<Object> exports) {
    WebUIDialReceiverActivatedEventArgs::Init(exports);
  }

  class WebUIFileActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIFileActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("currentlyShownApplicationViewId").ToLocalChecked(), CurrentlyShownApplicationViewIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("files").ToLocalChecked(), FilesGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("verb").ToLocalChecked(), VerbGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("neighboringFilesQuery").ToLocalChecked(), NeighboringFilesQueryGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIFileActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIFileActivatedEventArgs(::Windows::UI::WebUI::WebUIFileActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIFileActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIFileActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIFileActivatedEventArgs *wrapperInstance = new WebUIFileActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIFileActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIFileActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIFileActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileActivatedEventArgs *wrapper = WebUIFileActivatedEventArgs::Unwrap<WebUIFileActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileActivatedEventArgs *wrapper = WebUIFileActivatedEventArgs::Unwrap<WebUIFileActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileActivatedEventArgs *wrapper = WebUIFileActivatedEventArgs::Unwrap<WebUIFileActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileActivatedEventArgs *wrapper = WebUIFileActivatedEventArgs::Unwrap<WebUIFileActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CurrentlyShownApplicationViewIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileActivatedEventArgs *wrapper = WebUIFileActivatedEventArgs::Unwrap<WebUIFileActivatedEventArgs>(info.This());

      try  {
        int result = wrapper->_instance->CurrentlyShownApplicationViewId;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void FilesGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileActivatedEventArgs *wrapper = WebUIFileActivatedEventArgs::Unwrap<WebUIFileActivatedEventArgs>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVectorView<::Windows::Storage::IStorageItem^>^ result = wrapper->_instance->Files;
        info.GetReturnValue().Set(NodeRT::Collections::VectorViewWrapper<::Windows::Storage::IStorageItem^>::CreateVectorViewWrapper(result, 
            [](::Windows::Storage::IStorageItem^ val) -> Local<Value> {
              return NodeRT::Utils::CreateExternalWinRTObject("Windows.Storage", "IStorageItem", val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Storage::IStorageItem^>(value);
            },
            [](Local<Value> value) -> ::Windows::Storage::IStorageItem^ {
              return dynamic_cast<::Windows::Storage::IStorageItem^>(NodeRT::Utils::GetObjectInstance(value));
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VerbGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileActivatedEventArgs *wrapper = WebUIFileActivatedEventArgs::Unwrap<WebUIFileActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Verb;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NeighboringFilesQueryGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileActivatedEventArgs *wrapper = WebUIFileActivatedEventArgs::Unwrap<WebUIFileActivatedEventArgs>(info.This());

      try  {
        ::Windows::Storage::Search::StorageFileQueryResult^ result = wrapper->_instance->NeighboringFilesQuery;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Storage.Search", "StorageFileQueryResult", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileActivatedEventArgs *wrapper = WebUIFileActivatedEventArgs::Unwrap<WebUIFileActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIFileActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIFileActivatedEventArgs(::Windows::UI::WebUI::WebUIFileActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIFileActivatedEventArgs^ UnwrapWebUIFileActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIFileActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIFileActivatedEventArgs(::Windows::UI::WebUI::WebUIFileActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIFileActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIFileActivatedEventArgs^ UnwrapWebUIFileActivatedEventArgs(Local<Value> value) {
     return WebUIFileActivatedEventArgs::Unwrap<WebUIFileActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIFileActivatedEventArgs(Local<Object> exports) {
    WebUIFileActivatedEventArgs::Init(exports);
  }

  class WebUIFileOpenPickerActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIFileOpenPickerActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("fileOpenPickerUI").ToLocalChecked(), FileOpenPickerUIGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("callerPackageFamilyName").ToLocalChecked(), CallerPackageFamilyNameGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIFileOpenPickerActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIFileOpenPickerActivatedEventArgs(::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIFileOpenPickerActivatedEventArgs *wrapperInstance = new WebUIFileOpenPickerActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIFileOpenPickerActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerActivatedEventArgs *wrapper = WebUIFileOpenPickerActivatedEventArgs::Unwrap<WebUIFileOpenPickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerActivatedEventArgs *wrapper = WebUIFileOpenPickerActivatedEventArgs::Unwrap<WebUIFileOpenPickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerActivatedEventArgs *wrapper = WebUIFileOpenPickerActivatedEventArgs::Unwrap<WebUIFileOpenPickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerActivatedEventArgs *wrapper = WebUIFileOpenPickerActivatedEventArgs::Unwrap<WebUIFileOpenPickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void FileOpenPickerUIGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerActivatedEventArgs *wrapper = WebUIFileOpenPickerActivatedEventArgs::Unwrap<WebUIFileOpenPickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::Storage::Pickers::Provider::FileOpenPickerUI^ result = wrapper->_instance->FileOpenPickerUI;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Storage.Pickers.Provider", "FileOpenPickerUI", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CallerPackageFamilyNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerActivatedEventArgs *wrapper = WebUIFileOpenPickerActivatedEventArgs::Unwrap<WebUIFileOpenPickerActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->CallerPackageFamilyName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerActivatedEventArgs *wrapper = WebUIFileOpenPickerActivatedEventArgs::Unwrap<WebUIFileOpenPickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIFileOpenPickerActivatedEventArgs(::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^ UnwrapWebUIFileOpenPickerActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIFileOpenPickerActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIFileOpenPickerActivatedEventArgs(::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIFileOpenPickerActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs^ UnwrapWebUIFileOpenPickerActivatedEventArgs(Local<Value> value) {
     return WebUIFileOpenPickerActivatedEventArgs::Unwrap<WebUIFileOpenPickerActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIFileOpenPickerActivatedEventArgs(Local<Object> exports) {
    WebUIFileOpenPickerActivatedEventArgs::Init(exports);
  }

  class WebUIFileOpenPickerContinuationEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIFileOpenPickerContinuationEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("continuationData").ToLocalChecked(), ContinuationDataGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("files").ToLocalChecked(), FilesGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIFileOpenPickerContinuationEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIFileOpenPickerContinuationEventArgs(::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIFileOpenPickerContinuationEventArgs *wrapperInstance = new WebUIFileOpenPickerContinuationEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIFileOpenPickerContinuationEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerContinuationEventArgs *wrapper = WebUIFileOpenPickerContinuationEventArgs::Unwrap<WebUIFileOpenPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerContinuationEventArgs *wrapper = WebUIFileOpenPickerContinuationEventArgs::Unwrap<WebUIFileOpenPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerContinuationEventArgs *wrapper = WebUIFileOpenPickerContinuationEventArgs::Unwrap<WebUIFileOpenPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerContinuationEventArgs *wrapper = WebUIFileOpenPickerContinuationEventArgs::Unwrap<WebUIFileOpenPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContinuationDataGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerContinuationEventArgs *wrapper = WebUIFileOpenPickerContinuationEventArgs::Unwrap<WebUIFileOpenPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::Foundation::Collections::ValueSet^ result = wrapper->_instance->ContinuationData;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation.Collections", "ValueSet", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void FilesGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerContinuationEventArgs *wrapper = WebUIFileOpenPickerContinuationEventArgs::Unwrap<WebUIFileOpenPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVectorView<::Windows::Storage::StorageFile^>^ result = wrapper->_instance->Files;
        info.GetReturnValue().Set(NodeRT::Collections::VectorViewWrapper<::Windows::Storage::StorageFile^>::CreateVectorViewWrapper(result, 
            [](::Windows::Storage::StorageFile^ val) -> Local<Value> {
              return NodeRT::Utils::CreateExternalWinRTObject("Windows.Storage", "StorageFile", val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Storage::StorageFile^>(value);
            },
            [](Local<Value> value) -> ::Windows::Storage::StorageFile^ {
              return dynamic_cast<::Windows::Storage::StorageFile^>(NodeRT::Utils::GetObjectInstance(value));
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileOpenPickerContinuationEventArgs *wrapper = WebUIFileOpenPickerContinuationEventArgs::Unwrap<WebUIFileOpenPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIFileOpenPickerContinuationEventArgs(::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^ UnwrapWebUIFileOpenPickerContinuationEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIFileOpenPickerContinuationEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIFileOpenPickerContinuationEventArgs(::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIFileOpenPickerContinuationEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs^ UnwrapWebUIFileOpenPickerContinuationEventArgs(Local<Value> value) {
     return WebUIFileOpenPickerContinuationEventArgs::Unwrap<WebUIFileOpenPickerContinuationEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIFileOpenPickerContinuationEventArgs(Local<Object> exports) {
    WebUIFileOpenPickerContinuationEventArgs::Init(exports);
  }

  class WebUIFileSavePickerActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIFileSavePickerActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("fileSavePickerUI").ToLocalChecked(), FileSavePickerUIGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("callerPackageFamilyName").ToLocalChecked(), CallerPackageFamilyNameGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("enterpriseId").ToLocalChecked(), EnterpriseIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIFileSavePickerActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIFileSavePickerActivatedEventArgs(::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIFileSavePickerActivatedEventArgs *wrapperInstance = new WebUIFileSavePickerActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIFileSavePickerActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerActivatedEventArgs *wrapper = WebUIFileSavePickerActivatedEventArgs::Unwrap<WebUIFileSavePickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerActivatedEventArgs *wrapper = WebUIFileSavePickerActivatedEventArgs::Unwrap<WebUIFileSavePickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerActivatedEventArgs *wrapper = WebUIFileSavePickerActivatedEventArgs::Unwrap<WebUIFileSavePickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerActivatedEventArgs *wrapper = WebUIFileSavePickerActivatedEventArgs::Unwrap<WebUIFileSavePickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void FileSavePickerUIGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerActivatedEventArgs *wrapper = WebUIFileSavePickerActivatedEventArgs::Unwrap<WebUIFileSavePickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::Storage::Pickers::Provider::FileSavePickerUI^ result = wrapper->_instance->FileSavePickerUI;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Storage.Pickers.Provider", "FileSavePickerUI", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CallerPackageFamilyNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerActivatedEventArgs *wrapper = WebUIFileSavePickerActivatedEventArgs::Unwrap<WebUIFileSavePickerActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->CallerPackageFamilyName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void EnterpriseIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerActivatedEventArgs *wrapper = WebUIFileSavePickerActivatedEventArgs::Unwrap<WebUIFileSavePickerActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->EnterpriseId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerActivatedEventArgs *wrapper = WebUIFileSavePickerActivatedEventArgs::Unwrap<WebUIFileSavePickerActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIFileSavePickerActivatedEventArgs(::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^ UnwrapWebUIFileSavePickerActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIFileSavePickerActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIFileSavePickerActivatedEventArgs(::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIFileSavePickerActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs^ UnwrapWebUIFileSavePickerActivatedEventArgs(Local<Value> value) {
     return WebUIFileSavePickerActivatedEventArgs::Unwrap<WebUIFileSavePickerActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIFileSavePickerActivatedEventArgs(Local<Object> exports) {
    WebUIFileSavePickerActivatedEventArgs::Init(exports);
  }

  class WebUIFileSavePickerContinuationEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIFileSavePickerContinuationEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("continuationData").ToLocalChecked(), ContinuationDataGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("file").ToLocalChecked(), FileGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIFileSavePickerContinuationEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIFileSavePickerContinuationEventArgs(::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIFileSavePickerContinuationEventArgs *wrapperInstance = new WebUIFileSavePickerContinuationEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIFileSavePickerContinuationEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerContinuationEventArgs *wrapper = WebUIFileSavePickerContinuationEventArgs::Unwrap<WebUIFileSavePickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerContinuationEventArgs *wrapper = WebUIFileSavePickerContinuationEventArgs::Unwrap<WebUIFileSavePickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerContinuationEventArgs *wrapper = WebUIFileSavePickerContinuationEventArgs::Unwrap<WebUIFileSavePickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerContinuationEventArgs *wrapper = WebUIFileSavePickerContinuationEventArgs::Unwrap<WebUIFileSavePickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContinuationDataGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerContinuationEventArgs *wrapper = WebUIFileSavePickerContinuationEventArgs::Unwrap<WebUIFileSavePickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::Foundation::Collections::ValueSet^ result = wrapper->_instance->ContinuationData;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation.Collections", "ValueSet", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void FileGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerContinuationEventArgs *wrapper = WebUIFileSavePickerContinuationEventArgs::Unwrap<WebUIFileSavePickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::Storage::StorageFile^ result = wrapper->_instance->File;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Storage", "StorageFile", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFileSavePickerContinuationEventArgs *wrapper = WebUIFileSavePickerContinuationEventArgs::Unwrap<WebUIFileSavePickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIFileSavePickerContinuationEventArgs(::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^ UnwrapWebUIFileSavePickerContinuationEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIFileSavePickerContinuationEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIFileSavePickerContinuationEventArgs(::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIFileSavePickerContinuationEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs^ UnwrapWebUIFileSavePickerContinuationEventArgs(Local<Value> value) {
     return WebUIFileSavePickerContinuationEventArgs::Unwrap<WebUIFileSavePickerContinuationEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIFileSavePickerContinuationEventArgs(Local<Object> exports) {
    WebUIFileSavePickerContinuationEventArgs::Init(exports);
  }

  class WebUIFolderPickerContinuationEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIFolderPickerContinuationEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("continuationData").ToLocalChecked(), ContinuationDataGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("folder").ToLocalChecked(), FolderGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIFolderPickerContinuationEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIFolderPickerContinuationEventArgs(::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIFolderPickerContinuationEventArgs *wrapperInstance = new WebUIFolderPickerContinuationEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIFolderPickerContinuationEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFolderPickerContinuationEventArgs *wrapper = WebUIFolderPickerContinuationEventArgs::Unwrap<WebUIFolderPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFolderPickerContinuationEventArgs *wrapper = WebUIFolderPickerContinuationEventArgs::Unwrap<WebUIFolderPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFolderPickerContinuationEventArgs *wrapper = WebUIFolderPickerContinuationEventArgs::Unwrap<WebUIFolderPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFolderPickerContinuationEventArgs *wrapper = WebUIFolderPickerContinuationEventArgs::Unwrap<WebUIFolderPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContinuationDataGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFolderPickerContinuationEventArgs *wrapper = WebUIFolderPickerContinuationEventArgs::Unwrap<WebUIFolderPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::Foundation::Collections::ValueSet^ result = wrapper->_instance->ContinuationData;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation.Collections", "ValueSet", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void FolderGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFolderPickerContinuationEventArgs *wrapper = WebUIFolderPickerContinuationEventArgs::Unwrap<WebUIFolderPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::Storage::StorageFolder^ result = wrapper->_instance->Folder;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Storage", "StorageFolder", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIFolderPickerContinuationEventArgs *wrapper = WebUIFolderPickerContinuationEventArgs::Unwrap<WebUIFolderPickerContinuationEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIFolderPickerContinuationEventArgs(::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^ UnwrapWebUIFolderPickerContinuationEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIFolderPickerContinuationEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIFolderPickerContinuationEventArgs(::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIFolderPickerContinuationEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs^ UnwrapWebUIFolderPickerContinuationEventArgs(Local<Value> value) {
     return WebUIFolderPickerContinuationEventArgs::Unwrap<WebUIFolderPickerContinuationEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIFolderPickerContinuationEventArgs(Local<Object> exports) {
    WebUIFolderPickerContinuationEventArgs::Init(exports);
  }

  class WebUILaunchActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUILaunchActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("currentlyShownApplicationViewId").ToLocalChecked(), CurrentlyShownApplicationViewIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("arguments").ToLocalChecked(), ArgumentsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("tileId").ToLocalChecked(), TileIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("tileActivatedInfo").ToLocalChecked(), TileActivatedInfoGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("prelaunchActivated").ToLocalChecked(), PrelaunchActivatedGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUILaunchActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUILaunchActivatedEventArgs(::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUILaunchActivatedEventArgs *wrapperInstance = new WebUILaunchActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUILaunchActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILaunchActivatedEventArgs *wrapper = WebUILaunchActivatedEventArgs::Unwrap<WebUILaunchActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILaunchActivatedEventArgs *wrapper = WebUILaunchActivatedEventArgs::Unwrap<WebUILaunchActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILaunchActivatedEventArgs *wrapper = WebUILaunchActivatedEventArgs::Unwrap<WebUILaunchActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILaunchActivatedEventArgs *wrapper = WebUILaunchActivatedEventArgs::Unwrap<WebUILaunchActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CurrentlyShownApplicationViewIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILaunchActivatedEventArgs *wrapper = WebUILaunchActivatedEventArgs::Unwrap<WebUILaunchActivatedEventArgs>(info.This());

      try  {
        int result = wrapper->_instance->CurrentlyShownApplicationViewId;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ArgumentsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILaunchActivatedEventArgs *wrapper = WebUILaunchActivatedEventArgs::Unwrap<WebUILaunchActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Arguments;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TileIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILaunchActivatedEventArgs *wrapper = WebUILaunchActivatedEventArgs::Unwrap<WebUILaunchActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->TileId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TileActivatedInfoGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILaunchActivatedEventArgs *wrapper = WebUILaunchActivatedEventArgs::Unwrap<WebUILaunchActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::TileActivatedInfo^ result = wrapper->_instance->TileActivatedInfo;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "TileActivatedInfo", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PrelaunchActivatedGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILaunchActivatedEventArgs *wrapper = WebUILaunchActivatedEventArgs::Unwrap<WebUILaunchActivatedEventArgs>(info.This());

      try  {
        bool result = wrapper->_instance->PrelaunchActivated;
        info.GetReturnValue().Set(Nan::New<Boolean>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILaunchActivatedEventArgs *wrapper = WebUILaunchActivatedEventArgs::Unwrap<WebUILaunchActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUILaunchActivatedEventArgs(::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^ UnwrapWebUILaunchActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUILaunchActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUILaunchActivatedEventArgs(::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUILaunchActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUILaunchActivatedEventArgs^ UnwrapWebUILaunchActivatedEventArgs(Local<Value> value) {
     return WebUILaunchActivatedEventArgs::Unwrap<WebUILaunchActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUILaunchActivatedEventArgs(Local<Object> exports) {
    WebUILaunchActivatedEventArgs::Init(exports);
  }

  class WebUILockScreenActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUILockScreenActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("currentlyShownApplicationViewId").ToLocalChecked(), CurrentlyShownApplicationViewIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("info").ToLocalChecked(), InfoGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUILockScreenActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUILockScreenActivatedEventArgs(::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUILockScreenActivatedEventArgs *wrapperInstance = new WebUILockScreenActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUILockScreenActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenActivatedEventArgs *wrapper = WebUILockScreenActivatedEventArgs::Unwrap<WebUILockScreenActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenActivatedEventArgs *wrapper = WebUILockScreenActivatedEventArgs::Unwrap<WebUILockScreenActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenActivatedEventArgs *wrapper = WebUILockScreenActivatedEventArgs::Unwrap<WebUILockScreenActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenActivatedEventArgs *wrapper = WebUILockScreenActivatedEventArgs::Unwrap<WebUILockScreenActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CurrentlyShownApplicationViewIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenActivatedEventArgs *wrapper = WebUILockScreenActivatedEventArgs::Unwrap<WebUILockScreenActivatedEventArgs>(info.This());

      try  {
        int result = wrapper->_instance->CurrentlyShownApplicationViewId;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void InfoGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenActivatedEventArgs *wrapper = WebUILockScreenActivatedEventArgs::Unwrap<WebUILockScreenActivatedEventArgs>(info.This());

      try  {
        ::Platform::Object^ result = wrapper->_instance->Info;
        info.GetReturnValue().Set(CreateOpaqueWrapper(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenActivatedEventArgs *wrapper = WebUILockScreenActivatedEventArgs::Unwrap<WebUILockScreenActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUILockScreenActivatedEventArgs(::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^ UnwrapWebUILockScreenActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUILockScreenActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUILockScreenActivatedEventArgs(::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUILockScreenActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs^ UnwrapWebUILockScreenActivatedEventArgs(Local<Value> value) {
     return WebUILockScreenActivatedEventArgs::Unwrap<WebUILockScreenActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUILockScreenActivatedEventArgs(Local<Object> exports) {
    WebUILockScreenActivatedEventArgs::Init(exports);
  }

  class WebUILockScreenCallActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUILockScreenCallActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("currentlyShownApplicationViewId").ToLocalChecked(), CurrentlyShownApplicationViewIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("arguments").ToLocalChecked(), ArgumentsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("tileId").ToLocalChecked(), TileIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("callUI").ToLocalChecked(), CallUIGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUILockScreenCallActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUILockScreenCallActivatedEventArgs(::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUILockScreenCallActivatedEventArgs *wrapperInstance = new WebUILockScreenCallActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUILockScreenCallActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenCallActivatedEventArgs *wrapper = WebUILockScreenCallActivatedEventArgs::Unwrap<WebUILockScreenCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenCallActivatedEventArgs *wrapper = WebUILockScreenCallActivatedEventArgs::Unwrap<WebUILockScreenCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenCallActivatedEventArgs *wrapper = WebUILockScreenCallActivatedEventArgs::Unwrap<WebUILockScreenCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CurrentlyShownApplicationViewIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenCallActivatedEventArgs *wrapper = WebUILockScreenCallActivatedEventArgs::Unwrap<WebUILockScreenCallActivatedEventArgs>(info.This());

      try  {
        int result = wrapper->_instance->CurrentlyShownApplicationViewId;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ArgumentsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenCallActivatedEventArgs *wrapper = WebUILockScreenCallActivatedEventArgs::Unwrap<WebUILockScreenCallActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Arguments;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TileIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenCallActivatedEventArgs *wrapper = WebUILockScreenCallActivatedEventArgs::Unwrap<WebUILockScreenCallActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->TileId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CallUIGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenCallActivatedEventArgs *wrapper = WebUILockScreenCallActivatedEventArgs::Unwrap<WebUILockScreenCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Calls::LockScreenCallUI^ result = wrapper->_instance->CallUI;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Calls", "LockScreenCallUI", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenCallActivatedEventArgs *wrapper = WebUILockScreenCallActivatedEventArgs::Unwrap<WebUILockScreenCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUILockScreenCallActivatedEventArgs(::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^ UnwrapWebUILockScreenCallActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUILockScreenCallActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUILockScreenCallActivatedEventArgs(::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUILockScreenCallActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs^ UnwrapWebUILockScreenCallActivatedEventArgs(Local<Value> value) {
     return WebUILockScreenCallActivatedEventArgs::Unwrap<WebUILockScreenCallActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUILockScreenCallActivatedEventArgs(Local<Object> exports) {
    WebUILockScreenCallActivatedEventArgs::Init(exports);
  }

  class WebUILockScreenComponentActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUILockScreenComponentActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUILockScreenComponentActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUILockScreenComponentActivatedEventArgs(::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUILockScreenComponentActivatedEventArgs *wrapperInstance = new WebUILockScreenComponentActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUILockScreenComponentActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenComponentActivatedEventArgs *wrapper = WebUILockScreenComponentActivatedEventArgs::Unwrap<WebUILockScreenComponentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenComponentActivatedEventArgs *wrapper = WebUILockScreenComponentActivatedEventArgs::Unwrap<WebUILockScreenComponentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenComponentActivatedEventArgs *wrapper = WebUILockScreenComponentActivatedEventArgs::Unwrap<WebUILockScreenComponentActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUILockScreenComponentActivatedEventArgs *wrapper = WebUILockScreenComponentActivatedEventArgs::Unwrap<WebUILockScreenComponentActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUILockScreenComponentActivatedEventArgs(::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^ UnwrapWebUILockScreenComponentActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUILockScreenComponentActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUILockScreenComponentActivatedEventArgs(::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUILockScreenComponentActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUILockScreenComponentActivatedEventArgs^ UnwrapWebUILockScreenComponentActivatedEventArgs(Local<Value> value) {
     return WebUILockScreenComponentActivatedEventArgs::Unwrap<WebUILockScreenComponentActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUILockScreenComponentActivatedEventArgs(Local<Object> exports) {
    WebUILockScreenComponentActivatedEventArgs::Init(exports);
  }

  class WebUINavigatedDeferral : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUINavigatedDeferral").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "complete", Complete);
          




        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUINavigatedDeferral").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUINavigatedDeferral(::Windows::UI::WebUI::WebUINavigatedDeferral^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUINavigatedDeferral^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUINavigatedDeferral^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUINavigatedDeferral^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUINavigatedDeferral *wrapperInstance = new WebUINavigatedDeferral(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUINavigatedDeferral^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUINavigatedDeferral^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUINavigatedDeferral^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUINavigatedDeferral(winRtInstance));
    }


    static void Complete(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUINavigatedDeferral^>(info.This())) {
        return;
      }

      WebUINavigatedDeferral *wrapper = WebUINavigatedDeferral::Unwrap<WebUINavigatedDeferral>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          wrapper->_instance->Complete();
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }





    private:
      ::Windows::UI::WebUI::WebUINavigatedDeferral^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUINavigatedDeferral(::Windows::UI::WebUI::WebUINavigatedDeferral^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUINavigatedDeferral^ UnwrapWebUINavigatedDeferral(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUINavigatedDeferral::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUINavigatedDeferral(::Windows::UI::WebUI::WebUINavigatedDeferral^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUINavigatedDeferral::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUINavigatedDeferral^ UnwrapWebUINavigatedDeferral(Local<Value> value) {
     return WebUINavigatedDeferral::Unwrap<WebUINavigatedDeferral>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUINavigatedDeferral(Local<Object> exports) {
    WebUINavigatedDeferral::Init(exports);
  }

  class WebUINavigatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUINavigatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("navigatedOperation").ToLocalChecked(), NavigatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUINavigatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUINavigatedEventArgs(::Windows::UI::WebUI::WebUINavigatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUINavigatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUINavigatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUINavigatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUINavigatedEventArgs *wrapperInstance = new WebUINavigatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUINavigatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUINavigatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUINavigatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUINavigatedEventArgs(winRtInstance));
    }





    static void NavigatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUINavigatedEventArgs^>(info.This())) {
        return;
      }

      WebUINavigatedEventArgs *wrapper = WebUINavigatedEventArgs::Unwrap<WebUINavigatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::WebUINavigatedOperation^ result = wrapper->_instance->NavigatedOperation;
        info.GetReturnValue().Set(WrapWebUINavigatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUINavigatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUINavigatedEventArgs(::Windows::UI::WebUI::WebUINavigatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUINavigatedEventArgs^ UnwrapWebUINavigatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUINavigatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUINavigatedEventArgs(::Windows::UI::WebUI::WebUINavigatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUINavigatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUINavigatedEventArgs^ UnwrapWebUINavigatedEventArgs(Local<Value> value) {
     return WebUINavigatedEventArgs::Unwrap<WebUINavigatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUINavigatedEventArgs(Local<Object> exports) {
    WebUINavigatedEventArgs::Init(exports);
  }

  class WebUINavigatedOperation : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUINavigatedOperation").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getDeferral", GetDeferral);
          




        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUINavigatedOperation").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUINavigatedOperation(::Windows::UI::WebUI::WebUINavigatedOperation^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUINavigatedOperation^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUINavigatedOperation^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUINavigatedOperation^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUINavigatedOperation *wrapperInstance = new WebUINavigatedOperation(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUINavigatedOperation^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUINavigatedOperation^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUINavigatedOperation^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUINavigatedOperation(winRtInstance));
    }


    static void GetDeferral(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUINavigatedOperation^>(info.This())) {
        return;
      }

      WebUINavigatedOperation *wrapper = WebUINavigatedOperation::Unwrap<WebUINavigatedOperation>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          ::Windows::UI::WebUI::WebUINavigatedDeferral^ result;
          result = wrapper->_instance->GetDeferral();
          info.GetReturnValue().Set(WrapWebUINavigatedDeferral(result));
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }





    private:
      ::Windows::UI::WebUI::WebUINavigatedOperation^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUINavigatedOperation(::Windows::UI::WebUI::WebUINavigatedOperation^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUINavigatedOperation^ UnwrapWebUINavigatedOperation(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUINavigatedOperation::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUINavigatedOperation(::Windows::UI::WebUI::WebUINavigatedOperation^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUINavigatedOperation::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUINavigatedOperation^ UnwrapWebUINavigatedOperation(Local<Value> value) {
     return WebUINavigatedOperation::Unwrap<WebUINavigatedOperation>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUINavigatedOperation(Local<Object> exports) {
    WebUINavigatedOperation::Init(exports);
  }

  class WebUIPhoneCallActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIPhoneCallActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("lineId").ToLocalChecked(), LineIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIPhoneCallActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIPhoneCallActivatedEventArgs(::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIPhoneCallActivatedEventArgs *wrapperInstance = new WebUIPhoneCallActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIPhoneCallActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPhoneCallActivatedEventArgs *wrapper = WebUIPhoneCallActivatedEventArgs::Unwrap<WebUIPhoneCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPhoneCallActivatedEventArgs *wrapper = WebUIPhoneCallActivatedEventArgs::Unwrap<WebUIPhoneCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPhoneCallActivatedEventArgs *wrapper = WebUIPhoneCallActivatedEventArgs::Unwrap<WebUIPhoneCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPhoneCallActivatedEventArgs *wrapper = WebUIPhoneCallActivatedEventArgs::Unwrap<WebUIPhoneCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void LineIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPhoneCallActivatedEventArgs *wrapper = WebUIPhoneCallActivatedEventArgs::Unwrap<WebUIPhoneCallActivatedEventArgs>(info.This());

      try  {
        ::Platform::Guid result = wrapper->_instance->LineId;
        info.GetReturnValue().Set(NodeRT::Utils::GuidToJs(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPhoneCallActivatedEventArgs *wrapper = WebUIPhoneCallActivatedEventArgs::Unwrap<WebUIPhoneCallActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIPhoneCallActivatedEventArgs(::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^ UnwrapWebUIPhoneCallActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIPhoneCallActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIPhoneCallActivatedEventArgs(::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIPhoneCallActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIPhoneCallActivatedEventArgs^ UnwrapWebUIPhoneCallActivatedEventArgs(Local<Value> value) {
     return WebUIPhoneCallActivatedEventArgs::Unwrap<WebUIPhoneCallActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIPhoneCallActivatedEventArgs(Local<Object> exports) {
    WebUIPhoneCallActivatedEventArgs::Init(exports);
  }

  class WebUIPrint3DWorkflowActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIPrint3DWorkflowActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("workflow").ToLocalChecked(), WorkflowGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIPrint3DWorkflowActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIPrint3DWorkflowActivatedEventArgs(::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIPrint3DWorkflowActivatedEventArgs *wrapperInstance = new WebUIPrint3DWorkflowActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIPrint3DWorkflowActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrint3DWorkflowActivatedEventArgs *wrapper = WebUIPrint3DWorkflowActivatedEventArgs::Unwrap<WebUIPrint3DWorkflowActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrint3DWorkflowActivatedEventArgs *wrapper = WebUIPrint3DWorkflowActivatedEventArgs::Unwrap<WebUIPrint3DWorkflowActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrint3DWorkflowActivatedEventArgs *wrapper = WebUIPrint3DWorkflowActivatedEventArgs::Unwrap<WebUIPrint3DWorkflowActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void WorkflowGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrint3DWorkflowActivatedEventArgs *wrapper = WebUIPrint3DWorkflowActivatedEventArgs::Unwrap<WebUIPrint3DWorkflowActivatedEventArgs>(info.This());

      try  {
        ::Windows::Devices::Printers::Extensions::Print3DWorkflow^ result = wrapper->_instance->Workflow;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Devices.Printers.Extensions", "Print3DWorkflow", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrint3DWorkflowActivatedEventArgs *wrapper = WebUIPrint3DWorkflowActivatedEventArgs::Unwrap<WebUIPrint3DWorkflowActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIPrint3DWorkflowActivatedEventArgs(::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^ UnwrapWebUIPrint3DWorkflowActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIPrint3DWorkflowActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIPrint3DWorkflowActivatedEventArgs(::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIPrint3DWorkflowActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs^ UnwrapWebUIPrint3DWorkflowActivatedEventArgs(Local<Value> value) {
     return WebUIPrint3DWorkflowActivatedEventArgs::Unwrap<WebUIPrint3DWorkflowActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIPrint3DWorkflowActivatedEventArgs(Local<Object> exports) {
    WebUIPrint3DWorkflowActivatedEventArgs::Init(exports);
  }

  class WebUIPrintTaskSettingsActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIPrintTaskSettingsActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("configuration").ToLocalChecked(), ConfigurationGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIPrintTaskSettingsActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIPrintTaskSettingsActivatedEventArgs(::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIPrintTaskSettingsActivatedEventArgs *wrapperInstance = new WebUIPrintTaskSettingsActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIPrintTaskSettingsActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrintTaskSettingsActivatedEventArgs *wrapper = WebUIPrintTaskSettingsActivatedEventArgs::Unwrap<WebUIPrintTaskSettingsActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrintTaskSettingsActivatedEventArgs *wrapper = WebUIPrintTaskSettingsActivatedEventArgs::Unwrap<WebUIPrintTaskSettingsActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrintTaskSettingsActivatedEventArgs *wrapper = WebUIPrintTaskSettingsActivatedEventArgs::Unwrap<WebUIPrintTaskSettingsActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ConfigurationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrintTaskSettingsActivatedEventArgs *wrapper = WebUIPrintTaskSettingsActivatedEventArgs::Unwrap<WebUIPrintTaskSettingsActivatedEventArgs>(info.This());

      try  {
        ::Windows::Devices::Printers::Extensions::PrintTaskConfiguration^ result = wrapper->_instance->Configuration;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Devices.Printers.Extensions", "PrintTaskConfiguration", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrintTaskSettingsActivatedEventArgs *wrapper = WebUIPrintTaskSettingsActivatedEventArgs::Unwrap<WebUIPrintTaskSettingsActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIPrintTaskSettingsActivatedEventArgs(::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^ UnwrapWebUIPrintTaskSettingsActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIPrintTaskSettingsActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIPrintTaskSettingsActivatedEventArgs(::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIPrintTaskSettingsActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs^ UnwrapWebUIPrintTaskSettingsActivatedEventArgs(Local<Value> value) {
     return WebUIPrintTaskSettingsActivatedEventArgs::Unwrap<WebUIPrintTaskSettingsActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIPrintTaskSettingsActivatedEventArgs(Local<Object> exports) {
    WebUIPrintTaskSettingsActivatedEventArgs::Init(exports);
  }

  class WebUIPrintWorkflowForegroundTaskActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIPrintWorkflowForegroundTaskActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIPrintWorkflowForegroundTaskActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIPrintWorkflowForegroundTaskActivatedEventArgs(::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIPrintWorkflowForegroundTaskActivatedEventArgs *wrapperInstance = new WebUIPrintWorkflowForegroundTaskActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIPrintWorkflowForegroundTaskActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrintWorkflowForegroundTaskActivatedEventArgs *wrapper = WebUIPrintWorkflowForegroundTaskActivatedEventArgs::Unwrap<WebUIPrintWorkflowForegroundTaskActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrintWorkflowForegroundTaskActivatedEventArgs *wrapper = WebUIPrintWorkflowForegroundTaskActivatedEventArgs::Unwrap<WebUIPrintWorkflowForegroundTaskActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrintWorkflowForegroundTaskActivatedEventArgs *wrapper = WebUIPrintWorkflowForegroundTaskActivatedEventArgs::Unwrap<WebUIPrintWorkflowForegroundTaskActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIPrintWorkflowForegroundTaskActivatedEventArgs *wrapper = WebUIPrintWorkflowForegroundTaskActivatedEventArgs::Unwrap<WebUIPrintWorkflowForegroundTaskActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIPrintWorkflowForegroundTaskActivatedEventArgs(::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^ UnwrapWebUIPrintWorkflowForegroundTaskActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIPrintWorkflowForegroundTaskActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIPrintWorkflowForegroundTaskActivatedEventArgs(::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIPrintWorkflowForegroundTaskActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIPrintWorkflowForegroundTaskActivatedEventArgs^ UnwrapWebUIPrintWorkflowForegroundTaskActivatedEventArgs(Local<Value> value) {
     return WebUIPrintWorkflowForegroundTaskActivatedEventArgs::Unwrap<WebUIPrintWorkflowForegroundTaskActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIPrintWorkflowForegroundTaskActivatedEventArgs(Local<Object> exports) {
    WebUIPrintWorkflowForegroundTaskActivatedEventArgs::Init(exports);
  }

  class WebUIProtocolActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIProtocolActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("currentlyShownApplicationViewId").ToLocalChecked(), CurrentlyShownApplicationViewIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("uri").ToLocalChecked(), UriGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("callerPackageFamilyName").ToLocalChecked(), CallerPackageFamilyNameGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("data").ToLocalChecked(), DataGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIProtocolActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIProtocolActivatedEventArgs(::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIProtocolActivatedEventArgs *wrapperInstance = new WebUIProtocolActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIProtocolActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolActivatedEventArgs *wrapper = WebUIProtocolActivatedEventArgs::Unwrap<WebUIProtocolActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolActivatedEventArgs *wrapper = WebUIProtocolActivatedEventArgs::Unwrap<WebUIProtocolActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolActivatedEventArgs *wrapper = WebUIProtocolActivatedEventArgs::Unwrap<WebUIProtocolActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolActivatedEventArgs *wrapper = WebUIProtocolActivatedEventArgs::Unwrap<WebUIProtocolActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CurrentlyShownApplicationViewIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolActivatedEventArgs *wrapper = WebUIProtocolActivatedEventArgs::Unwrap<WebUIProtocolActivatedEventArgs>(info.This());

      try  {
        int result = wrapper->_instance->CurrentlyShownApplicationViewId;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolActivatedEventArgs *wrapper = WebUIProtocolActivatedEventArgs::Unwrap<WebUIProtocolActivatedEventArgs>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->Uri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CallerPackageFamilyNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolActivatedEventArgs *wrapper = WebUIProtocolActivatedEventArgs::Unwrap<WebUIProtocolActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->CallerPackageFamilyName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void DataGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolActivatedEventArgs *wrapper = WebUIProtocolActivatedEventArgs::Unwrap<WebUIProtocolActivatedEventArgs>(info.This());

      try  {
        ::Windows::Foundation::Collections::ValueSet^ result = wrapper->_instance->Data;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation.Collections", "ValueSet", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolActivatedEventArgs *wrapper = WebUIProtocolActivatedEventArgs::Unwrap<WebUIProtocolActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIProtocolActivatedEventArgs(::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^ UnwrapWebUIProtocolActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIProtocolActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIProtocolActivatedEventArgs(::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIProtocolActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs^ UnwrapWebUIProtocolActivatedEventArgs(Local<Value> value) {
     return WebUIProtocolActivatedEventArgs::Unwrap<WebUIProtocolActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIProtocolActivatedEventArgs(Local<Object> exports) {
    WebUIProtocolActivatedEventArgs::Init(exports);
  }

  class WebUIProtocolForResultsActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIProtocolForResultsActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("currentlyShownApplicationViewId").ToLocalChecked(), CurrentlyShownApplicationViewIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("uri").ToLocalChecked(), UriGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("callerPackageFamilyName").ToLocalChecked(), CallerPackageFamilyNameGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("data").ToLocalChecked(), DataGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("protocolForResultsOperation").ToLocalChecked(), ProtocolForResultsOperationGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIProtocolForResultsActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIProtocolForResultsActivatedEventArgs(::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIProtocolForResultsActivatedEventArgs *wrapperInstance = new WebUIProtocolForResultsActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIProtocolForResultsActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolForResultsActivatedEventArgs *wrapper = WebUIProtocolForResultsActivatedEventArgs::Unwrap<WebUIProtocolForResultsActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolForResultsActivatedEventArgs *wrapper = WebUIProtocolForResultsActivatedEventArgs::Unwrap<WebUIProtocolForResultsActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolForResultsActivatedEventArgs *wrapper = WebUIProtocolForResultsActivatedEventArgs::Unwrap<WebUIProtocolForResultsActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolForResultsActivatedEventArgs *wrapper = WebUIProtocolForResultsActivatedEventArgs::Unwrap<WebUIProtocolForResultsActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CurrentlyShownApplicationViewIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolForResultsActivatedEventArgs *wrapper = WebUIProtocolForResultsActivatedEventArgs::Unwrap<WebUIProtocolForResultsActivatedEventArgs>(info.This());

      try  {
        int result = wrapper->_instance->CurrentlyShownApplicationViewId;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolForResultsActivatedEventArgs *wrapper = WebUIProtocolForResultsActivatedEventArgs::Unwrap<WebUIProtocolForResultsActivatedEventArgs>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->Uri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CallerPackageFamilyNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolForResultsActivatedEventArgs *wrapper = WebUIProtocolForResultsActivatedEventArgs::Unwrap<WebUIProtocolForResultsActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->CallerPackageFamilyName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void DataGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolForResultsActivatedEventArgs *wrapper = WebUIProtocolForResultsActivatedEventArgs::Unwrap<WebUIProtocolForResultsActivatedEventArgs>(info.This());

      try  {
        ::Windows::Foundation::Collections::ValueSet^ result = wrapper->_instance->Data;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation.Collections", "ValueSet", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ProtocolForResultsOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolForResultsActivatedEventArgs *wrapper = WebUIProtocolForResultsActivatedEventArgs::Unwrap<WebUIProtocolForResultsActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::ProtocolForResultsOperation^ result = wrapper->_instance->ProtocolForResultsOperation;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "ProtocolForResultsOperation", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIProtocolForResultsActivatedEventArgs *wrapper = WebUIProtocolForResultsActivatedEventArgs::Unwrap<WebUIProtocolForResultsActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIProtocolForResultsActivatedEventArgs(::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^ UnwrapWebUIProtocolForResultsActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIProtocolForResultsActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIProtocolForResultsActivatedEventArgs(::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIProtocolForResultsActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs^ UnwrapWebUIProtocolForResultsActivatedEventArgs(Local<Value> value) {
     return WebUIProtocolForResultsActivatedEventArgs::Unwrap<WebUIProtocolForResultsActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIProtocolForResultsActivatedEventArgs(Local<Object> exports) {
    WebUIProtocolForResultsActivatedEventArgs::Init(exports);
  }

  class WebUIRestrictedLaunchActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIRestrictedLaunchActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("sharedContext").ToLocalChecked(), SharedContextGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIRestrictedLaunchActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIRestrictedLaunchActivatedEventArgs(::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIRestrictedLaunchActivatedEventArgs *wrapperInstance = new WebUIRestrictedLaunchActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIRestrictedLaunchActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIRestrictedLaunchActivatedEventArgs *wrapper = WebUIRestrictedLaunchActivatedEventArgs::Unwrap<WebUIRestrictedLaunchActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIRestrictedLaunchActivatedEventArgs *wrapper = WebUIRestrictedLaunchActivatedEventArgs::Unwrap<WebUIRestrictedLaunchActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIRestrictedLaunchActivatedEventArgs *wrapper = WebUIRestrictedLaunchActivatedEventArgs::Unwrap<WebUIRestrictedLaunchActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIRestrictedLaunchActivatedEventArgs *wrapper = WebUIRestrictedLaunchActivatedEventArgs::Unwrap<WebUIRestrictedLaunchActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SharedContextGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIRestrictedLaunchActivatedEventArgs *wrapper = WebUIRestrictedLaunchActivatedEventArgs::Unwrap<WebUIRestrictedLaunchActivatedEventArgs>(info.This());

      try  {
        ::Platform::Object^ result = wrapper->_instance->SharedContext;
        info.GetReturnValue().Set(CreateOpaqueWrapper(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIRestrictedLaunchActivatedEventArgs *wrapper = WebUIRestrictedLaunchActivatedEventArgs::Unwrap<WebUIRestrictedLaunchActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIRestrictedLaunchActivatedEventArgs(::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^ UnwrapWebUIRestrictedLaunchActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIRestrictedLaunchActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIRestrictedLaunchActivatedEventArgs(::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIRestrictedLaunchActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs^ UnwrapWebUIRestrictedLaunchActivatedEventArgs(Local<Value> value) {
     return WebUIRestrictedLaunchActivatedEventArgs::Unwrap<WebUIRestrictedLaunchActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIRestrictedLaunchActivatedEventArgs(Local<Object> exports) {
    WebUIRestrictedLaunchActivatedEventArgs::Init(exports);
  }

  class WebUISearchActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUISearchActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("currentlyShownApplicationViewId").ToLocalChecked(), CurrentlyShownApplicationViewIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("language").ToLocalChecked(), LanguageGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("queryText").ToLocalChecked(), QueryTextGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("linguisticDetails").ToLocalChecked(), LinguisticDetailsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUISearchActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUISearchActivatedEventArgs(::Windows::UI::WebUI::WebUISearchActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUISearchActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUISearchActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUISearchActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUISearchActivatedEventArgs *wrapperInstance = new WebUISearchActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUISearchActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUISearchActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUISearchActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUISearchActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUISearchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUISearchActivatedEventArgs *wrapper = WebUISearchActivatedEventArgs::Unwrap<WebUISearchActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUISearchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUISearchActivatedEventArgs *wrapper = WebUISearchActivatedEventArgs::Unwrap<WebUISearchActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUISearchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUISearchActivatedEventArgs *wrapper = WebUISearchActivatedEventArgs::Unwrap<WebUISearchActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CurrentlyShownApplicationViewIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUISearchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUISearchActivatedEventArgs *wrapper = WebUISearchActivatedEventArgs::Unwrap<WebUISearchActivatedEventArgs>(info.This());

      try  {
        int result = wrapper->_instance->CurrentlyShownApplicationViewId;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void LanguageGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUISearchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUISearchActivatedEventArgs *wrapper = WebUISearchActivatedEventArgs::Unwrap<WebUISearchActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Language;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void QueryTextGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUISearchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUISearchActivatedEventArgs *wrapper = WebUISearchActivatedEventArgs::Unwrap<WebUISearchActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->QueryText;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void LinguisticDetailsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUISearchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUISearchActivatedEventArgs *wrapper = WebUISearchActivatedEventArgs::Unwrap<WebUISearchActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Search::SearchPaneQueryLinguisticDetails^ result = wrapper->_instance->LinguisticDetails;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Search", "SearchPaneQueryLinguisticDetails", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUISearchActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUISearchActivatedEventArgs *wrapper = WebUISearchActivatedEventArgs::Unwrap<WebUISearchActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUISearchActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUISearchActivatedEventArgs(::Windows::UI::WebUI::WebUISearchActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUISearchActivatedEventArgs^ UnwrapWebUISearchActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUISearchActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUISearchActivatedEventArgs(::Windows::UI::WebUI::WebUISearchActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUISearchActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUISearchActivatedEventArgs^ UnwrapWebUISearchActivatedEventArgs(Local<Value> value) {
     return WebUISearchActivatedEventArgs::Unwrap<WebUISearchActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUISearchActivatedEventArgs(Local<Object> exports) {
    WebUISearchActivatedEventArgs::Init(exports);
  }

  class WebUIShareTargetActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIShareTargetActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("shareOperation").ToLocalChecked(), ShareOperationGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIShareTargetActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIShareTargetActivatedEventArgs(::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIShareTargetActivatedEventArgs *wrapperInstance = new WebUIShareTargetActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIShareTargetActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIShareTargetActivatedEventArgs *wrapper = WebUIShareTargetActivatedEventArgs::Unwrap<WebUIShareTargetActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIShareTargetActivatedEventArgs *wrapper = WebUIShareTargetActivatedEventArgs::Unwrap<WebUIShareTargetActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIShareTargetActivatedEventArgs *wrapper = WebUIShareTargetActivatedEventArgs::Unwrap<WebUIShareTargetActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIShareTargetActivatedEventArgs *wrapper = WebUIShareTargetActivatedEventArgs::Unwrap<WebUIShareTargetActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ShareOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIShareTargetActivatedEventArgs *wrapper = WebUIShareTargetActivatedEventArgs::Unwrap<WebUIShareTargetActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::DataTransfer::ShareTarget::ShareOperation^ result = wrapper->_instance->ShareOperation;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.DataTransfer.ShareTarget", "ShareOperation", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIShareTargetActivatedEventArgs *wrapper = WebUIShareTargetActivatedEventArgs::Unwrap<WebUIShareTargetActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIShareTargetActivatedEventArgs(::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^ UnwrapWebUIShareTargetActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIShareTargetActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIShareTargetActivatedEventArgs(::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIShareTargetActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs^ UnwrapWebUIShareTargetActivatedEventArgs(Local<Value> value) {
     return WebUIShareTargetActivatedEventArgs::Unwrap<WebUIShareTargetActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIShareTargetActivatedEventArgs(Local<Object> exports) {
    WebUIShareTargetActivatedEventArgs::Init(exports);
  }

  class WebUIStartupTaskActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIStartupTaskActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("taskId").ToLocalChecked(), TaskIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIStartupTaskActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIStartupTaskActivatedEventArgs(::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIStartupTaskActivatedEventArgs *wrapperInstance = new WebUIStartupTaskActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIStartupTaskActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIStartupTaskActivatedEventArgs *wrapper = WebUIStartupTaskActivatedEventArgs::Unwrap<WebUIStartupTaskActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIStartupTaskActivatedEventArgs *wrapper = WebUIStartupTaskActivatedEventArgs::Unwrap<WebUIStartupTaskActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIStartupTaskActivatedEventArgs *wrapper = WebUIStartupTaskActivatedEventArgs::Unwrap<WebUIStartupTaskActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIStartupTaskActivatedEventArgs *wrapper = WebUIStartupTaskActivatedEventArgs::Unwrap<WebUIStartupTaskActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TaskIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIStartupTaskActivatedEventArgs *wrapper = WebUIStartupTaskActivatedEventArgs::Unwrap<WebUIStartupTaskActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->TaskId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIStartupTaskActivatedEventArgs *wrapper = WebUIStartupTaskActivatedEventArgs::Unwrap<WebUIStartupTaskActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIStartupTaskActivatedEventArgs(::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^ UnwrapWebUIStartupTaskActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIStartupTaskActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIStartupTaskActivatedEventArgs(::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIStartupTaskActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIStartupTaskActivatedEventArgs^ UnwrapWebUIStartupTaskActivatedEventArgs(Local<Value> value) {
     return WebUIStartupTaskActivatedEventArgs::Unwrap<WebUIStartupTaskActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIStartupTaskActivatedEventArgs(Local<Object> exports) {
    WebUIStartupTaskActivatedEventArgs::Init(exports);
  }

  class WebUIToastNotificationActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIToastNotificationActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("argument").ToLocalChecked(), ArgumentGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("userInput").ToLocalChecked(), UserInputGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIToastNotificationActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIToastNotificationActivatedEventArgs(::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIToastNotificationActivatedEventArgs *wrapperInstance = new WebUIToastNotificationActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIToastNotificationActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIToastNotificationActivatedEventArgs *wrapper = WebUIToastNotificationActivatedEventArgs::Unwrap<WebUIToastNotificationActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIToastNotificationActivatedEventArgs *wrapper = WebUIToastNotificationActivatedEventArgs::Unwrap<WebUIToastNotificationActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIToastNotificationActivatedEventArgs *wrapper = WebUIToastNotificationActivatedEventArgs::Unwrap<WebUIToastNotificationActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIToastNotificationActivatedEventArgs *wrapper = WebUIToastNotificationActivatedEventArgs::Unwrap<WebUIToastNotificationActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ArgumentGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIToastNotificationActivatedEventArgs *wrapper = WebUIToastNotificationActivatedEventArgs::Unwrap<WebUIToastNotificationActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Argument;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserInputGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIToastNotificationActivatedEventArgs *wrapper = WebUIToastNotificationActivatedEventArgs::Unwrap<WebUIToastNotificationActivatedEventArgs>(info.This());

      try  {
        ::Windows::Foundation::Collections::ValueSet^ result = wrapper->_instance->UserInput;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation.Collections", "ValueSet", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIToastNotificationActivatedEventArgs *wrapper = WebUIToastNotificationActivatedEventArgs::Unwrap<WebUIToastNotificationActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIToastNotificationActivatedEventArgs(::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^ UnwrapWebUIToastNotificationActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIToastNotificationActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIToastNotificationActivatedEventArgs(::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIToastNotificationActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs^ UnwrapWebUIToastNotificationActivatedEventArgs(Local<Value> value) {
     return WebUIToastNotificationActivatedEventArgs::Unwrap<WebUIToastNotificationActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIToastNotificationActivatedEventArgs(Local<Object> exports) {
    WebUIToastNotificationActivatedEventArgs::Init(exports);
  }

  class WebUIUserDataAccountProviderActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIUserDataAccountProviderActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("operation").ToLocalChecked(), OperationGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIUserDataAccountProviderActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIUserDataAccountProviderActivatedEventArgs(::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIUserDataAccountProviderActivatedEventArgs *wrapperInstance = new WebUIUserDataAccountProviderActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIUserDataAccountProviderActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIUserDataAccountProviderActivatedEventArgs *wrapper = WebUIUserDataAccountProviderActivatedEventArgs::Unwrap<WebUIUserDataAccountProviderActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIUserDataAccountProviderActivatedEventArgs *wrapper = WebUIUserDataAccountProviderActivatedEventArgs::Unwrap<WebUIUserDataAccountProviderActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIUserDataAccountProviderActivatedEventArgs *wrapper = WebUIUserDataAccountProviderActivatedEventArgs::Unwrap<WebUIUserDataAccountProviderActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void OperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIUserDataAccountProviderActivatedEventArgs *wrapper = WebUIUserDataAccountProviderActivatedEventArgs::Unwrap<WebUIUserDataAccountProviderActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::UserDataAccounts::Provider::IUserDataAccountProviderOperation^ result = wrapper->_instance->Operation;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.UserDataAccounts.Provider", "IUserDataAccountProviderOperation", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIUserDataAccountProviderActivatedEventArgs *wrapper = WebUIUserDataAccountProviderActivatedEventArgs::Unwrap<WebUIUserDataAccountProviderActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIUserDataAccountProviderActivatedEventArgs(::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^ UnwrapWebUIUserDataAccountProviderActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIUserDataAccountProviderActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIUserDataAccountProviderActivatedEventArgs(::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIUserDataAccountProviderActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs^ UnwrapWebUIUserDataAccountProviderActivatedEventArgs(Local<Value> value) {
     return WebUIUserDataAccountProviderActivatedEventArgs::Unwrap<WebUIUserDataAccountProviderActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIUserDataAccountProviderActivatedEventArgs(Local<Object> exports) {
    WebUIUserDataAccountProviderActivatedEventArgs::Init(exports);
  }

  class WebUIView : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIView").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);

        Local<Function> func;
        Local<FunctionTemplate> funcTemplate;

          
            Nan::SetPrototypeMethod(localRef, "addInitializeScript", AddInitializeScript);
            Nan::SetPrototypeMethod(localRef, "goForward", GoForward);
            Nan::SetPrototypeMethod(localRef, "goBack", GoBack);
            Nan::SetPrototypeMethod(localRef, "refresh", Refresh);
            Nan::SetPrototypeMethod(localRef, "stop", Stop);
            Nan::SetPrototypeMethod(localRef, "navigate", Navigate);
            Nan::SetPrototypeMethod(localRef, "navigateToString", NavigateToString);
            Nan::SetPrototypeMethod(localRef, "navigateToLocalStreamUri", NavigateToLocalStreamUri);
            Nan::SetPrototypeMethod(localRef, "navigateWithHttpRequestMessage", NavigateWithHttpRequestMessage);
            Nan::SetPrototypeMethod(localRef, "buildLocalStreamUri", BuildLocalStreamUri);
            Nan::SetPrototypeMethod(localRef, "getDeferredPermissionRequestById", GetDeferredPermissionRequestById);
          

          
            Nan::SetPrototypeMethod(localRef, "invokeScriptAsync", InvokeScriptAsync);
            Nan::SetPrototypeMethod(localRef, "capturePreviewToStreamAsync", CapturePreviewToStreamAsync);
            Nan::SetPrototypeMethod(localRef, "captureSelectedContentToDataPackageAsync", CaptureSelectedContentToDataPackageAsync);
          

          
          Nan::SetPrototypeMethod(localRef,"addListener", AddListener);
          Nan::SetPrototypeMethod(localRef,"on", AddListener);
          Nan::SetPrototypeMethod(localRef,"removeListener", RemoveListener);
          Nan::SetPrototypeMethod(localRef, "off", RemoveListener);

          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("ignoreApplicationContentUriRulesNavigationRestrictions").ToLocalChecked(), IgnoreApplicationContentUriRulesNavigationRestrictionsGetter, IgnoreApplicationContentUriRulesNavigationRestrictionsSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("applicationViewId").ToLocalChecked(), ApplicationViewIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("source").ToLocalChecked(), SourceGetter, SourceSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("defaultBackgroundColor").ToLocalChecked(), DefaultBackgroundColorGetter, DefaultBackgroundColorSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("canGoBack").ToLocalChecked(), CanGoBackGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("canGoForward").ToLocalChecked(), CanGoForwardGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("containsFullScreenElement").ToLocalChecked(), ContainsFullScreenElementGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("deferredPermissionRequests").ToLocalChecked(), DeferredPermissionRequestsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("documentTitle").ToLocalChecked(), DocumentTitleGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("settings").ToLocalChecked(), SettingsGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);

        func = Nan::GetFunction(Nan::New<FunctionTemplate>(CreateAsync)).ToLocalChecked();
        Nan::Set(constructor, Nan::New<String>("createAsync").ToLocalChecked(), func);


        Nan::Set(exports, Nan::New<String>("WebUIView").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIView(::Windows::UI::WebUI::WebUIView^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIView^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIView^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIView *wrapperInstance = new WebUIView(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIView^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIView^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIView(winRtInstance));
    }

    static void InvokeScriptAsync(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      if (info.Length() == 0 || !info[info.Length() -1]->IsFunction()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: No callback was given")));
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      ::Windows::Foundation::IAsyncOperation<::Platform::String^>^ op;


      if (info.Length() == 3
        && info[0]->IsString()
        && (NodeRT::Utils::IsWinRtWrapperOf<::Windows::Foundation::Collections::IIterable<::Platform::String^>^>(info[1]) || info[1]->IsArray()))
      {
        try
        {
          Platform::String^ arg0 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[0])));
          ::Windows::Foundation::Collections::IIterable<::Platform::String^>^ arg1 = 
            [] (v8::Local<v8::Value> value) -> ::Windows::Foundation::Collections::IIterable<::Platform::String^>^
            {
              if (value->IsArray())
              {
                return NodeRT::Collections::JsArrayToWinrtVector<::Platform::String^>(value.As<Array>(), 
                 [](Local<Value> value) -> bool {
                   return (!NodeRT::Utils::IsWinRtWrapper(value));
                 },
                 [](Local<Value> value) -> ::Platform::String^ {
                   return ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));
                 }
                );
              }
              else
              {
                return dynamic_cast<::Windows::Foundation::Collections::IIterable<::Platform::String^>^>(NodeRT::Utils::GetObjectInstance(value));
              }
            } (info[1]);
          
          op = wrapper->_instance->InvokeScriptAsync(arg0,arg1);
        }
        catch (Platform::Exception ^exception)
        {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }

      auto opTask = create_task(op);
      uv_async_t* asyncToken = NodeUtils::Async::GetAsyncToken(info[info.Length() -1].As<Function>());

      opTask.then( [asyncToken] (task<::Platform::String^> t) {
        try {
          auto result = t.get();
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [result](NodeUtils::InvokeCallbackDelegate invokeCallback) {


            Local<Value> error;
            Local<Value> arg1;
            {
              TryCatch tryCatch;
              arg1 = NodeRT::Utils::NewString(result->Data());
              if (tryCatch.HasCaught())
              {
                error = Nan::To<Object>(tryCatch.Exception()).ToLocalChecked();
              }
              else
              {
                error = Undefined();
              }
              if (arg1.IsEmpty()) arg1 = Undefined();
            }
            Local<Value> args[] = {error, arg1};


            invokeCallback(_countof(args), args);
          });
        } catch (Platform::Exception^ exception) {
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [exception](NodeUtils::InvokeCallbackDelegate invokeCallback) {
            Local<Value> error = NodeRT::Utils::WinRtExceptionToJsError(exception);

            Local<Value> args[] = {error};
            invokeCallback(_countof(args), args);
          });
        }
      });
    }
    static void CapturePreviewToStreamAsync(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      if (info.Length() == 0 || !info[info.Length() -1]->IsFunction()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: No callback was given")));
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      ::Windows::Foundation::IAsyncAction^ op;


      if (info.Length() == 2
        && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Storage::Streams::IRandomAccessStream^>(info[0]))
      {
        try
        {
          ::Windows::Storage::Streams::IRandomAccessStream^ arg0 = dynamic_cast<::Windows::Storage::Streams::IRandomAccessStream^>(NodeRT::Utils::GetObjectInstance(info[0]));
          
          op = wrapper->_instance->CapturePreviewToStreamAsync(arg0);
        }
        catch (Platform::Exception ^exception)
        {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }

      auto opTask = create_task(op);
      uv_async_t* asyncToken = NodeUtils::Async::GetAsyncToken(info[info.Length() -1].As<Function>());

      opTask.then( [asyncToken] (task<void> t) {
        try {
          t.get();
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [](NodeUtils::InvokeCallbackDelegate invokeCallback) {


            Local<Value> args[] = {Undefined()};


            invokeCallback(_countof(args), args);
          });
        } catch (Platform::Exception^ exception) {
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [exception](NodeUtils::InvokeCallbackDelegate invokeCallback) {
            Local<Value> error = NodeRT::Utils::WinRtExceptionToJsError(exception);

            Local<Value> args[] = {error};
            invokeCallback(_countof(args), args);
          });
        }
      });
    }
    static void CaptureSelectedContentToDataPackageAsync(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      if (info.Length() == 0 || !info[info.Length() -1]->IsFunction()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: No callback was given")));
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      ::Windows::Foundation::IAsyncOperation<::Windows::ApplicationModel::DataTransfer::DataPackage^>^ op;


      if (info.Length() == 1)
      {
        try
        {
          op = wrapper->_instance->CaptureSelectedContentToDataPackageAsync();
        }
        catch (Platform::Exception ^exception)
        {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }

      auto opTask = create_task(op);
      uv_async_t* asyncToken = NodeUtils::Async::GetAsyncToken(info[info.Length() -1].As<Function>());

      opTask.then( [asyncToken] (task<::Windows::ApplicationModel::DataTransfer::DataPackage^> t) {
        try {
          auto result = t.get();
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [result](NodeUtils::InvokeCallbackDelegate invokeCallback) {


            Local<Value> error;
            Local<Value> arg1;
            {
              TryCatch tryCatch;
              arg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.DataTransfer", "DataPackage", result);
              if (tryCatch.HasCaught())
              {
                error = Nan::To<Object>(tryCatch.Exception()).ToLocalChecked();
              }
              else
              {
                error = Undefined();
              }
              if (arg1.IsEmpty()) arg1 = Undefined();
            }
            Local<Value> args[] = {error, arg1};


            invokeCallback(_countof(args), args);
          });
        } catch (Platform::Exception^ exception) {
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [exception](NodeUtils::InvokeCallbackDelegate invokeCallback) {
            Local<Value> error = NodeRT::Utils::WinRtExceptionToJsError(exception);

            Local<Value> args[] = {error};
            invokeCallback(_countof(args), args);
          });
        }
      });
    }

    static void AddInitializeScript(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      if (info.Length() == 1
        && info[0]->IsString())
      {
        try
        {
          Platform::String^ arg0 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[0])));
          
          wrapper->_instance->AddInitializeScript(arg0);
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }
    static void GoForward(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          wrapper->_instance->GoForward();
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }
    static void GoBack(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          wrapper->_instance->GoBack();
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }
    static void Refresh(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          wrapper->_instance->Refresh();
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }
    static void Stop(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      if (info.Length() == 0)
      {
        try
        {
          wrapper->_instance->Stop();
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }
    static void Navigate(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      if (info.Length() == 1
        && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Foundation::Uri^>(info[0]))
      {
        try
        {
          ::Windows::Foundation::Uri^ arg0 = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(info[0]));
          
          wrapper->_instance->Navigate(arg0);
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }
    static void NavigateToString(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      if (info.Length() == 1
        && info[0]->IsString())
      {
        try
        {
          Platform::String^ arg0 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[0])));
          
          wrapper->_instance->NavigateToString(arg0);
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }
    static void NavigateToLocalStreamUri(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      if (info.Length() == 2
        && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Foundation::Uri^>(info[0])
        && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::IUriToStreamResolver^>(info[1]))
      {
        try
        {
          ::Windows::Foundation::Uri^ arg0 = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(info[0]));
          ::Windows::Web::IUriToStreamResolver^ arg1 = dynamic_cast<::Windows::Web::IUriToStreamResolver^>(NodeRT::Utils::GetObjectInstance(info[1]));
          
          wrapper->_instance->NavigateToLocalStreamUri(arg0, arg1);
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }
    static void NavigateWithHttpRequestMessage(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      if (info.Length() == 1
        && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Http::HttpRequestMessage^>(info[0]))
      {
        try
        {
          ::Windows::Web::Http::HttpRequestMessage^ arg0 = dynamic_cast<::Windows::Web::Http::HttpRequestMessage^>(NodeRT::Utils::GetObjectInstance(info[0]));
          
          wrapper->_instance->NavigateWithHttpRequestMessage(arg0);
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }
    static void BuildLocalStreamUri(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      if (info.Length() == 2
        && info[0]->IsString()
        && info[1]->IsString())
      {
        try
        {
          Platform::String^ arg0 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[0])));
          Platform::String^ arg1 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[1])));
          
          ::Windows::Foundation::Uri^ result;
          result = wrapper->_instance->BuildLocalStreamUri(arg0, arg1);
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }
    static void GetDeferredPermissionRequestById(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      if (info.Length() == 1
        && info[0]->IsUint32())
      {
        try
        {
          unsigned int arg0 = static_cast<unsigned int>(Nan::To<uint32_t>(info[0]).FromMaybe(0));
          ::Windows::Web::UI::WebViewControlDeferredPermissionRequest^ arg1;
          
          wrapper->_instance->GetDeferredPermissionRequestById(arg0, &arg1);
          Local<Object> resObj = Nan::New<Object>();
          Nan::Set(resObj, Nan::New<String>("result").ToLocalChecked(), NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlDeferredPermissionRequest", arg1));
          info.GetReturnValue().Set(resObj);
          return;
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }
    }


    static void CreateAsync(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (info.Length() == 0 || !info[info.Length() -1]->IsFunction()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: No callback was given")));
        return;
      }

      ::Windows::Foundation::IAsyncOperation<::Windows::UI::WebUI::WebUIView^>^ op;


      if (info.Length() == 1)
      {
        try
        {
          op = ::Windows::UI::WebUI::WebUIView::CreateAsync();
        } catch (Platform::Exception ^exception) {
            NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
            return;
        }
      }
      else if (info.Length() == 2
          && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Foundation::Uri^>(info[0]))
      {
        try
        {
          ::Windows::Foundation::Uri^ arg0 = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(info[0]));
            
          op = ::Windows::UI::WebUI::WebUIView::CreateAsync(arg0);
        } catch (Platform::Exception ^exception) {
            NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
            return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Bad arguments: no suitable overload found")));
        return;
      }

      auto opTask = create_task(op);
      uv_async_t* asyncToken = NodeUtils::Async::GetAsyncToken(info[info.Length() -1].As<Function>());

      opTask.then( [asyncToken] (task<::Windows::UI::WebUI::WebUIView^> t)
      {
        try {
          auto result = t.get();
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [result](NodeUtils::InvokeCallbackDelegate invokeCallback) {


            Local<Value> error;
            Local<Value> arg1;
            {
              TryCatch tryCatch;
              arg1 = WrapWebUIView(result);
              if (tryCatch.HasCaught())
              {
                error = Nan::To<Object>(tryCatch.Exception()).ToLocalChecked();
              }
              else
              {
                error = Undefined();
              }
              if (arg1.IsEmpty()) arg1 = Undefined();
            }
            Local<Value> args[] = {error, arg1};


            invokeCallback(_countof(args), args);
          });
        }
        catch (Platform::Exception^ exception)
        {
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [exception](NodeUtils::InvokeCallbackDelegate invokeCallback) {

            Local<Value> error = NodeRT::Utils::WinRtExceptionToJsError(exception);

            Local<Value> args[] = {error};
            invokeCallback(_countof(args), args);
          });
        }
      });
    }


    static void IgnoreApplicationContentUriRulesNavigationRestrictionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      try  {
        bool result = wrapper->_instance->IgnoreApplicationContentUriRulesNavigationRestrictions;
        info.GetReturnValue().Set(Nan::New<Boolean>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void IgnoreApplicationContentUriRulesNavigationRestrictionsSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsBoolean()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      try {

        bool winRtValue = Nan::To<bool>(value).FromMaybe(false);

        wrapper->_instance->IgnoreApplicationContentUriRulesNavigationRestrictions = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void ApplicationViewIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      try  {
        int result = wrapper->_instance->ApplicationViewId;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SourceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->Source;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SourceSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Foundation::Uri^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Source = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void DefaultBackgroundColorGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      try  {
        ::Windows::UI::Color result = wrapper->_instance->DefaultBackgroundColor;
        info.GetReturnValue().Set(NodeRT::Utils::ColorToJs(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void DefaultBackgroundColorSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsColor(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      try {

        ::Windows::UI::Color winRtValue = NodeRT::Utils::ColorFromJs(value);

        wrapper->_instance->DefaultBackgroundColor = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void CanGoBackGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      try  {
        bool result = wrapper->_instance->CanGoBack;
        info.GetReturnValue().Set(Nan::New<Boolean>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CanGoForwardGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      try  {
        bool result = wrapper->_instance->CanGoForward;
        info.GetReturnValue().Set(Nan::New<Boolean>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContainsFullScreenElementGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      try  {
        bool result = wrapper->_instance->ContainsFullScreenElement;
        info.GetReturnValue().Set(Nan::New<Boolean>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void DeferredPermissionRequestsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVectorView<::Windows::Web::UI::WebViewControlDeferredPermissionRequest^>^ result = wrapper->_instance->DeferredPermissionRequests;
        info.GetReturnValue().Set(NodeRT::Collections::VectorViewWrapper<::Windows::Web::UI::WebViewControlDeferredPermissionRequest^>::CreateVectorViewWrapper(result, 
            [](::Windows::Web::UI::WebViewControlDeferredPermissionRequest^ val) -> Local<Value> {
              return NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlDeferredPermissionRequest", val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::UI::WebViewControlDeferredPermissionRequest^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::UI::WebViewControlDeferredPermissionRequest^ {
              return dynamic_cast<::Windows::Web::UI::WebViewControlDeferredPermissionRequest^>(NodeRT::Utils::GetObjectInstance(value));
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void DocumentTitleGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->DocumentTitle;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SettingsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(info.This())) {
        return;
      }

      WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());

      try  {
        ::Windows::Web::UI::WebViewControlSettings^ result = wrapper->_instance->Settings;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlSettings", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    static void AddListener(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (info.Length() < 2 || !info[0]->IsString() || !info[1]->IsFunction()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"wrong arguments, expected arguments are eventName(string),callback(function)")));
        return;
      }

      String::Value eventName(v8::Isolate::GetCurrent(), info[0]);
      auto str = *eventName;

      Local<Function> callback = info[1].As<Function>();

      ::Windows::Foundation::EventRegistrationToken registrationToken;
      if (NodeRT::Utils::CaseInsenstiveEquals(L"activated", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->Activated::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::UI::WebUI::WebUIView^, ::Windows::ApplicationModel::Activation::IActivatedEventArgs^>(
            [callbackObjPtr](::Windows::UI::WebUI::WebUIView^ arg0, ::Windows::ApplicationModel::Activation::IActivatedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = WrapWebUIView(arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "IActivatedEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"closed", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->Closed::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::UI::WebUI::WebUIView^, ::Platform::Object^>(
            [callbackObjPtr](::Windows::UI::WebUI::WebUIView^ arg0, ::Platform::Object^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = WrapWebUIView(arg0);
                  wrappedArg1 = CreateOpaqueWrapper(arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"containsFullScreenElementChanged", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->ContainsFullScreenElementChanged::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Platform::Object^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Platform::Object^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = CreateOpaqueWrapper(arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"contentLoading", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->ContentLoading::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlContentLoadingEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlContentLoadingEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlContentLoadingEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"dOMContentLoaded", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->DOMContentLoaded::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlDOMContentLoadedEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlDOMContentLoadedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlDOMContentLoadedEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"frameContentLoading", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->FrameContentLoading::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlContentLoadingEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlContentLoadingEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlContentLoadingEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"frameDOMContentLoaded", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->FrameDOMContentLoaded::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlDOMContentLoadedEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlDOMContentLoadedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlDOMContentLoadedEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"frameNavigationCompleted", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->FrameNavigationCompleted::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlNavigationCompletedEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlNavigationCompletedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlNavigationCompletedEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"frameNavigationStarting", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->FrameNavigationStarting::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlNavigationStartingEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlNavigationStartingEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlNavigationStartingEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"longRunningScriptDetected", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->LongRunningScriptDetected::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlLongRunningScriptDetectedEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlLongRunningScriptDetectedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlLongRunningScriptDetectedEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"navigationCompleted", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->NavigationCompleted::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlNavigationCompletedEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlNavigationCompletedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlNavigationCompletedEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"navigationStarting", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->NavigationStarting::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlNavigationStartingEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlNavigationStartingEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlNavigationStartingEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"newWindowRequested", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->NewWindowRequested::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlNewWindowRequestedEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlNewWindowRequestedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlNewWindowRequestedEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"permissionRequested", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->PermissionRequested::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlPermissionRequestedEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlPermissionRequestedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlPermissionRequestedEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"scriptNotify", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->ScriptNotify::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlScriptNotifyEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlScriptNotifyEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlScriptNotifyEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"unsafeContentWarningDisplaying", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->UnsafeContentWarningDisplaying::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Platform::Object^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Platform::Object^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = CreateOpaqueWrapper(arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"unsupportedUriSchemeIdentified", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->UnsupportedUriSchemeIdentified::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlUnsupportedUriSchemeIdentifiedEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlUnsupportedUriSchemeIdentifiedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlUnsupportedUriSchemeIdentifiedEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"unviewableContentIdentified", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->UnviewableContentIdentified::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlUnviewableContentIdentifiedEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlUnviewableContentIdentifiedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlUnviewableContentIdentifiedEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
      else if (NodeRT::Utils::CaseInsenstiveEquals(L"webResourceRequested", str))
      {
        if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
      return;
        }
        WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
      
        try {
          Persistent<Object>* perstPtr = new Persistent<Object>();
          perstPtr->Reset(NodeRT::Utils::CreateCallbackObjectInDomain(callback));
          std::shared_ptr<Persistent<Object>> callbackObjPtr(perstPtr,
            [] (Persistent<Object> *ptr ) {
              NodeUtils::Async::RunOnMain([ptr]() {
                ptr->Reset();
                delete ptr;
            });
          });

          registrationToken = wrapper->_instance->WebResourceRequested::add(
            ref new ::Windows::Foundation::TypedEventHandler<::Windows::Web::UI::IWebViewControl^, ::Windows::Web::UI::WebViewControlWebResourceRequestedEventArgs^>(
            [callbackObjPtr](::Windows::Web::UI::IWebViewControl^ arg0, ::Windows::Web::UI::WebViewControlWebResourceRequestedEventArgs^ arg1) {
              NodeUtils::Async::RunOnMain([callbackObjPtr , arg0, arg1]() {
                HandleScope scope;


                Local<Value> wrappedArg0;
                Local<Value> wrappedArg1;

                {
                  TryCatch tryCatch;


                  wrappedArg0 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "IWebViewControl", arg0);
                  wrappedArg1 = NodeRT::Utils::CreateExternalWinRTObject("Windows.Web.UI", "WebViewControlWebResourceRequestedEventArgs", arg1);


                  if (wrappedArg0.IsEmpty()) wrappedArg0 = Undefined();
                  if (wrappedArg1.IsEmpty()) wrappedArg1 = Undefined();
                }

                Local<Value> args[] = { wrappedArg0, wrappedArg1 };
                Local<Object> callbackObjLocalRef = Nan::New<Object>(*callbackObjPtr);
                NodeRT::Utils::CallCallbackInDomain(callbackObjLocalRef, _countof(args), args);
              });
            })
          );
        }
        catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }

      }
 else  {
        Nan::ThrowError(Nan::Error(String::Concat(v8::Isolate::GetCurrent(), NodeRT::Utils::NewString(L"given event name isn't supported: "), info[0].As<String>())));
        return;
      }

      Local<Value> tokenMapVal = NodeRT::Utils::GetHiddenValue(callback, Nan::New<String>(REGISTRATION_TOKEN_MAP_PROPERTY_NAME).ToLocalChecked());
      Local<Object> tokenMap;

      if (tokenMapVal.IsEmpty() || Nan::Equals(tokenMapVal, Undefined()).FromMaybe(false)) {
        tokenMap = Nan::New<Object>();
        NodeRT::Utils::SetHiddenValueWithObject(callback, Nan::New<String>(REGISTRATION_TOKEN_MAP_PROPERTY_NAME).ToLocalChecked(), tokenMap);
      } else {
        tokenMap = Nan::To<Object>(tokenMapVal).ToLocalChecked();
      }

      Nan::Set(tokenMap, info[0], CreateOpaqueWrapper(::Windows::Foundation::PropertyValue::CreateInt64(registrationToken.Value)));
    }

    static void RemoveListener(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (info.Length() < 2 || !info[0]->IsString() || !info[1]->IsFunction()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"wrong arguments, expected a string and a callback")));
        return;
      }

      String::Value eventName(v8::Isolate::GetCurrent(), info[0]);
      auto str = *eventName;

      if ((!NodeRT::Utils::CaseInsenstiveEquals(L"activated", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"closed", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"containsFullScreenElementChanged", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"contentLoading", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"dOMContentLoaded", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"frameContentLoading", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"frameDOMContentLoaded", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"frameNavigationCompleted", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"frameNavigationStarting", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"longRunningScriptDetected", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"navigationCompleted", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"navigationStarting", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"newWindowRequested", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"permissionRequested", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"scriptNotify", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"unsafeContentWarningDisplaying", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"unsupportedUriSchemeIdentified", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"unviewableContentIdentified", str)) &&(!NodeRT::Utils::CaseInsenstiveEquals(L"webResourceRequested", str))) {
        Nan::ThrowError(Nan::Error(String::Concat(v8::Isolate::GetCurrent(), NodeRT::Utils::NewString(L"given event name isn't supported: "), info[0].As<String>())));
        return;
      }

      Local<Function> callback = info[1].As<Function>();
      Local<Value> tokenMap = NodeRT::Utils::GetHiddenValue(callback, Nan::New<String>(REGISTRATION_TOKEN_MAP_PROPERTY_NAME).ToLocalChecked());

      if (tokenMap.IsEmpty() || Nan::Equals(tokenMap, Undefined()).FromMaybe(false)) {
        return;
      }

      Local<Value> opaqueWrapperObj =  Nan::Get(Nan::To<Object>(tokenMap).ToLocalChecked(), info[0]).ToLocalChecked();

      if (opaqueWrapperObj.IsEmpty() || Nan::Equals(opaqueWrapperObj,Undefined()).FromMaybe(false)) {
        return;
      }

      OpaqueWrapper *opaqueWrapper = OpaqueWrapper::Unwrap<OpaqueWrapper>(opaqueWrapperObj.As<Object>());

      long long tokenValue = (long long) opaqueWrapper->GetObjectInstance();
      ::Windows::Foundation::EventRegistrationToken registrationToken;
      registrationToken.Value = tokenValue;

      try  {
        if (NodeRT::Utils::CaseInsenstiveEquals(L"activated", str)) {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->Activated::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"closed", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->Closed::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"containsFullScreenElementChanged", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->ContainsFullScreenElementChanged::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"contentLoading", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->ContentLoading::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"dOMContentLoaded", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->DOMContentLoaded::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"frameContentLoading", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->FrameContentLoading::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"frameDOMContentLoaded", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->FrameDOMContentLoaded::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"frameNavigationCompleted", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->FrameNavigationCompleted::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"frameNavigationStarting", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->FrameNavigationStarting::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"longRunningScriptDetected", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->LongRunningScriptDetected::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"navigationCompleted", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->NavigationCompleted::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"navigationStarting", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->NavigationStarting::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"newWindowRequested", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->NewWindowRequested::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"permissionRequested", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->PermissionRequested::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"scriptNotify", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->ScriptNotify::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"unsafeContentWarningDisplaying", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->UnsafeContentWarningDisplaying::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"unsupportedUriSchemeIdentified", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->UnsupportedUriSchemeIdentified::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"unviewableContentIdentified", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->UnviewableContentIdentified::remove(registrationToken);
        }
        else if (NodeRT::Utils::CaseInsenstiveEquals(L"webResourceRequested", str))
        {
          if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIView^>(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")));
            return;
          }
          WebUIView *wrapper = WebUIView::Unwrap<WebUIView>(info.This());
          wrapper->_instance->WebResourceRequested::remove(registrationToken);
        }
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }

      Nan::Delete(Nan::To<Object>(tokenMap).ToLocalChecked(), Nan::To<String>(info[0]).ToLocalChecked());
    }
    private:
      ::Windows::UI::WebUI::WebUIView^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIView(::Windows::UI::WebUI::WebUIView^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIView^ UnwrapWebUIView(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIView::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIView(::Windows::UI::WebUI::WebUIView^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIView::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIView^ UnwrapWebUIView(Local<Value> value) {
     return WebUIView::Unwrap<WebUIView>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIView(Local<Object> exports) {
    WebUIView::Init(exports);
  }

  class WebUIVoiceCommandActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIVoiceCommandActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("result").ToLocalChecked(), ResultGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIVoiceCommandActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIVoiceCommandActivatedEventArgs(::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIVoiceCommandActivatedEventArgs *wrapperInstance = new WebUIVoiceCommandActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIVoiceCommandActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIVoiceCommandActivatedEventArgs *wrapper = WebUIVoiceCommandActivatedEventArgs::Unwrap<WebUIVoiceCommandActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIVoiceCommandActivatedEventArgs *wrapper = WebUIVoiceCommandActivatedEventArgs::Unwrap<WebUIVoiceCommandActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIVoiceCommandActivatedEventArgs *wrapper = WebUIVoiceCommandActivatedEventArgs::Unwrap<WebUIVoiceCommandActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIVoiceCommandActivatedEventArgs *wrapper = WebUIVoiceCommandActivatedEventArgs::Unwrap<WebUIVoiceCommandActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ResultGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIVoiceCommandActivatedEventArgs *wrapper = WebUIVoiceCommandActivatedEventArgs::Unwrap<WebUIVoiceCommandActivatedEventArgs>(info.This());

      try  {
        ::Windows::Media::SpeechRecognition::SpeechRecognitionResult^ result = wrapper->_instance->Result;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Media.SpeechRecognition", "SpeechRecognitionResult", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIVoiceCommandActivatedEventArgs *wrapper = WebUIVoiceCommandActivatedEventArgs::Unwrap<WebUIVoiceCommandActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIVoiceCommandActivatedEventArgs(::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^ UnwrapWebUIVoiceCommandActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIVoiceCommandActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIVoiceCommandActivatedEventArgs(::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIVoiceCommandActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs^ UnwrapWebUIVoiceCommandActivatedEventArgs(Local<Value> value) {
     return WebUIVoiceCommandActivatedEventArgs::Unwrap<WebUIVoiceCommandActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIVoiceCommandActivatedEventArgs(Local<Object> exports) {
    WebUIVoiceCommandActivatedEventArgs::Init(exports);
  }

  class WebUIWalletActionActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIWalletActionActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("actionId").ToLocalChecked(), ActionIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("actionKind").ToLocalChecked(), ActionKindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("itemId").ToLocalChecked(), ItemIdGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIWalletActionActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIWalletActionActivatedEventArgs(::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIWalletActionActivatedEventArgs *wrapperInstance = new WebUIWalletActionActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIWalletActionActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIWalletActionActivatedEventArgs *wrapper = WebUIWalletActionActivatedEventArgs::Unwrap<WebUIWalletActionActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIWalletActionActivatedEventArgs *wrapper = WebUIWalletActionActivatedEventArgs::Unwrap<WebUIWalletActionActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIWalletActionActivatedEventArgs *wrapper = WebUIWalletActionActivatedEventArgs::Unwrap<WebUIWalletActionActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActionIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIWalletActionActivatedEventArgs *wrapper = WebUIWalletActionActivatedEventArgs::Unwrap<WebUIWalletActionActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->ActionId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActionKindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIWalletActionActivatedEventArgs *wrapper = WebUIWalletActionActivatedEventArgs::Unwrap<WebUIWalletActionActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Wallet::WalletActionKind result = wrapper->_instance->ActionKind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ItemIdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIWalletActionActivatedEventArgs *wrapper = WebUIWalletActionActivatedEventArgs::Unwrap<WebUIWalletActionActivatedEventArgs>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->ItemId;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIWalletActionActivatedEventArgs *wrapper = WebUIWalletActionActivatedEventArgs::Unwrap<WebUIWalletActionActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIWalletActionActivatedEventArgs(::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^ UnwrapWebUIWalletActionActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIWalletActionActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIWalletActionActivatedEventArgs(::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIWalletActionActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs^ UnwrapWebUIWalletActionActivatedEventArgs(Local<Value> value) {
     return WebUIWalletActionActivatedEventArgs::Unwrap<WebUIWalletActionActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIWalletActionActivatedEventArgs(Local<Object> exports) {
    WebUIWalletActionActivatedEventArgs::Init(exports);
  }

  class WebUIWebAccountProviderActivatedEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIWebAccountProviderActivatedEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("user").ToLocalChecked(), UserGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("operation").ToLocalChecked(), OperationGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIWebAccountProviderActivatedEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIWebAccountProviderActivatedEventArgs(::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIWebAccountProviderActivatedEventArgs *wrapperInstance = new WebUIWebAccountProviderActivatedEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIWebAccountProviderActivatedEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIWebAccountProviderActivatedEventArgs *wrapper = WebUIWebAccountProviderActivatedEventArgs::Unwrap<WebUIWebAccountProviderActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIWebAccountProviderActivatedEventArgs *wrapper = WebUIWebAccountProviderActivatedEventArgs::Unwrap<WebUIWebAccountProviderActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIWebAccountProviderActivatedEventArgs *wrapper = WebUIWebAccountProviderActivatedEventArgs::Unwrap<WebUIWebAccountProviderActivatedEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void UserGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIWebAccountProviderActivatedEventArgs *wrapper = WebUIWebAccountProviderActivatedEventArgs::Unwrap<WebUIWebAccountProviderActivatedEventArgs>(info.This());

      try  {
        ::Windows::System::User^ result = wrapper->_instance->User;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.System", "User", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void OperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIWebAccountProviderActivatedEventArgs *wrapper = WebUIWebAccountProviderActivatedEventArgs::Unwrap<WebUIWebAccountProviderActivatedEventArgs>(info.This());

      try  {
        ::Windows::Security::Authentication::Web::Provider::IWebAccountProviderOperation^ result = wrapper->_instance->Operation;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Security.Authentication.Web.Provider", "IWebAccountProviderOperation", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^>(info.This())) {
        return;
      }

      WebUIWebAccountProviderActivatedEventArgs *wrapper = WebUIWebAccountProviderActivatedEventArgs::Unwrap<WebUIWebAccountProviderActivatedEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIWebAccountProviderActivatedEventArgs(::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^ UnwrapWebUIWebAccountProviderActivatedEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIWebAccountProviderActivatedEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIWebAccountProviderActivatedEventArgs(::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIWebAccountProviderActivatedEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs^ UnwrapWebUIWebAccountProviderActivatedEventArgs(Local<Value> value) {
     return WebUIWebAccountProviderActivatedEventArgs::Unwrap<WebUIWebAccountProviderActivatedEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIWebAccountProviderActivatedEventArgs(Local<Object> exports) {
    WebUIWebAccountProviderActivatedEventArgs::Init(exports);
  }

  class WebUIWebAuthenticationBrokerContinuationEventArgs : public WrapperBase {
    public:
      
      static void Init(const Local<Object> exports) {
        HandleScope scope;

        Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
        s_constructorTemplate.Reset(localRef);
        localRef->SetClassName(Nan::New<String>("WebUIWebAuthenticationBrokerContinuationEventArgs").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("kind").ToLocalChecked(), KindGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousExecutionState").ToLocalChecked(), PreviousExecutionStateGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("splashScreen").ToLocalChecked(), SplashScreenGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("continuationData").ToLocalChecked(), ContinuationDataGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("webAuthenticationResult").ToLocalChecked(), WebAuthenticationResultGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("activatedOperation").ToLocalChecked(), ActivatedOperationGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("WebUIWebAuthenticationBrokerContinuationEventArgs").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      WebUIWebAuthenticationBrokerContinuationEventArgs(::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^ instance) {
        _instance = instance;
      }

      
    static void New(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(s_constructorTemplate);

      // in case the constructor was called without the new operator
      if (!localRef->HasInstance(info.This())) {
        if (info.Length() > 0) {
          std::unique_ptr<Local<Value> []> constructorArgs(new Local<Value>[info.Length()]);

          Local<Value> *argsPtr = constructorArgs.get();
          for (int i = 0; i < info.Length(); i++) {
            argsPtr[i] = info[i];
          }

          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), constructorArgs.get());
          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        } else {
          MaybeLocal<Object> res = Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(), info.Length(), nullptr);

          if (res.IsEmpty()) {
            return;
          }

          info.GetReturnValue().Set(res.ToLocalChecked());
          return;
        }
      }

      ::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^>(info[0])) {
        try {
          winRtInstance = (::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
 else {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Invalid arguments, no suitable constructor found")));
        return;
      }

      NodeRT::Utils::SetHiddenValue(info.This(), Nan::New<String>("__winRtInstance__").ToLocalChecked(), True());

      WebUIWebAuthenticationBrokerContinuationEventArgs *wrapperInstance = new WebUIWebAuthenticationBrokerContinuationEventArgs(winRtInstance);
      wrapperInstance->Wrap(info.This());

      info.GetReturnValue().Set(info.This());
    }


      
    static void CastFrom(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;
      if (info.Length() < 1 || !NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^>(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")));
        return;
      }

      ::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^ winRtInstance;
      try {
        winRtInstance = (::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapWebUIWebAuthenticationBrokerContinuationEventArgs(winRtInstance));
    }





    static void KindGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIWebAuthenticationBrokerContinuationEventArgs *wrapper = WebUIWebAuthenticationBrokerContinuationEventArgs::Unwrap<WebUIWebAuthenticationBrokerContinuationEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ActivationKind result = wrapper->_instance->Kind;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousExecutionStateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIWebAuthenticationBrokerContinuationEventArgs *wrapper = WebUIWebAuthenticationBrokerContinuationEventArgs::Unwrap<WebUIWebAuthenticationBrokerContinuationEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::ApplicationExecutionState result = wrapper->_instance->PreviousExecutionState;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SplashScreenGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIWebAuthenticationBrokerContinuationEventArgs *wrapper = WebUIWebAuthenticationBrokerContinuationEventArgs::Unwrap<WebUIWebAuthenticationBrokerContinuationEventArgs>(info.This());

      try  {
        ::Windows::ApplicationModel::Activation::SplashScreen^ result = wrapper->_instance->SplashScreen;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.ApplicationModel.Activation", "SplashScreen", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContinuationDataGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIWebAuthenticationBrokerContinuationEventArgs *wrapper = WebUIWebAuthenticationBrokerContinuationEventArgs::Unwrap<WebUIWebAuthenticationBrokerContinuationEventArgs>(info.This());

      try  {
        ::Windows::Foundation::Collections::ValueSet^ result = wrapper->_instance->ContinuationData;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation.Collections", "ValueSet", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void WebAuthenticationResultGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIWebAuthenticationBrokerContinuationEventArgs *wrapper = WebUIWebAuthenticationBrokerContinuationEventArgs::Unwrap<WebUIWebAuthenticationBrokerContinuationEventArgs>(info.This());

      try  {
        ::Windows::Security::Authentication::Web::WebAuthenticationResult^ result = wrapper->_instance->WebAuthenticationResult;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Security.Authentication.Web", "WebAuthenticationResult", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ActivatedOperationGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^>(info.This())) {
        return;
      }

      WebUIWebAuthenticationBrokerContinuationEventArgs *wrapper = WebUIWebAuthenticationBrokerContinuationEventArgs::Unwrap<WebUIWebAuthenticationBrokerContinuationEventArgs>(info.This());

      try  {
        ::Windows::UI::WebUI::ActivatedOperation^ result = wrapper->_instance->ActivatedOperation;
        info.GetReturnValue().Set(WrapActivatedOperation(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapWebUIWebAuthenticationBrokerContinuationEventArgs(::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^ wintRtInstance);
      friend ::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^ UnwrapWebUIWebAuthenticationBrokerContinuationEventArgs(Local<Value> value);
  };

  Persistent<FunctionTemplate> WebUIWebAuthenticationBrokerContinuationEventArgs::s_constructorTemplate;

  v8::Local<v8::Value> WrapWebUIWebAuthenticationBrokerContinuationEventArgs(::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^ winRtInstance) {
    EscapableHandleScope scope;

    if (winRtInstance == nullptr) {
      return scope.Escape(Undefined());
    }

    Local<Value> opaqueWrapper = CreateOpaqueWrapper(winRtInstance);
    Local<Value> args[] = {opaqueWrapper};
    Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(WebUIWebAuthenticationBrokerContinuationEventArgs::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs^ UnwrapWebUIWebAuthenticationBrokerContinuationEventArgs(Local<Value> value) {
     return WebUIWebAuthenticationBrokerContinuationEventArgs::Unwrap<WebUIWebAuthenticationBrokerContinuationEventArgs>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitWebUIWebAuthenticationBrokerContinuationEventArgs(Local<Object> exports) {
    WebUIWebAuthenticationBrokerContinuationEventArgs::Init(exports);
  }


} } } } 

NAN_MODULE_INIT(init) {
  // We ignore failures for now since it probably means that
  // the initialization already happened for STA, and that's cool

  CoInitializeEx(nullptr, COINIT_MULTITHREADED);

  /*
  if (FAILED(CoInitializeEx(nullptr, COINIT_MULTITHREADED))) {
    Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"error in CoInitializeEx()")));
    return;
  }
  */

      NodeRT::Windows::UI::WebUI::InitPrintContentEnum(target);
      NodeRT::Windows::UI::WebUI::InitActivatedDeferral(target);
      NodeRT::Windows::UI::WebUI::InitActivatedOperation(target);
      NodeRT::Windows::UI::WebUI::InitBackgroundActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitEnteredBackgroundEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitHtmlPrintDocumentSource(target);
      NodeRT::Windows::UI::WebUI::InitIActivatedEventArgsDeferral(target);
      NodeRT::Windows::UI::WebUI::InitIWebUIBackgroundTaskInstance(target);
      NodeRT::Windows::UI::WebUI::InitIWebUINavigatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitLeavingBackgroundEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitNewWebUIViewCreatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitSuspendingDeferral(target);
      NodeRT::Windows::UI::WebUI::InitSuspendingEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitSuspendingOperation(target);
      NodeRT::Windows::UI::WebUI::InitWebUIApplication(target);
      NodeRT::Windows::UI::WebUI::InitWebUIAppointmentsProviderAddAppointmentActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIAppointmentsProviderShowTimeFrameActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIBackgroundTaskInstance(target);
      NodeRT::Windows::UI::WebUI::InitWebUIBackgroundTaskInstanceRuntimeClass(target);
      NodeRT::Windows::UI::WebUI::InitWebUIBarcodeScannerPreviewActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUICachedFileUpdaterActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUICameraSettingsActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUICommandLineActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIContactCallActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIContactMapActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIContactMessageActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIContactPanelActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIContactPickerActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIContactPostActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIContactVideoCallActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIDeviceActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIDevicePairingActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIDialReceiverActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIFileActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIFileOpenPickerActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIFileOpenPickerContinuationEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIFileSavePickerActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIFileSavePickerContinuationEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIFolderPickerContinuationEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUILaunchActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUILockScreenActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUILockScreenCallActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUILockScreenComponentActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUINavigatedDeferral(target);
      NodeRT::Windows::UI::WebUI::InitWebUINavigatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUINavigatedOperation(target);
      NodeRT::Windows::UI::WebUI::InitWebUIPhoneCallActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIPrint3DWorkflowActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIPrintTaskSettingsActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIPrintWorkflowForegroundTaskActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIProtocolActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIProtocolForResultsActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIRestrictedLaunchActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUISearchActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIShareTargetActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIStartupTaskActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIToastNotificationActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIUserDataAccountProviderActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIView(target);
      NodeRT::Windows::UI::WebUI::InitWebUIVoiceCommandActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIWalletActionActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIWebAccountProviderActivatedEventArgs(target);
      NodeRT::Windows::UI::WebUI::InitWebUIWebAuthenticationBrokerContinuationEventArgs(target);


  NodeRT::Utils::RegisterNameSpace("Windows.UI.WebUI", target);
}



NODE_MODULE(binding, init)
