// 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 Web { namespace Syndication { 
  v8::Local<v8::Value> WrapISyndicationClient(::Windows::Web::Syndication::ISyndicationClient^ wintRtInstance);
  ::Windows::Web::Syndication::ISyndicationClient^ UnwrapISyndicationClient(Local<Value> value);
  
  v8::Local<v8::Value> WrapISyndicationNode(::Windows::Web::Syndication::ISyndicationNode^ wintRtInstance);
  ::Windows::Web::Syndication::ISyndicationNode^ UnwrapISyndicationNode(Local<Value> value);
  
  v8::Local<v8::Value> WrapISyndicationText(::Windows::Web::Syndication::ISyndicationText^ wintRtInstance);
  ::Windows::Web::Syndication::ISyndicationText^ UnwrapISyndicationText(Local<Value> value);
  
  v8::Local<v8::Value> WrapSyndicationAttribute(::Windows::Web::Syndication::SyndicationAttribute^ wintRtInstance);
  ::Windows::Web::Syndication::SyndicationAttribute^ UnwrapSyndicationAttribute(Local<Value> value);
  
  v8::Local<v8::Value> WrapSyndicationCategory(::Windows::Web::Syndication::SyndicationCategory^ wintRtInstance);
  ::Windows::Web::Syndication::SyndicationCategory^ UnwrapSyndicationCategory(Local<Value> value);
  
  v8::Local<v8::Value> WrapSyndicationClient(::Windows::Web::Syndication::SyndicationClient^ wintRtInstance);
  ::Windows::Web::Syndication::SyndicationClient^ UnwrapSyndicationClient(Local<Value> value);
  
  v8::Local<v8::Value> WrapSyndicationContent(::Windows::Web::Syndication::SyndicationContent^ wintRtInstance);
  ::Windows::Web::Syndication::SyndicationContent^ UnwrapSyndicationContent(Local<Value> value);
  
  v8::Local<v8::Value> WrapSyndicationError(::Windows::Web::Syndication::SyndicationError^ wintRtInstance);
  ::Windows::Web::Syndication::SyndicationError^ UnwrapSyndicationError(Local<Value> value);
  
  v8::Local<v8::Value> WrapSyndicationFeed(::Windows::Web::Syndication::SyndicationFeed^ wintRtInstance);
  ::Windows::Web::Syndication::SyndicationFeed^ UnwrapSyndicationFeed(Local<Value> value);
  
  v8::Local<v8::Value> WrapSyndicationGenerator(::Windows::Web::Syndication::SyndicationGenerator^ wintRtInstance);
  ::Windows::Web::Syndication::SyndicationGenerator^ UnwrapSyndicationGenerator(Local<Value> value);
  
  v8::Local<v8::Value> WrapSyndicationItem(::Windows::Web::Syndication::SyndicationItem^ wintRtInstance);
  ::Windows::Web::Syndication::SyndicationItem^ UnwrapSyndicationItem(Local<Value> value);
  
  v8::Local<v8::Value> WrapSyndicationLink(::Windows::Web::Syndication::SyndicationLink^ wintRtInstance);
  ::Windows::Web::Syndication::SyndicationLink^ UnwrapSyndicationLink(Local<Value> value);
  
  v8::Local<v8::Value> WrapSyndicationNode(::Windows::Web::Syndication::SyndicationNode^ wintRtInstance);
  ::Windows::Web::Syndication::SyndicationNode^ UnwrapSyndicationNode(Local<Value> value);
  
  v8::Local<v8::Value> WrapSyndicationPerson(::Windows::Web::Syndication::SyndicationPerson^ wintRtInstance);
  ::Windows::Web::Syndication::SyndicationPerson^ UnwrapSyndicationPerson(Local<Value> value);
  
  v8::Local<v8::Value> WrapSyndicationText(::Windows::Web::Syndication::SyndicationText^ wintRtInstance);
  ::Windows::Web::Syndication::SyndicationText^ UnwrapSyndicationText(Local<Value> value);
  



  static void InitSyndicationErrorStatusEnum(const Local<Object> exports) {
    HandleScope scope;

    Local<Object> enumObject = Nan::New<Object>();

    Nan::Set(exports, Nan::New<String>("SyndicationErrorStatus").ToLocalChecked(), enumObject);
    Nan::Set(enumObject, Nan::New<String>("unknown").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationErrorStatus::Unknown)));
    Nan::Set(enumObject, Nan::New<String>("missingRequiredElement").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationErrorStatus::MissingRequiredElement)));
    Nan::Set(enumObject, Nan::New<String>("missingRequiredAttribute").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationErrorStatus::MissingRequiredAttribute)));
    Nan::Set(enumObject, Nan::New<String>("invalidXml").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationErrorStatus::InvalidXml)));
    Nan::Set(enumObject, Nan::New<String>("unexpectedContent").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationErrorStatus::UnexpectedContent)));
    Nan::Set(enumObject, Nan::New<String>("unsupportedFormat").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationErrorStatus::UnsupportedFormat)));
  }

  static void InitSyndicationFormatEnum(const Local<Object> exports) {
    HandleScope scope;

    Local<Object> enumObject = Nan::New<Object>();

    Nan::Set(exports, Nan::New<String>("SyndicationFormat").ToLocalChecked(), enumObject);
    Nan::Set(enumObject, Nan::New<String>("atom10").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationFormat::Atom10)));
    Nan::Set(enumObject, Nan::New<String>("rss20").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationFormat::Rss20)));
    Nan::Set(enumObject, Nan::New<String>("rss10").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationFormat::Rss10)));
    Nan::Set(enumObject, Nan::New<String>("rss092").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationFormat::Rss092)));
    Nan::Set(enumObject, Nan::New<String>("rss091").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationFormat::Rss091)));
    Nan::Set(enumObject, Nan::New<String>("atom03").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationFormat::Atom03)));
  }

  static void InitSyndicationTextTypeEnum(const Local<Object> exports) {
    HandleScope scope;

    Local<Object> enumObject = Nan::New<Object>();

    Nan::Set(exports, Nan::New<String>("SyndicationTextType").ToLocalChecked(), enumObject);
    Nan::Set(enumObject, Nan::New<String>("text").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationTextType::Text)));
    Nan::Set(enumObject, Nan::New<String>("html").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationTextType::Html)));
    Nan::Set(enumObject, Nan::New<String>("xhtml").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(::Windows::Web::Syndication::SyndicationTextType::Xhtml)));
  }

  static bool IsRetrievalProgressJsObject(Local<Value> value) {
    if (!value->IsObject()) {
      return false;
    }

    Local<String> symbol;
    Local<Object> obj = Nan::To<Object>(value).ToLocalChecked();

    symbol = Nan::New<String>("bytesRetrieved").ToLocalChecked();
    if (Nan::Has(obj, symbol).FromMaybe(false)) {
      if (!Nan::Get(obj,symbol).ToLocalChecked()->IsUint32()) {
        return false;
      }
    }
    
    symbol = Nan::New<String>("totalBytesToRetrieve").ToLocalChecked();
    if (Nan::Has(obj, symbol).FromMaybe(false)) {
      if (!Nan::Get(obj,symbol).ToLocalChecked()->IsUint32()) {
        return false;
      }
    }
    
    return true;
  }

  ::Windows::Web::Syndication::RetrievalProgress RetrievalProgressFromJsObject(Local<Value> value) {
    HandleScope scope;
    ::Windows::Web::Syndication::RetrievalProgress 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;

    symbol = Nan::New<String>("bytesRetrieved").ToLocalChecked();
    if (Nan::Has(obj, symbol).FromMaybe(false)) {
      returnValue.BytesRetrieved = static_cast<unsigned int>(Nan::To<uint32_t>(Nan::Get(obj,symbol).ToLocalChecked()).FromMaybe(0));
    }
    
    symbol = Nan::New<String>("totalBytesToRetrieve").ToLocalChecked();
    if (Nan::Has(obj, symbol).FromMaybe(false)) {
      returnValue.TotalBytesToRetrieve = static_cast<unsigned int>(Nan::To<uint32_t>(Nan::Get(obj,symbol).ToLocalChecked()).FromMaybe(0));
    }
    
    return returnValue;
  }

  Local<Value> RetrievalProgressToJsObject(::Windows::Web::Syndication::RetrievalProgress value) {
    EscapableHandleScope scope;

    Local<Object> obj = Nan::New<Object>();

    Nan::Set(obj, Nan::New<String>("bytesRetrieved").ToLocalChecked(), Nan::New<Integer>(value.BytesRetrieved));
    Nan::Set(obj, Nan::New<String>("totalBytesToRetrieve").ToLocalChecked(), Nan::New<Integer>(value.TotalBytesToRetrieve));

    return scope.Escape(obj);
  }
  static bool IsTransferProgressJsObject(Local<Value> value) {
    if (!value->IsObject()) {
      return false;
    }

    Local<String> symbol;
    Local<Object> obj = Nan::To<Object>(value).ToLocalChecked();

    symbol = Nan::New<String>("bytesSent").ToLocalChecked();
    if (Nan::Has(obj, symbol).FromMaybe(false)) {
      if (!Nan::Get(obj,symbol).ToLocalChecked()->IsUint32()) {
        return false;
      }
    }
    
    symbol = Nan::New<String>("totalBytesToSend").ToLocalChecked();
    if (Nan::Has(obj, symbol).FromMaybe(false)) {
      if (!Nan::Get(obj,symbol).ToLocalChecked()->IsUint32()) {
        return false;
      }
    }
    
    symbol = Nan::New<String>("bytesRetrieved").ToLocalChecked();
    if (Nan::Has(obj, symbol).FromMaybe(false)) {
      if (!Nan::Get(obj,symbol).ToLocalChecked()->IsUint32()) {
        return false;
      }
    }
    
    symbol = Nan::New<String>("totalBytesToRetrieve").ToLocalChecked();
    if (Nan::Has(obj, symbol).FromMaybe(false)) {
      if (!Nan::Get(obj,symbol).ToLocalChecked()->IsUint32()) {
        return false;
      }
    }
    
    return true;
  }

  ::Windows::Web::Syndication::TransferProgress TransferProgressFromJsObject(Local<Value> value) {
    HandleScope scope;
    ::Windows::Web::Syndication::TransferProgress 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;

    symbol = Nan::New<String>("bytesSent").ToLocalChecked();
    if (Nan::Has(obj, symbol).FromMaybe(false)) {
      returnValue.BytesSent = static_cast<unsigned int>(Nan::To<uint32_t>(Nan::Get(obj,symbol).ToLocalChecked()).FromMaybe(0));
    }
    
    symbol = Nan::New<String>("totalBytesToSend").ToLocalChecked();
    if (Nan::Has(obj, symbol).FromMaybe(false)) {
      returnValue.TotalBytesToSend = static_cast<unsigned int>(Nan::To<uint32_t>(Nan::Get(obj,symbol).ToLocalChecked()).FromMaybe(0));
    }
    
    symbol = Nan::New<String>("bytesRetrieved").ToLocalChecked();
    if (Nan::Has(obj, symbol).FromMaybe(false)) {
      returnValue.BytesRetrieved = static_cast<unsigned int>(Nan::To<uint32_t>(Nan::Get(obj,symbol).ToLocalChecked()).FromMaybe(0));
    }
    
    symbol = Nan::New<String>("totalBytesToRetrieve").ToLocalChecked();
    if (Nan::Has(obj, symbol).FromMaybe(false)) {
      returnValue.TotalBytesToRetrieve = static_cast<unsigned int>(Nan::To<uint32_t>(Nan::Get(obj,symbol).ToLocalChecked()).FromMaybe(0));
    }
    
    return returnValue;
  }

  Local<Value> TransferProgressToJsObject(::Windows::Web::Syndication::TransferProgress value) {
    EscapableHandleScope scope;

    Local<Object> obj = Nan::New<Object>();

    Nan::Set(obj, Nan::New<String>("bytesSent").ToLocalChecked(), Nan::New<Integer>(value.BytesSent));
    Nan::Set(obj, Nan::New<String>("totalBytesToSend").ToLocalChecked(), Nan::New<Integer>(value.TotalBytesToSend));
    Nan::Set(obj, Nan::New<String>("bytesRetrieved").ToLocalChecked(), Nan::New<Integer>(value.BytesRetrieved));
    Nan::Set(obj, Nan::New<String>("totalBytesToRetrieve").ToLocalChecked(), Nan::New<Integer>(value.TotalBytesToRetrieve));

    return scope.Escape(obj);
  }


  class ISyndicationClient : 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>("ISyndicationClient").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);

        Local<Function> func;
        Local<FunctionTemplate> funcTemplate;

          
            Nan::SetPrototypeMethod(localRef, "setRequestHeader", SetRequestHeader);
          

          
            Nan::SetPrototypeMethod(localRef, "retrieveFeedAsync", RetrieveFeedAsync);
          


          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("bypassCacheOnRetrieve").ToLocalChecked(), BypassCacheOnRetrieveGetter, BypassCacheOnRetrieveSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("maxResponseBufferSize").ToLocalChecked(), MaxResponseBufferSizeGetter, MaxResponseBufferSizeSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("proxyCredential").ToLocalChecked(), ProxyCredentialGetter, ProxyCredentialSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("serverCredential").ToLocalChecked(), ServerCredentialGetter, ServerCredentialSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("timeout").ToLocalChecked(), TimeoutGetter, TimeoutSetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("ISyndicationClient").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      ISyndicationClient(::Windows::Web::Syndication::ISyndicationClient^ 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::Web::Syndication::ISyndicationClient^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationClient^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::ISyndicationClient^) 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());

      ISyndicationClient *wrapperInstance = new ISyndicationClient(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::Web::Syndication::ISyndicationClient^>(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::Web::Syndication::ISyndicationClient^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::ISyndicationClient^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapISyndicationClient(winRtInstance));
    }

    static void RetrieveFeedAsync(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationClient^>(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;
      }

      ISyndicationClient *wrapper = ISyndicationClient::Unwrap<ISyndicationClient>(info.This());

      ::Windows::Foundation::IAsyncOperationWithProgress<::Windows::Web::Syndication::SyndicationFeed^, ::Windows::Web::Syndication::RetrievalProgress>^ op;


      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 = wrapper->_instance->RetrieveFeedAsync(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::Web::Syndication::SyndicationFeed^> t) {
        try {
          auto result = t.get();
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [result](NodeUtils::InvokeCallbackDelegate invokeCallback) {


            Local<Value> error;
            Local<Value> arg1;
            {
              TryCatch tryCatch;
              arg1 = WrapSyndicationFeed(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 SetRequestHeader(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationClient^>(info.This())) {
        return;
      }

      ISyndicationClient *wrapper = ISyndicationClient::Unwrap<ISyndicationClient>(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])));
          
          wrapper->_instance->SetRequestHeader(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 BypassCacheOnRetrieveGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationClient^>(info.This())) {
        return;
      }

      ISyndicationClient *wrapper = ISyndicationClient::Unwrap<ISyndicationClient>(info.This());

      try  {
        bool result = wrapper->_instance->BypassCacheOnRetrieve;
        info.GetReturnValue().Set(Nan::New<Boolean>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BypassCacheOnRetrieveSetter(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::Web::Syndication::ISyndicationClient^>(info.This())) {
        return;
      }

      ISyndicationClient *wrapper = ISyndicationClient::Unwrap<ISyndicationClient>(info.This());

      try {

        bool winRtValue = Nan::To<bool>(value).FromMaybe(false);

        wrapper->_instance->BypassCacheOnRetrieve = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void MaxResponseBufferSizeGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationClient^>(info.This())) {
        return;
      }

      ISyndicationClient *wrapper = ISyndicationClient::Unwrap<ISyndicationClient>(info.This());

      try  {
        unsigned int result = wrapper->_instance->MaxResponseBufferSize;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void MaxResponseBufferSizeSetter(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::Web::Syndication::ISyndicationClient^>(info.This())) {
        return;
      }

      ISyndicationClient *wrapper = ISyndicationClient::Unwrap<ISyndicationClient>(info.This());

      try {

        unsigned int winRtValue = static_cast<unsigned int>(Nan::To<uint32_t>(value).FromMaybe(0));

        wrapper->_instance->MaxResponseBufferSize = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void ProxyCredentialGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationClient^>(info.This())) {
        return;
      }

      ISyndicationClient *wrapper = ISyndicationClient::Unwrap<ISyndicationClient>(info.This());

      try  {
        ::Windows::Security::Credentials::PasswordCredential^ result = wrapper->_instance->ProxyCredential;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Security.Credentials", "PasswordCredential", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ProxyCredentialSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Security::Credentials::PasswordCredential^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationClient^>(info.This())) {
        return;
      }

      ISyndicationClient *wrapper = ISyndicationClient::Unwrap<ISyndicationClient>(info.This());

      try {

        ::Windows::Security::Credentials::PasswordCredential^ winRtValue = dynamic_cast<::Windows::Security::Credentials::PasswordCredential^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->ProxyCredential = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void ServerCredentialGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationClient^>(info.This())) {
        return;
      }

      ISyndicationClient *wrapper = ISyndicationClient::Unwrap<ISyndicationClient>(info.This());

      try  {
        ::Windows::Security::Credentials::PasswordCredential^ result = wrapper->_instance->ServerCredential;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Security.Credentials", "PasswordCredential", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ServerCredentialSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Security::Credentials::PasswordCredential^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationClient^>(info.This())) {
        return;
      }

      ISyndicationClient *wrapper = ISyndicationClient::Unwrap<ISyndicationClient>(info.This());

      try {

        ::Windows::Security::Credentials::PasswordCredential^ winRtValue = dynamic_cast<::Windows::Security::Credentials::PasswordCredential^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->ServerCredential = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void TimeoutGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationClient^>(info.This())) {
        return;
      }

      ISyndicationClient *wrapper = ISyndicationClient::Unwrap<ISyndicationClient>(info.This());

      try  {
        unsigned int result = wrapper->_instance->Timeout;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TimeoutSetter(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::Web::Syndication::ISyndicationClient^>(info.This())) {
        return;
      }

      ISyndicationClient *wrapper = ISyndicationClient::Unwrap<ISyndicationClient>(info.This());

      try {

        unsigned int winRtValue = static_cast<unsigned int>(Nan::To<uint32_t>(value).FromMaybe(0));

        wrapper->_instance->Timeout = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      


    private:
      ::Windows::Web::Syndication::ISyndicationClient^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapISyndicationClient(::Windows::Web::Syndication::ISyndicationClient^ wintRtInstance);
      friend ::Windows::Web::Syndication::ISyndicationClient^ UnwrapISyndicationClient(Local<Value> value);
  };

  Persistent<FunctionTemplate> ISyndicationClient::s_constructorTemplate;

  v8::Local<v8::Value> WrapISyndicationClient(::Windows::Web::Syndication::ISyndicationClient^ 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>(ISyndicationClient::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::ISyndicationClient^ UnwrapISyndicationClient(Local<Value> value) {
     return ISyndicationClient::Unwrap<ISyndicationClient>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitISyndicationClient(Local<Object> exports) {
    ISyndicationClient::Init(exports);
  }

  class ISyndicationNode : 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>("ISyndicationNode").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getXmlDocument", GetXmlDocument);
          



          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("attributeExtensions").ToLocalChecked(), AttributeExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("baseUri").ToLocalChecked(), BaseUriGetter, BaseUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("elementExtensions").ToLocalChecked(), ElementExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("language").ToLocalChecked(), LanguageGetter, LanguageSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeName").ToLocalChecked(), NodeNameGetter, NodeNameSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeNamespace").ToLocalChecked(), NodeNamespaceGetter, NodeNamespaceSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeValue").ToLocalChecked(), NodeValueGetter, NodeValueSetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("ISyndicationNode").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      ISyndicationNode(::Windows::Web::Syndication::ISyndicationNode^ 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::Web::Syndication::ISyndicationNode^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::ISyndicationNode^) 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());

      ISyndicationNode *wrapperInstance = new ISyndicationNode(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::Web::Syndication::ISyndicationNode^>(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::Web::Syndication::ISyndicationNode^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::ISyndicationNode^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapISyndicationNode(winRtInstance));
    }


    static void GetXmlDocument(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(info.This())) {
        return;
      }

      ISyndicationNode *wrapper = ISyndicationNode::Unwrap<ISyndicationNode>(info.This());

      if (info.Length() == 1
        && info[0]->IsInt32())
      {
        try
        {
          ::Windows::Web::Syndication::SyndicationFormat arg0 = static_cast<::Windows::Web::Syndication::SyndicationFormat>(Nan::To<int32_t>(info[0]).FromMaybe(0));
          
          ::Windows::Data::Xml::Dom::XmlDocument^ result;
          result = wrapper->_instance->GetXmlDocument(arg0);
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Data.Xml.Dom", "XmlDocument", 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 AttributeExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(info.This())) {
        return;
      }

      ISyndicationNode *wrapper = ISyndicationNode::Unwrap<ISyndicationNode>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationAttribute^>^ result = wrapper->_instance->AttributeExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationAttribute^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationAttribute^ val) -> Local<Value> {
              return WrapSyndicationAttribute(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationAttribute^ {
              return UnwrapSyndicationAttribute(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BaseUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(info.This())) {
        return;
      }

      ISyndicationNode *wrapper = ISyndicationNode::Unwrap<ISyndicationNode>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->BaseUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BaseUriSetter(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::Web::Syndication::ISyndicationNode^>(info.This())) {
        return;
      }

      ISyndicationNode *wrapper = ISyndicationNode::Unwrap<ISyndicationNode>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->BaseUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void ElementExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(info.This())) {
        return;
      }

      ISyndicationNode *wrapper = ISyndicationNode::Unwrap<ISyndicationNode>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::ISyndicationNode^>^ result = wrapper->_instance->ElementExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::ISyndicationNode^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::ISyndicationNode^ val) -> Local<Value> {
              return WrapISyndicationNode(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::ISyndicationNode^ {
              return UnwrapISyndicationNode(value);
            }
          ));
        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::Web::Syndication::ISyndicationNode^>(info.This())) {
        return;
      }

      ISyndicationNode *wrapper = ISyndicationNode::Unwrap<ISyndicationNode>(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 LanguageSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(info.This())) {
        return;
      }

      ISyndicationNode *wrapper = ISyndicationNode::Unwrap<ISyndicationNode>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Language = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(info.This())) {
        return;
      }

      ISyndicationNode *wrapper = ISyndicationNode::Unwrap<ISyndicationNode>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNameSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(info.This())) {
        return;
      }

      ISyndicationNode *wrapper = ISyndicationNode::Unwrap<ISyndicationNode>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeName = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNamespaceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(info.This())) {
        return;
      }

      ISyndicationNode *wrapper = ISyndicationNode::Unwrap<ISyndicationNode>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeNamespace;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNamespaceSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(info.This())) {
        return;
      }

      ISyndicationNode *wrapper = ISyndicationNode::Unwrap<ISyndicationNode>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeNamespace = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeValueGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(info.This())) {
        return;
      }

      ISyndicationNode *wrapper = ISyndicationNode::Unwrap<ISyndicationNode>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeValue;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeValueSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(info.This())) {
        return;
      }

      ISyndicationNode *wrapper = ISyndicationNode::Unwrap<ISyndicationNode>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeValue = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      


    private:
      ::Windows::Web::Syndication::ISyndicationNode^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapISyndicationNode(::Windows::Web::Syndication::ISyndicationNode^ wintRtInstance);
      friend ::Windows::Web::Syndication::ISyndicationNode^ UnwrapISyndicationNode(Local<Value> value);
  };

  Persistent<FunctionTemplate> ISyndicationNode::s_constructorTemplate;

  v8::Local<v8::Value> WrapISyndicationNode(::Windows::Web::Syndication::ISyndicationNode^ 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>(ISyndicationNode::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::ISyndicationNode^ UnwrapISyndicationNode(Local<Value> value) {
     return ISyndicationNode::Unwrap<ISyndicationNode>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitISyndicationNode(Local<Object> exports) {
    ISyndicationNode::Init(exports);
  }

  class ISyndicationText : 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>("ISyndicationText").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("text").ToLocalChecked(), TextGetter, TextSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("type").ToLocalChecked(), TypeGetter, TypeSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("xml").ToLocalChecked(), XmlGetter, XmlSetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("ISyndicationText").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      ISyndicationText(::Windows::Web::Syndication::ISyndicationText^ 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::Web::Syndication::ISyndicationText^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationText^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::ISyndicationText^) 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());

      ISyndicationText *wrapperInstance = new ISyndicationText(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::Web::Syndication::ISyndicationText^>(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::Web::Syndication::ISyndicationText^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::ISyndicationText^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapISyndicationText(winRtInstance));
    }





    static void TextGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationText^>(info.This())) {
        return;
      }

      ISyndicationText *wrapper = ISyndicationText::Unwrap<ISyndicationText>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Text;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TextSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationText^>(info.This())) {
        return;
      }

      ISyndicationText *wrapper = ISyndicationText::Unwrap<ISyndicationText>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Text = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void TypeGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationText^>(info.This())) {
        return;
      }

      ISyndicationText *wrapper = ISyndicationText::Unwrap<ISyndicationText>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Type;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TypeSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationText^>(info.This())) {
        return;
      }

      ISyndicationText *wrapper = ISyndicationText::Unwrap<ISyndicationText>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Type = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void XmlGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationText^>(info.This())) {
        return;
      }

      ISyndicationText *wrapper = ISyndicationText::Unwrap<ISyndicationText>(info.This());

      try  {
        ::Windows::Data::Xml::Dom::XmlDocument^ result = wrapper->_instance->Xml;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Data.Xml.Dom", "XmlDocument", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void XmlSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Data::Xml::Dom::XmlDocument^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationText^>(info.This())) {
        return;
      }

      ISyndicationText *wrapper = ISyndicationText::Unwrap<ISyndicationText>(info.This());

      try {

        ::Windows::Data::Xml::Dom::XmlDocument^ winRtValue = dynamic_cast<::Windows::Data::Xml::Dom::XmlDocument^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Xml = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      


    private:
      ::Windows::Web::Syndication::ISyndicationText^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapISyndicationText(::Windows::Web::Syndication::ISyndicationText^ wintRtInstance);
      friend ::Windows::Web::Syndication::ISyndicationText^ UnwrapISyndicationText(Local<Value> value);
  };

  Persistent<FunctionTemplate> ISyndicationText::s_constructorTemplate;

  v8::Local<v8::Value> WrapISyndicationText(::Windows::Web::Syndication::ISyndicationText^ 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>(ISyndicationText::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::ISyndicationText^ UnwrapISyndicationText(Local<Value> value) {
     return ISyndicationText::Unwrap<ISyndicationText>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitISyndicationText(Local<Object> exports) {
    ISyndicationText::Init(exports);
  }

  class SyndicationAttribute : 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>("SyndicationAttribute").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);





          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("value").ToLocalChecked(), ValueGetter, ValueSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("namespace").ToLocalChecked(), NamespaceGetter, NamespaceSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("name").ToLocalChecked(), NameGetter, NameSetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SyndicationAttribute").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SyndicationAttribute(::Windows::Web::Syndication::SyndicationAttribute^ 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::Web::Syndication::SyndicationAttribute^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::SyndicationAttribute^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 3
        && info[0]->IsString()
        && info[1]->IsString()
        && info[2]->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])));
          Platform::String^ arg2 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[2])));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationAttribute(arg0,arg1,arg2);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 0)
      {
        try {
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationAttribute();
        } 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());

      SyndicationAttribute *wrapperInstance = new SyndicationAttribute(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::Web::Syndication::SyndicationAttribute^>(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::Web::Syndication::SyndicationAttribute^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::SyndicationAttribute^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSyndicationAttribute(winRtInstance));
    }





    static void ValueGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(info.This())) {
        return;
      }

      SyndicationAttribute *wrapper = SyndicationAttribute::Unwrap<SyndicationAttribute>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Value;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ValueSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(info.This())) {
        return;
      }

      SyndicationAttribute *wrapper = SyndicationAttribute::Unwrap<SyndicationAttribute>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Value = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NamespaceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(info.This())) {
        return;
      }

      SyndicationAttribute *wrapper = SyndicationAttribute::Unwrap<SyndicationAttribute>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Namespace;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NamespaceSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(info.This())) {
        return;
      }

      SyndicationAttribute *wrapper = SyndicationAttribute::Unwrap<SyndicationAttribute>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Namespace = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(info.This())) {
        return;
      }

      SyndicationAttribute *wrapper = SyndicationAttribute::Unwrap<SyndicationAttribute>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Name;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NameSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(info.This())) {
        return;
      }

      SyndicationAttribute *wrapper = SyndicationAttribute::Unwrap<SyndicationAttribute>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Name = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      


    private:
      ::Windows::Web::Syndication::SyndicationAttribute^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSyndicationAttribute(::Windows::Web::Syndication::SyndicationAttribute^ wintRtInstance);
      friend ::Windows::Web::Syndication::SyndicationAttribute^ UnwrapSyndicationAttribute(Local<Value> value);
  };

  Persistent<FunctionTemplate> SyndicationAttribute::s_constructorTemplate;

  v8::Local<v8::Value> WrapSyndicationAttribute(::Windows::Web::Syndication::SyndicationAttribute^ 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>(SyndicationAttribute::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::SyndicationAttribute^ UnwrapSyndicationAttribute(Local<Value> value) {
     return SyndicationAttribute::Unwrap<SyndicationAttribute>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSyndicationAttribute(Local<Object> exports) {
    SyndicationAttribute::Init(exports);
  }

  class SyndicationCategory : 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>("SyndicationCategory").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getXmlDocument", GetXmlDocument);
          



          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("term").ToLocalChecked(), TermGetter, TermSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("scheme").ToLocalChecked(), SchemeGetter, SchemeSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("label").ToLocalChecked(), LabelGetter, LabelSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeValue").ToLocalChecked(), NodeValueGetter, NodeValueSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeNamespace").ToLocalChecked(), NodeNamespaceGetter, NodeNamespaceSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeName").ToLocalChecked(), NodeNameGetter, NodeNameSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("language").ToLocalChecked(), LanguageGetter, LanguageSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("baseUri").ToLocalChecked(), BaseUriGetter, BaseUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("attributeExtensions").ToLocalChecked(), AttributeExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("elementExtensions").ToLocalChecked(), ElementExtensionsGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SyndicationCategory").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SyndicationCategory(::Windows::Web::Syndication::SyndicationCategory^ 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::Web::Syndication::SyndicationCategory^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::SyndicationCategory^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else 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])));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationCategory(arg0);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 3
        && info[0]->IsString()
        && info[1]->IsString()
        && info[2]->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])));
          Platform::String^ arg2 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[2])));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationCategory(arg0,arg1,arg2);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 0)
      {
        try {
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationCategory();
        } 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());

      SyndicationCategory *wrapperInstance = new SyndicationCategory(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::Web::Syndication::SyndicationCategory^>(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::Web::Syndication::SyndicationCategory^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::SyndicationCategory^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSyndicationCategory(winRtInstance));
    }


    static void GetXmlDocument(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      if (info.Length() == 1
        && info[0]->IsInt32())
      {
        try
        {
          ::Windows::Web::Syndication::SyndicationFormat arg0 = static_cast<::Windows::Web::Syndication::SyndicationFormat>(Nan::To<int32_t>(info[0]).FromMaybe(0));
          
          ::Windows::Data::Xml::Dom::XmlDocument^ result;
          result = wrapper->_instance->GetXmlDocument(arg0);
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Data.Xml.Dom", "XmlDocument", 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 TermGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Term;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TermSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Term = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void SchemeGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Scheme;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SchemeSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Scheme = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LabelGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Label;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void LabelSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Label = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeValueGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeValue;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeValueSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeValue = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNamespaceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeNamespace;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNamespaceSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeNamespace = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNameSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeName = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LanguageGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(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 LanguageSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Language = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void BaseUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->BaseUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BaseUriSetter(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::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->BaseUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void AttributeExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationAttribute^>^ result = wrapper->_instance->AttributeExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationAttribute^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationAttribute^ val) -> Local<Value> {
              return WrapSyndicationAttribute(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationAttribute^ {
              return UnwrapSyndicationAttribute(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ElementExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(info.This())) {
        return;
      }

      SyndicationCategory *wrapper = SyndicationCategory::Unwrap<SyndicationCategory>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::ISyndicationNode^>^ result = wrapper->_instance->ElementExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::ISyndicationNode^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::ISyndicationNode^ val) -> Local<Value> {
              return WrapISyndicationNode(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::ISyndicationNode^ {
              return UnwrapISyndicationNode(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::Web::Syndication::SyndicationCategory^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSyndicationCategory(::Windows::Web::Syndication::SyndicationCategory^ wintRtInstance);
      friend ::Windows::Web::Syndication::SyndicationCategory^ UnwrapSyndicationCategory(Local<Value> value);
  };

  Persistent<FunctionTemplate> SyndicationCategory::s_constructorTemplate;

  v8::Local<v8::Value> WrapSyndicationCategory(::Windows::Web::Syndication::SyndicationCategory^ 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>(SyndicationCategory::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::SyndicationCategory^ UnwrapSyndicationCategory(Local<Value> value) {
     return SyndicationCategory::Unwrap<SyndicationCategory>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSyndicationCategory(Local<Object> exports) {
    SyndicationCategory::Init(exports);
  }

  class SyndicationClient : 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>("SyndicationClient").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);

        Local<Function> func;
        Local<FunctionTemplate> funcTemplate;

          
            Nan::SetPrototypeMethod(localRef, "setRequestHeader", SetRequestHeader);
          

          
            Nan::SetPrototypeMethod(localRef, "retrieveFeedAsync", RetrieveFeedAsync);
          


          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("timeout").ToLocalChecked(), TimeoutGetter, TimeoutSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("serverCredential").ToLocalChecked(), ServerCredentialGetter, ServerCredentialSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("proxyCredential").ToLocalChecked(), ProxyCredentialGetter, ProxyCredentialSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("maxResponseBufferSize").ToLocalChecked(), MaxResponseBufferSizeGetter, MaxResponseBufferSizeSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("bypassCacheOnRetrieve").ToLocalChecked(), BypassCacheOnRetrieveGetter, BypassCacheOnRetrieveSetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SyndicationClient").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SyndicationClient(::Windows::Web::Syndication::SyndicationClient^ 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::Web::Syndication::SyndicationClient^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationClient^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::SyndicationClient^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 1
        && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Security::Credentials::PasswordCredential^>(info[0]))
      {
        try {
          ::Windows::Security::Credentials::PasswordCredential^ arg0 = dynamic_cast<::Windows::Security::Credentials::PasswordCredential^>(NodeRT::Utils::GetObjectInstance(info[0]));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationClient(arg0);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 0)
      {
        try {
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationClient();
        } 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());

      SyndicationClient *wrapperInstance = new SyndicationClient(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::Web::Syndication::SyndicationClient^>(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::Web::Syndication::SyndicationClient^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::SyndicationClient^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSyndicationClient(winRtInstance));
    }

    static void RetrieveFeedAsync(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationClient^>(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;
      }

      SyndicationClient *wrapper = SyndicationClient::Unwrap<SyndicationClient>(info.This());

      ::Windows::Foundation::IAsyncOperationWithProgress<::Windows::Web::Syndication::SyndicationFeed^, ::Windows::Web::Syndication::RetrievalProgress>^ op;


      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 = wrapper->_instance->RetrieveFeedAsync(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::Web::Syndication::SyndicationFeed^> t) {
        try {
          auto result = t.get();
          NodeUtils::Async::RunCallbackOnMain(asyncToken, [result](NodeUtils::InvokeCallbackDelegate invokeCallback) {


            Local<Value> error;
            Local<Value> arg1;
            {
              TryCatch tryCatch;
              arg1 = WrapSyndicationFeed(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 SetRequestHeader(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationClient^>(info.This())) {
        return;
      }

      SyndicationClient *wrapper = SyndicationClient::Unwrap<SyndicationClient>(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])));
          
          wrapper->_instance->SetRequestHeader(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 TimeoutGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationClient^>(info.This())) {
        return;
      }

      SyndicationClient *wrapper = SyndicationClient::Unwrap<SyndicationClient>(info.This());

      try  {
        unsigned int result = wrapper->_instance->Timeout;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TimeoutSetter(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::Web::Syndication::SyndicationClient^>(info.This())) {
        return;
      }

      SyndicationClient *wrapper = SyndicationClient::Unwrap<SyndicationClient>(info.This());

      try {

        unsigned int winRtValue = static_cast<unsigned int>(Nan::To<uint32_t>(value).FromMaybe(0));

        wrapper->_instance->Timeout = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void ServerCredentialGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationClient^>(info.This())) {
        return;
      }

      SyndicationClient *wrapper = SyndicationClient::Unwrap<SyndicationClient>(info.This());

      try  {
        ::Windows::Security::Credentials::PasswordCredential^ result = wrapper->_instance->ServerCredential;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Security.Credentials", "PasswordCredential", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ServerCredentialSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Security::Credentials::PasswordCredential^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationClient^>(info.This())) {
        return;
      }

      SyndicationClient *wrapper = SyndicationClient::Unwrap<SyndicationClient>(info.This());

      try {

        ::Windows::Security::Credentials::PasswordCredential^ winRtValue = dynamic_cast<::Windows::Security::Credentials::PasswordCredential^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->ServerCredential = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void ProxyCredentialGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationClient^>(info.This())) {
        return;
      }

      SyndicationClient *wrapper = SyndicationClient::Unwrap<SyndicationClient>(info.This());

      try  {
        ::Windows::Security::Credentials::PasswordCredential^ result = wrapper->_instance->ProxyCredential;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Security.Credentials", "PasswordCredential", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ProxyCredentialSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Security::Credentials::PasswordCredential^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationClient^>(info.This())) {
        return;
      }

      SyndicationClient *wrapper = SyndicationClient::Unwrap<SyndicationClient>(info.This());

      try {

        ::Windows::Security::Credentials::PasswordCredential^ winRtValue = dynamic_cast<::Windows::Security::Credentials::PasswordCredential^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->ProxyCredential = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void MaxResponseBufferSizeGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationClient^>(info.This())) {
        return;
      }

      SyndicationClient *wrapper = SyndicationClient::Unwrap<SyndicationClient>(info.This());

      try  {
        unsigned int result = wrapper->_instance->MaxResponseBufferSize;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void MaxResponseBufferSizeSetter(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::Web::Syndication::SyndicationClient^>(info.This())) {
        return;
      }

      SyndicationClient *wrapper = SyndicationClient::Unwrap<SyndicationClient>(info.This());

      try {

        unsigned int winRtValue = static_cast<unsigned int>(Nan::To<uint32_t>(value).FromMaybe(0));

        wrapper->_instance->MaxResponseBufferSize = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void BypassCacheOnRetrieveGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationClient^>(info.This())) {
        return;
      }

      SyndicationClient *wrapper = SyndicationClient::Unwrap<SyndicationClient>(info.This());

      try  {
        bool result = wrapper->_instance->BypassCacheOnRetrieve;
        info.GetReturnValue().Set(Nan::New<Boolean>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BypassCacheOnRetrieveSetter(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::Web::Syndication::SyndicationClient^>(info.This())) {
        return;
      }

      SyndicationClient *wrapper = SyndicationClient::Unwrap<SyndicationClient>(info.This());

      try {

        bool winRtValue = Nan::To<bool>(value).FromMaybe(false);

        wrapper->_instance->BypassCacheOnRetrieve = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      


    private:
      ::Windows::Web::Syndication::SyndicationClient^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSyndicationClient(::Windows::Web::Syndication::SyndicationClient^ wintRtInstance);
      friend ::Windows::Web::Syndication::SyndicationClient^ UnwrapSyndicationClient(Local<Value> value);
  };

  Persistent<FunctionTemplate> SyndicationClient::s_constructorTemplate;

  v8::Local<v8::Value> WrapSyndicationClient(::Windows::Web::Syndication::SyndicationClient^ 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>(SyndicationClient::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::SyndicationClient^ UnwrapSyndicationClient(Local<Value> value) {
     return SyndicationClient::Unwrap<SyndicationClient>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSyndicationClient(Local<Object> exports) {
    SyndicationClient::Init(exports);
  }

  class SyndicationContent : 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>("SyndicationContent").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getXmlDocument", GetXmlDocument);
          



          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("sourceUri").ToLocalChecked(), SourceUriGetter, SourceUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeValue").ToLocalChecked(), NodeValueGetter, NodeValueSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("baseUri").ToLocalChecked(), BaseUriGetter, BaseUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("language").ToLocalChecked(), LanguageGetter, LanguageSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeName").ToLocalChecked(), NodeNameGetter, NodeNameSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeNamespace").ToLocalChecked(), NodeNamespaceGetter, NodeNamespaceSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("attributeExtensions").ToLocalChecked(), AttributeExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("elementExtensions").ToLocalChecked(), ElementExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("text").ToLocalChecked(), TextGetter, TextSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("type").ToLocalChecked(), TypeGetter, TypeSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("xml").ToLocalChecked(), XmlGetter, XmlSetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SyndicationContent").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SyndicationContent(::Windows::Web::Syndication::SyndicationContent^ 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::Web::Syndication::SyndicationContent^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::SyndicationContent^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 2
        && info[0]->IsString()
        && info[1]->IsInt32())
      {
        try {
          Platform::String^ arg0 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[0])));
          ::Windows::Web::Syndication::SyndicationTextType arg1 = static_cast<::Windows::Web::Syndication::SyndicationTextType>(Nan::To<int32_t>(info[1]).FromMaybe(0));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationContent(arg0,arg1);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else 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]));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationContent(arg0);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 0)
      {
        try {
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationContent();
        } 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());

      SyndicationContent *wrapperInstance = new SyndicationContent(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::Web::Syndication::SyndicationContent^>(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::Web::Syndication::SyndicationContent^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::SyndicationContent^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSyndicationContent(winRtInstance));
    }


    static void GetXmlDocument(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      if (info.Length() == 1
        && info[0]->IsInt32())
      {
        try
        {
          ::Windows::Web::Syndication::SyndicationFormat arg0 = static_cast<::Windows::Web::Syndication::SyndicationFormat>(Nan::To<int32_t>(info[0]).FromMaybe(0));
          
          ::Windows::Data::Xml::Dom::XmlDocument^ result;
          result = wrapper->_instance->GetXmlDocument(arg0);
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Data.Xml.Dom", "XmlDocument", 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 SourceUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->SourceUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SourceUriSetter(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::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->SourceUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeValueGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeValue;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeValueSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeValue = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void BaseUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->BaseUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BaseUriSetter(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::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->BaseUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LanguageGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(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 LanguageSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Language = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNameSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeName = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNamespaceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeNamespace;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNamespaceSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeNamespace = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void AttributeExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationAttribute^>^ result = wrapper->_instance->AttributeExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationAttribute^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationAttribute^ val) -> Local<Value> {
              return WrapSyndicationAttribute(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationAttribute^ {
              return UnwrapSyndicationAttribute(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ElementExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::ISyndicationNode^>^ result = wrapper->_instance->ElementExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::ISyndicationNode^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::ISyndicationNode^ val) -> Local<Value> {
              return WrapISyndicationNode(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::ISyndicationNode^ {
              return UnwrapISyndicationNode(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TextGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Text;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TextSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Text = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void TypeGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Type;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TypeSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Type = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void XmlGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try  {
        ::Windows::Data::Xml::Dom::XmlDocument^ result = wrapper->_instance->Xml;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Data.Xml.Dom", "XmlDocument", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void XmlSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Data::Xml::Dom::XmlDocument^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info.This())) {
        return;
      }

      SyndicationContent *wrapper = SyndicationContent::Unwrap<SyndicationContent>(info.This());

      try {

        ::Windows::Data::Xml::Dom::XmlDocument^ winRtValue = dynamic_cast<::Windows::Data::Xml::Dom::XmlDocument^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Xml = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      


    private:
      ::Windows::Web::Syndication::SyndicationContent^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSyndicationContent(::Windows::Web::Syndication::SyndicationContent^ wintRtInstance);
      friend ::Windows::Web::Syndication::SyndicationContent^ UnwrapSyndicationContent(Local<Value> value);
  };

  Persistent<FunctionTemplate> SyndicationContent::s_constructorTemplate;

  v8::Local<v8::Value> WrapSyndicationContent(::Windows::Web::Syndication::SyndicationContent^ 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>(SyndicationContent::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::SyndicationContent^ UnwrapSyndicationContent(Local<Value> value) {
     return SyndicationContent::Unwrap<SyndicationContent>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSyndicationContent(Local<Object> exports) {
    SyndicationContent::Init(exports);
  }

  class SyndicationError : 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>("SyndicationError").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);






        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);

        Nan::SetMethod(constructor, "getStatus", GetStatus);


        Nan::Set(exports, Nan::New<String>("SyndicationError").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SyndicationError(::Windows::Web::Syndication::SyndicationError^ 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::Web::Syndication::SyndicationError^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationError^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::SyndicationError^) 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());

      SyndicationError *wrapperInstance = new SyndicationError(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::Web::Syndication::SyndicationError^>(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::Web::Syndication::SyndicationError^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::SyndicationError^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSyndicationError(winRtInstance));
    }





    static void GetStatus(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (info.Length() == 1
        && info[0]->IsInt32())
      {
        try
        {
          int arg0 = static_cast<int>(Nan::To<int32_t>(info[0]).FromMaybe(0));
          
          ::Windows::Web::Syndication::SyndicationErrorStatus result;
          result = ::Windows::Web::Syndication::SyndicationError::GetStatus(arg0);
          info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(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::Web::Syndication::SyndicationError^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSyndicationError(::Windows::Web::Syndication::SyndicationError^ wintRtInstance);
      friend ::Windows::Web::Syndication::SyndicationError^ UnwrapSyndicationError(Local<Value> value);
  };

  Persistent<FunctionTemplate> SyndicationError::s_constructorTemplate;

  v8::Local<v8::Value> WrapSyndicationError(::Windows::Web::Syndication::SyndicationError^ 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>(SyndicationError::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::SyndicationError^ UnwrapSyndicationError(Local<Value> value) {
     return SyndicationError::Unwrap<SyndicationError>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSyndicationError(Local<Object> exports) {
    SyndicationError::Init(exports);
  }

  class SyndicationFeed : 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>("SyndicationFeed").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "load", Load);
            Nan::SetPrototypeMethod(localRef, "loadFromXml", LoadFromXml);
            Nan::SetPrototypeMethod(localRef, "getXmlDocument", GetXmlDocument);
          



          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("title").ToLocalChecked(), TitleGetter, TitleSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("subtitle").ToLocalChecked(), SubtitleGetter, SubtitleSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("rights").ToLocalChecked(), RightsGetter, RightsSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("generator").ToLocalChecked(), GeneratorGetter, GeneratorSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("lastUpdatedTime").ToLocalChecked(), LastUpdatedTimeGetter, LastUpdatedTimeSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("imageUri").ToLocalChecked(), ImageUriGetter, ImageUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("iconUri").ToLocalChecked(), IconUriGetter, IconUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("id").ToLocalChecked(), IdGetter, IdSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("firstUri").ToLocalChecked(), FirstUriGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("items").ToLocalChecked(), ItemsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("lastUri").ToLocalChecked(), LastUriGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("links").ToLocalChecked(), LinksGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nextUri").ToLocalChecked(), NextUriGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("previousUri").ToLocalChecked(), PreviousUriGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("categories").ToLocalChecked(), CategoriesGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("sourceFormat").ToLocalChecked(), SourceFormatGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("contributors").ToLocalChecked(), ContributorsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("authors").ToLocalChecked(), AuthorsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeValue").ToLocalChecked(), NodeValueGetter, NodeValueSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeNamespace").ToLocalChecked(), NodeNamespaceGetter, NodeNamespaceSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeName").ToLocalChecked(), NodeNameGetter, NodeNameSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("language").ToLocalChecked(), LanguageGetter, LanguageSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("baseUri").ToLocalChecked(), BaseUriGetter, BaseUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("attributeExtensions").ToLocalChecked(), AttributeExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("elementExtensions").ToLocalChecked(), ElementExtensionsGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SyndicationFeed").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SyndicationFeed(::Windows::Web::Syndication::SyndicationFeed^ 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::Web::Syndication::SyndicationFeed^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::SyndicationFeed^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 3
        && info[0]->IsString()
        && info[1]->IsString()
        && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Foundation::Uri^>(info[2]))
      {
        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^ arg2 = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(info[2]));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationFeed(arg0,arg1,arg2);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 0)
      {
        try {
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationFeed();
        } 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());

      SyndicationFeed *wrapperInstance = new SyndicationFeed(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::Web::Syndication::SyndicationFeed^>(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::Web::Syndication::SyndicationFeed^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::SyndicationFeed^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSyndicationFeed(winRtInstance));
    }


    static void Load(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(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->Load(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 LoadFromXml(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      if (info.Length() == 1
        && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Data::Xml::Dom::XmlDocument^>(info[0]))
      {
        try
        {
          ::Windows::Data::Xml::Dom::XmlDocument^ arg0 = dynamic_cast<::Windows::Data::Xml::Dom::XmlDocument^>(NodeRT::Utils::GetObjectInstance(info[0]));
          
          wrapper->_instance->LoadFromXml(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 GetXmlDocument(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      if (info.Length() == 1
        && info[0]->IsInt32())
      {
        try
        {
          ::Windows::Web::Syndication::SyndicationFormat arg0 = static_cast<::Windows::Web::Syndication::SyndicationFormat>(Nan::To<int32_t>(info[0]).FromMaybe(0));
          
          ::Windows::Data::Xml::Dom::XmlDocument^ result;
          result = wrapper->_instance->GetXmlDocument(arg0);
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Data.Xml.Dom", "XmlDocument", 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 TitleGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Web::Syndication::ISyndicationText^ result = wrapper->_instance->Title;
        info.GetReturnValue().Set(WrapISyndicationText(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TitleSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationText^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try {

        ::Windows::Web::Syndication::ISyndicationText^ winRtValue = dynamic_cast<::Windows::Web::Syndication::ISyndicationText^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Title = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void SubtitleGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Web::Syndication::ISyndicationText^ result = wrapper->_instance->Subtitle;
        info.GetReturnValue().Set(WrapISyndicationText(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SubtitleSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationText^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try {

        ::Windows::Web::Syndication::ISyndicationText^ winRtValue = dynamic_cast<::Windows::Web::Syndication::ISyndicationText^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Subtitle = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void RightsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Web::Syndication::ISyndicationText^ result = wrapper->_instance->Rights;
        info.GetReturnValue().Set(WrapISyndicationText(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void RightsSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationText^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try {

        ::Windows::Web::Syndication::ISyndicationText^ winRtValue = dynamic_cast<::Windows::Web::Syndication::ISyndicationText^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Rights = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void GeneratorGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Web::Syndication::SyndicationGenerator^ result = wrapper->_instance->Generator;
        info.GetReturnValue().Set(WrapSyndicationGenerator(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void GeneratorSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try {

        ::Windows::Web::Syndication::SyndicationGenerator^ winRtValue = dynamic_cast<::Windows::Web::Syndication::SyndicationGenerator^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Generator = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LastUpdatedTimeGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::DateTime result = wrapper->_instance->LastUpdatedTime;
        info.GetReturnValue().Set(NodeRT::Utils::DateTimeToJS(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void LastUpdatedTimeSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsDate()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try {

        ::Windows::Foundation::DateTime winRtValue = NodeRT::Utils::DateTimeFromJSDate(value);

        wrapper->_instance->LastUpdatedTime = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void ImageUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->ImageUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ImageUriSetter(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::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->ImageUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void IconUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->IconUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void IconUriSetter(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::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->IconUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void IdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Id;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void IdSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Id = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void FirstUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->FirstUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ItemsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationItem^>^ result = wrapper->_instance->Items;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationItem^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationItem^ val) -> Local<Value> {
              return WrapSyndicationItem(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationItem^ {
              return UnwrapSyndicationItem(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void LastUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->LastUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void LinksGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationLink^>^ result = wrapper->_instance->Links;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationLink^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationLink^ val) -> Local<Value> {
              return WrapSyndicationLink(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationLink^ {
              return UnwrapSyndicationLink(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NextUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->NextUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PreviousUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->PreviousUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CategoriesGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationCategory^>^ result = wrapper->_instance->Categories;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationCategory^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationCategory^ val) -> Local<Value> {
              return WrapSyndicationCategory(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationCategory^ {
              return UnwrapSyndicationCategory(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SourceFormatGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Web::Syndication::SyndicationFormat result = wrapper->_instance->SourceFormat;
        info.GetReturnValue().Set(Nan::New<Integer>(static_cast<int>(result)));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContributorsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationPerson^>^ result = wrapper->_instance->Contributors;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationPerson^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationPerson^ val) -> Local<Value> {
              return WrapSyndicationPerson(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationPerson^ {
              return UnwrapSyndicationPerson(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void AuthorsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationPerson^>^ result = wrapper->_instance->Authors;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationPerson^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationPerson^ val) -> Local<Value> {
              return WrapSyndicationPerson(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationPerson^ {
              return UnwrapSyndicationPerson(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeValueGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeValue;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeValueSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeValue = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNamespaceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeNamespace;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNamespaceSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeNamespace = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNameSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeName = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LanguageGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(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 LanguageSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Language = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void BaseUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->BaseUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BaseUriSetter(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::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->BaseUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void AttributeExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationAttribute^>^ result = wrapper->_instance->AttributeExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationAttribute^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationAttribute^ val) -> Local<Value> {
              return WrapSyndicationAttribute(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationAttribute^ {
              return UnwrapSyndicationAttribute(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ElementExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationFeed^>(info.This())) {
        return;
      }

      SyndicationFeed *wrapper = SyndicationFeed::Unwrap<SyndicationFeed>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::ISyndicationNode^>^ result = wrapper->_instance->ElementExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::ISyndicationNode^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::ISyndicationNode^ val) -> Local<Value> {
              return WrapISyndicationNode(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::ISyndicationNode^ {
              return UnwrapISyndicationNode(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::Web::Syndication::SyndicationFeed^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSyndicationFeed(::Windows::Web::Syndication::SyndicationFeed^ wintRtInstance);
      friend ::Windows::Web::Syndication::SyndicationFeed^ UnwrapSyndicationFeed(Local<Value> value);
  };

  Persistent<FunctionTemplate> SyndicationFeed::s_constructorTemplate;

  v8::Local<v8::Value> WrapSyndicationFeed(::Windows::Web::Syndication::SyndicationFeed^ 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>(SyndicationFeed::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::SyndicationFeed^ UnwrapSyndicationFeed(Local<Value> value) {
     return SyndicationFeed::Unwrap<SyndicationFeed>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSyndicationFeed(Local<Object> exports) {
    SyndicationFeed::Init(exports);
  }

  class SyndicationGenerator : 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>("SyndicationGenerator").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getXmlDocument", GetXmlDocument);
          



          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("version").ToLocalChecked(), VersionGetter, VersionSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("uri").ToLocalChecked(), UriGetter, UriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("text").ToLocalChecked(), TextGetter, TextSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeValue").ToLocalChecked(), NodeValueGetter, NodeValueSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeNamespace").ToLocalChecked(), NodeNamespaceGetter, NodeNamespaceSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeName").ToLocalChecked(), NodeNameGetter, NodeNameSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("language").ToLocalChecked(), LanguageGetter, LanguageSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("baseUri").ToLocalChecked(), BaseUriGetter, BaseUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("attributeExtensions").ToLocalChecked(), AttributeExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("elementExtensions").ToLocalChecked(), ElementExtensionsGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SyndicationGenerator").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SyndicationGenerator(::Windows::Web::Syndication::SyndicationGenerator^ 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::Web::Syndication::SyndicationGenerator^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::SyndicationGenerator^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else 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])));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationGenerator(arg0);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 0)
      {
        try {
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationGenerator();
        } 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());

      SyndicationGenerator *wrapperInstance = new SyndicationGenerator(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::Web::Syndication::SyndicationGenerator^>(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::Web::Syndication::SyndicationGenerator^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::SyndicationGenerator^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSyndicationGenerator(winRtInstance));
    }


    static void GetXmlDocument(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      if (info.Length() == 1
        && info[0]->IsInt32())
      {
        try
        {
          ::Windows::Web::Syndication::SyndicationFormat arg0 = static_cast<::Windows::Web::Syndication::SyndicationFormat>(Nan::To<int32_t>(info[0]).FromMaybe(0));
          
          ::Windows::Data::Xml::Dom::XmlDocument^ result;
          result = wrapper->_instance->GetXmlDocument(arg0);
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Data.Xml.Dom", "XmlDocument", 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 VersionGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Version;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void VersionSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Version = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void UriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(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 UriSetter(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::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Uri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void TextGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Text;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TextSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Text = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeValueGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeValue;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeValueSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeValue = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNamespaceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeNamespace;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNamespaceSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeNamespace = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNameSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeName = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LanguageGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(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 LanguageSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Language = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void BaseUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->BaseUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BaseUriSetter(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::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->BaseUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void AttributeExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationAttribute^>^ result = wrapper->_instance->AttributeExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationAttribute^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationAttribute^ val) -> Local<Value> {
              return WrapSyndicationAttribute(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationAttribute^ {
              return UnwrapSyndicationAttribute(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ElementExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationGenerator^>(info.This())) {
        return;
      }

      SyndicationGenerator *wrapper = SyndicationGenerator::Unwrap<SyndicationGenerator>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::ISyndicationNode^>^ result = wrapper->_instance->ElementExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::ISyndicationNode^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::ISyndicationNode^ val) -> Local<Value> {
              return WrapISyndicationNode(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::ISyndicationNode^ {
              return UnwrapISyndicationNode(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::Web::Syndication::SyndicationGenerator^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSyndicationGenerator(::Windows::Web::Syndication::SyndicationGenerator^ wintRtInstance);
      friend ::Windows::Web::Syndication::SyndicationGenerator^ UnwrapSyndicationGenerator(Local<Value> value);
  };

  Persistent<FunctionTemplate> SyndicationGenerator::s_constructorTemplate;

  v8::Local<v8::Value> WrapSyndicationGenerator(::Windows::Web::Syndication::SyndicationGenerator^ 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>(SyndicationGenerator::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::SyndicationGenerator^ UnwrapSyndicationGenerator(Local<Value> value) {
     return SyndicationGenerator::Unwrap<SyndicationGenerator>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSyndicationGenerator(Local<Object> exports) {
    SyndicationGenerator::Init(exports);
  }

  class SyndicationItem : 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>("SyndicationItem").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "load", Load);
            Nan::SetPrototypeMethod(localRef, "loadFromXml", LoadFromXml);
            Nan::SetPrototypeMethod(localRef, "getXmlDocument", GetXmlDocument);
          



          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("title").ToLocalChecked(), TitleGetter, TitleSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("source").ToLocalChecked(), SourceGetter, SourceSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("rights").ToLocalChecked(), RightsGetter, RightsSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("summary").ToLocalChecked(), SummaryGetter, SummarySetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("publishedDate").ToLocalChecked(), PublishedDateGetter, PublishedDateSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("commentsUri").ToLocalChecked(), CommentsUriGetter, CommentsUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("id").ToLocalChecked(), IdGetter, IdSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("lastUpdatedTime").ToLocalChecked(), LastUpdatedTimeGetter, LastUpdatedTimeSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("content").ToLocalChecked(), ContentGetter, ContentSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("editUri").ToLocalChecked(), EditUriGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("links").ToLocalChecked(), LinksGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("authors").ToLocalChecked(), AuthorsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("categories").ToLocalChecked(), CategoriesGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("contributors").ToLocalChecked(), ContributorsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("itemUri").ToLocalChecked(), ItemUriGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("eTag").ToLocalChecked(), ETagGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("editMediaUri").ToLocalChecked(), EditMediaUriGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeValue").ToLocalChecked(), NodeValueGetter, NodeValueSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeNamespace").ToLocalChecked(), NodeNamespaceGetter, NodeNamespaceSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeName").ToLocalChecked(), NodeNameGetter, NodeNameSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("language").ToLocalChecked(), LanguageGetter, LanguageSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("baseUri").ToLocalChecked(), BaseUriGetter, BaseUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("attributeExtensions").ToLocalChecked(), AttributeExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("elementExtensions").ToLocalChecked(), ElementExtensionsGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SyndicationItem").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SyndicationItem(::Windows::Web::Syndication::SyndicationItem^ 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::Web::Syndication::SyndicationItem^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::SyndicationItem^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 3
        && info[0]->IsString()
        && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(info[1])
        && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Foundation::Uri^>(info[2]))
      {
        try {
          Platform::String^ arg0 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[0])));
          ::Windows::Web::Syndication::SyndicationContent^ arg1 = UnwrapSyndicationContent(info[1]);
          ::Windows::Foundation::Uri^ arg2 = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(info[2]));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationItem(arg0,arg1,arg2);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 0)
      {
        try {
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationItem();
        } 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());

      SyndicationItem *wrapperInstance = new SyndicationItem(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::Web::Syndication::SyndicationItem^>(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::Web::Syndication::SyndicationItem^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::SyndicationItem^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSyndicationItem(winRtInstance));
    }


    static void Load(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(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->Load(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 LoadFromXml(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      if (info.Length() == 1
        && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Data::Xml::Dom::XmlDocument^>(info[0]))
      {
        try
        {
          ::Windows::Data::Xml::Dom::XmlDocument^ arg0 = dynamic_cast<::Windows::Data::Xml::Dom::XmlDocument^>(NodeRT::Utils::GetObjectInstance(info[0]));
          
          wrapper->_instance->LoadFromXml(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 GetXmlDocument(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      if (info.Length() == 1
        && info[0]->IsInt32())
      {
        try
        {
          ::Windows::Web::Syndication::SyndicationFormat arg0 = static_cast<::Windows::Web::Syndication::SyndicationFormat>(Nan::To<int32_t>(info[0]).FromMaybe(0));
          
          ::Windows::Data::Xml::Dom::XmlDocument^ result;
          result = wrapper->_instance->GetXmlDocument(arg0);
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Data.Xml.Dom", "XmlDocument", 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 TitleGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Web::Syndication::ISyndicationText^ result = wrapper->_instance->Title;
        info.GetReturnValue().Set(WrapISyndicationText(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TitleSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationText^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        ::Windows::Web::Syndication::ISyndicationText^ winRtValue = dynamic_cast<::Windows::Web::Syndication::ISyndicationText^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Title = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void SourceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Web::Syndication::SyndicationFeed^ result = wrapper->_instance->Source;
        info.GetReturnValue().Set(WrapSyndicationFeed(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::Web::Syndication::SyndicationFeed^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        ::Windows::Web::Syndication::SyndicationFeed^ winRtValue = dynamic_cast<::Windows::Web::Syndication::SyndicationFeed^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Source = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void RightsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Web::Syndication::ISyndicationText^ result = wrapper->_instance->Rights;
        info.GetReturnValue().Set(WrapISyndicationText(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void RightsSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationText^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        ::Windows::Web::Syndication::ISyndicationText^ winRtValue = dynamic_cast<::Windows::Web::Syndication::ISyndicationText^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Rights = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void SummaryGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Web::Syndication::ISyndicationText^ result = wrapper->_instance->Summary;
        info.GetReturnValue().Set(WrapISyndicationText(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void SummarySetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationText^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        ::Windows::Web::Syndication::ISyndicationText^ winRtValue = dynamic_cast<::Windows::Web::Syndication::ISyndicationText^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Summary = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void PublishedDateGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Foundation::DateTime result = wrapper->_instance->PublishedDate;
        info.GetReturnValue().Set(NodeRT::Utils::DateTimeToJS(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void PublishedDateSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsDate()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        ::Windows::Foundation::DateTime winRtValue = NodeRT::Utils::DateTimeFromJSDate(value);

        wrapper->_instance->PublishedDate = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void CommentsUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->CommentsUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CommentsUriSetter(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::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->CommentsUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void IdGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Id;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void IdSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Id = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LastUpdatedTimeGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Foundation::DateTime result = wrapper->_instance->LastUpdatedTime;
        info.GetReturnValue().Set(NodeRT::Utils::DateTimeToJS(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void LastUpdatedTimeSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsDate()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        ::Windows::Foundation::DateTime winRtValue = NodeRT::Utils::DateTimeFromJSDate(value);

        wrapper->_instance->LastUpdatedTime = 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::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Web::Syndication::SyndicationContent^ result = wrapper->_instance->Content;
        info.GetReturnValue().Set(WrapSyndicationContent(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 (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationContent^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        ::Windows::Web::Syndication::SyndicationContent^ winRtValue = dynamic_cast<::Windows::Web::Syndication::SyndicationContent^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Content = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void EditUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->EditUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void LinksGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationLink^>^ result = wrapper->_instance->Links;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationLink^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationLink^ val) -> Local<Value> {
              return WrapSyndicationLink(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationLink^ {
              return UnwrapSyndicationLink(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void AuthorsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationPerson^>^ result = wrapper->_instance->Authors;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationPerson^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationPerson^ val) -> Local<Value> {
              return WrapSyndicationPerson(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationPerson^ {
              return UnwrapSyndicationPerson(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void CategoriesGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationCategory^>^ result = wrapper->_instance->Categories;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationCategory^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationCategory^ val) -> Local<Value> {
              return WrapSyndicationCategory(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationCategory^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationCategory^ {
              return UnwrapSyndicationCategory(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ContributorsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationPerson^>^ result = wrapper->_instance->Contributors;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationPerson^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationPerson^ val) -> Local<Value> {
              return WrapSyndicationPerson(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationPerson^ {
              return UnwrapSyndicationPerson(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ItemUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->ItemUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ETagGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->ETag;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void EditMediaUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->EditMediaUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeValueGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeValue;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeValueSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeValue = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNamespaceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeNamespace;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNamespaceSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeNamespace = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNameSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeName = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LanguageGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(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 LanguageSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Language = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void BaseUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->BaseUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BaseUriSetter(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::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->BaseUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void AttributeExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationAttribute^>^ result = wrapper->_instance->AttributeExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationAttribute^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationAttribute^ val) -> Local<Value> {
              return WrapSyndicationAttribute(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationAttribute^ {
              return UnwrapSyndicationAttribute(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ElementExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationItem^>(info.This())) {
        return;
      }

      SyndicationItem *wrapper = SyndicationItem::Unwrap<SyndicationItem>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::ISyndicationNode^>^ result = wrapper->_instance->ElementExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::ISyndicationNode^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::ISyndicationNode^ val) -> Local<Value> {
              return WrapISyndicationNode(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::ISyndicationNode^ {
              return UnwrapISyndicationNode(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::Web::Syndication::SyndicationItem^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSyndicationItem(::Windows::Web::Syndication::SyndicationItem^ wintRtInstance);
      friend ::Windows::Web::Syndication::SyndicationItem^ UnwrapSyndicationItem(Local<Value> value);
  };

  Persistent<FunctionTemplate> SyndicationItem::s_constructorTemplate;

  v8::Local<v8::Value> WrapSyndicationItem(::Windows::Web::Syndication::SyndicationItem^ 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>(SyndicationItem::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::SyndicationItem^ UnwrapSyndicationItem(Local<Value> value) {
     return SyndicationItem::Unwrap<SyndicationItem>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSyndicationItem(Local<Object> exports) {
    SyndicationItem::Init(exports);
  }

  class SyndicationLink : 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>("SyndicationLink").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getXmlDocument", GetXmlDocument);
          



          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("uri").ToLocalChecked(), UriGetter, UriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("title").ToLocalChecked(), TitleGetter, TitleSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("resourceLanguage").ToLocalChecked(), ResourceLanguageGetter, ResourceLanguageSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("relationship").ToLocalChecked(), RelationshipGetter, RelationshipSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("mediaType").ToLocalChecked(), MediaTypeGetter, MediaTypeSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("length").ToLocalChecked(), LengthGetter, LengthSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeValue").ToLocalChecked(), NodeValueGetter, NodeValueSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeNamespace").ToLocalChecked(), NodeNamespaceGetter, NodeNamespaceSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeName").ToLocalChecked(), NodeNameGetter, NodeNameSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("language").ToLocalChecked(), LanguageGetter, LanguageSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("baseUri").ToLocalChecked(), BaseUriGetter, BaseUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("attributeExtensions").ToLocalChecked(), AttributeExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("elementExtensions").ToLocalChecked(), ElementExtensionsGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SyndicationLink").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SyndicationLink(::Windows::Web::Syndication::SyndicationLink^ 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::Web::Syndication::SyndicationLink^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::SyndicationLink^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else 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]));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationLink(arg0);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 5
        && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Foundation::Uri^>(info[0])
        && info[1]->IsString()
        && info[2]->IsString()
        && info[3]->IsString()
        && info[4]->IsUint32())
      {
        try {
          ::Windows::Foundation::Uri^ arg0 = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(info[0]));
          Platform::String^ arg1 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[1])));
          Platform::String^ arg2 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[2])));
          Platform::String^ arg3 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[3])));
          unsigned int arg4 = static_cast<unsigned int>(Nan::To<uint32_t>(info[4]).FromMaybe(0));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationLink(arg0,arg1,arg2,arg3,arg4);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 0)
      {
        try {
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationLink();
        } 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());

      SyndicationLink *wrapperInstance = new SyndicationLink(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::Web::Syndication::SyndicationLink^>(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::Web::Syndication::SyndicationLink^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::SyndicationLink^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSyndicationLink(winRtInstance));
    }


    static void GetXmlDocument(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      if (info.Length() == 1
        && info[0]->IsInt32())
      {
        try
        {
          ::Windows::Web::Syndication::SyndicationFormat arg0 = static_cast<::Windows::Web::Syndication::SyndicationFormat>(Nan::To<int32_t>(info[0]).FromMaybe(0));
          
          ::Windows::Data::Xml::Dom::XmlDocument^ result;
          result = wrapper->_instance->GetXmlDocument(arg0);
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Data.Xml.Dom", "XmlDocument", 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 UriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(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 UriSetter(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::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Uri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void TitleGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Title;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TitleSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Title = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void ResourceLanguageGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->ResourceLanguage;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ResourceLanguageSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->ResourceLanguage = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void RelationshipGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Relationship;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void RelationshipSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Relationship = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void MediaTypeGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->MediaType;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void MediaTypeSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->MediaType = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LengthGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try  {
        unsigned int result = wrapper->_instance->Length;
        info.GetReturnValue().Set(Nan::New<Integer>(result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void LengthSetter(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::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try {

        unsigned int winRtValue = static_cast<unsigned int>(Nan::To<uint32_t>(value).FromMaybe(0));

        wrapper->_instance->Length = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeValueGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeValue;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeValueSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeValue = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNamespaceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeNamespace;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNamespaceSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeNamespace = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNameSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeName = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LanguageGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(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 LanguageSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Language = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void BaseUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->BaseUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BaseUriSetter(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::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->BaseUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void AttributeExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationAttribute^>^ result = wrapper->_instance->AttributeExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationAttribute^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationAttribute^ val) -> Local<Value> {
              return WrapSyndicationAttribute(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationAttribute^ {
              return UnwrapSyndicationAttribute(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ElementExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationLink^>(info.This())) {
        return;
      }

      SyndicationLink *wrapper = SyndicationLink::Unwrap<SyndicationLink>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::ISyndicationNode^>^ result = wrapper->_instance->ElementExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::ISyndicationNode^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::ISyndicationNode^ val) -> Local<Value> {
              return WrapISyndicationNode(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::ISyndicationNode^ {
              return UnwrapISyndicationNode(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::Web::Syndication::SyndicationLink^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSyndicationLink(::Windows::Web::Syndication::SyndicationLink^ wintRtInstance);
      friend ::Windows::Web::Syndication::SyndicationLink^ UnwrapSyndicationLink(Local<Value> value);
  };

  Persistent<FunctionTemplate> SyndicationLink::s_constructorTemplate;

  v8::Local<v8::Value> WrapSyndicationLink(::Windows::Web::Syndication::SyndicationLink^ 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>(SyndicationLink::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::SyndicationLink^ UnwrapSyndicationLink(Local<Value> value) {
     return SyndicationLink::Unwrap<SyndicationLink>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSyndicationLink(Local<Object> exports) {
    SyndicationLink::Init(exports);
  }

  class SyndicationNode : 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>("SyndicationNode").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getXmlDocument", GetXmlDocument);
          



          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeValue").ToLocalChecked(), NodeValueGetter, NodeValueSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeNamespace").ToLocalChecked(), NodeNamespaceGetter, NodeNamespaceSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeName").ToLocalChecked(), NodeNameGetter, NodeNameSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("language").ToLocalChecked(), LanguageGetter, LanguageSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("baseUri").ToLocalChecked(), BaseUriGetter, BaseUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("attributeExtensions").ToLocalChecked(), AttributeExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("elementExtensions").ToLocalChecked(), ElementExtensionsGetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SyndicationNode").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SyndicationNode(::Windows::Web::Syndication::SyndicationNode^ 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::Web::Syndication::SyndicationNode^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationNode^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::SyndicationNode^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 3
        && info[0]->IsString()
        && info[1]->IsString()
        && info[2]->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])));
          Platform::String^ arg2 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[2])));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationNode(arg0,arg1,arg2);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 0)
      {
        try {
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationNode();
        } 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());

      SyndicationNode *wrapperInstance = new SyndicationNode(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::Web::Syndication::SyndicationNode^>(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::Web::Syndication::SyndicationNode^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::SyndicationNode^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSyndicationNode(winRtInstance));
    }


    static void GetXmlDocument(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationNode^>(info.This())) {
        return;
      }

      SyndicationNode *wrapper = SyndicationNode::Unwrap<SyndicationNode>(info.This());

      if (info.Length() == 1
        && info[0]->IsInt32())
      {
        try
        {
          ::Windows::Web::Syndication::SyndicationFormat arg0 = static_cast<::Windows::Web::Syndication::SyndicationFormat>(Nan::To<int32_t>(info[0]).FromMaybe(0));
          
          ::Windows::Data::Xml::Dom::XmlDocument^ result;
          result = wrapper->_instance->GetXmlDocument(arg0);
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Data.Xml.Dom", "XmlDocument", 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 NodeValueGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationNode^>(info.This())) {
        return;
      }

      SyndicationNode *wrapper = SyndicationNode::Unwrap<SyndicationNode>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeValue;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeValueSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationNode^>(info.This())) {
        return;
      }

      SyndicationNode *wrapper = SyndicationNode::Unwrap<SyndicationNode>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeValue = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNamespaceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationNode^>(info.This())) {
        return;
      }

      SyndicationNode *wrapper = SyndicationNode::Unwrap<SyndicationNode>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeNamespace;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNamespaceSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationNode^>(info.This())) {
        return;
      }

      SyndicationNode *wrapper = SyndicationNode::Unwrap<SyndicationNode>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeNamespace = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationNode^>(info.This())) {
        return;
      }

      SyndicationNode *wrapper = SyndicationNode::Unwrap<SyndicationNode>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNameSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationNode^>(info.This())) {
        return;
      }

      SyndicationNode *wrapper = SyndicationNode::Unwrap<SyndicationNode>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeName = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LanguageGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationNode^>(info.This())) {
        return;
      }

      SyndicationNode *wrapper = SyndicationNode::Unwrap<SyndicationNode>(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 LanguageSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationNode^>(info.This())) {
        return;
      }

      SyndicationNode *wrapper = SyndicationNode::Unwrap<SyndicationNode>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Language = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void BaseUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationNode^>(info.This())) {
        return;
      }

      SyndicationNode *wrapper = SyndicationNode::Unwrap<SyndicationNode>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->BaseUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BaseUriSetter(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::Web::Syndication::SyndicationNode^>(info.This())) {
        return;
      }

      SyndicationNode *wrapper = SyndicationNode::Unwrap<SyndicationNode>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->BaseUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void AttributeExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationNode^>(info.This())) {
        return;
      }

      SyndicationNode *wrapper = SyndicationNode::Unwrap<SyndicationNode>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationAttribute^>^ result = wrapper->_instance->AttributeExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationAttribute^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationAttribute^ val) -> Local<Value> {
              return WrapSyndicationAttribute(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationAttribute^ {
              return UnwrapSyndicationAttribute(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ElementExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationNode^>(info.This())) {
        return;
      }

      SyndicationNode *wrapper = SyndicationNode::Unwrap<SyndicationNode>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::ISyndicationNode^>^ result = wrapper->_instance->ElementExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::ISyndicationNode^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::ISyndicationNode^ val) -> Local<Value> {
              return WrapISyndicationNode(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::ISyndicationNode^ {
              return UnwrapISyndicationNode(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      


    private:
      ::Windows::Web::Syndication::SyndicationNode^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSyndicationNode(::Windows::Web::Syndication::SyndicationNode^ wintRtInstance);
      friend ::Windows::Web::Syndication::SyndicationNode^ UnwrapSyndicationNode(Local<Value> value);
  };

  Persistent<FunctionTemplate> SyndicationNode::s_constructorTemplate;

  v8::Local<v8::Value> WrapSyndicationNode(::Windows::Web::Syndication::SyndicationNode^ 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>(SyndicationNode::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::SyndicationNode^ UnwrapSyndicationNode(Local<Value> value) {
     return SyndicationNode::Unwrap<SyndicationNode>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSyndicationNode(Local<Object> exports) {
    SyndicationNode::Init(exports);
  }

  class SyndicationPerson : 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>("SyndicationPerson").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getXmlDocument", GetXmlDocument);
          



          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeValue").ToLocalChecked(), NodeValueGetter, NodeValueSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeNamespace").ToLocalChecked(), NodeNamespaceGetter, NodeNamespaceSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeName").ToLocalChecked(), NodeNameGetter, NodeNameSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("language").ToLocalChecked(), LanguageGetter, LanguageSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("baseUri").ToLocalChecked(), BaseUriGetter, BaseUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("attributeExtensions").ToLocalChecked(), AttributeExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("elementExtensions").ToLocalChecked(), ElementExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("uri").ToLocalChecked(), UriGetter, UriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("name").ToLocalChecked(), NameGetter, NameSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("email").ToLocalChecked(), EmailGetter, EmailSetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SyndicationPerson").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SyndicationPerson(::Windows::Web::Syndication::SyndicationPerson^ 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::Web::Syndication::SyndicationPerson^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::SyndicationPerson^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else 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])));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationPerson(arg0);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 3
        && info[0]->IsString()
        && info[1]->IsString()
        && NodeRT::Utils::IsWinRtWrapperOf<::Windows::Foundation::Uri^>(info[2]))
      {
        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^ arg2 = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(info[2]));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationPerson(arg0,arg1,arg2);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 0)
      {
        try {
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationPerson();
        } 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());

      SyndicationPerson *wrapperInstance = new SyndicationPerson(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::Web::Syndication::SyndicationPerson^>(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::Web::Syndication::SyndicationPerson^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::SyndicationPerson^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSyndicationPerson(winRtInstance));
    }


    static void GetXmlDocument(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      if (info.Length() == 1
        && info[0]->IsInt32())
      {
        try
        {
          ::Windows::Web::Syndication::SyndicationFormat arg0 = static_cast<::Windows::Web::Syndication::SyndicationFormat>(Nan::To<int32_t>(info[0]).FromMaybe(0));
          
          ::Windows::Data::Xml::Dom::XmlDocument^ result;
          result = wrapper->_instance->GetXmlDocument(arg0);
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Data.Xml.Dom", "XmlDocument", 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 NodeValueGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeValue;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeValueSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeValue = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNamespaceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeNamespace;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNamespaceSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeNamespace = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNameSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeName = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LanguageGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(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 LanguageSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Language = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void BaseUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->BaseUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BaseUriSetter(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::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->BaseUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void AttributeExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationAttribute^>^ result = wrapper->_instance->AttributeExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationAttribute^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationAttribute^ val) -> Local<Value> {
              return WrapSyndicationAttribute(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationAttribute^ {
              return UnwrapSyndicationAttribute(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ElementExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::ISyndicationNode^>^ result = wrapper->_instance->ElementExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::ISyndicationNode^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::ISyndicationNode^ val) -> Local<Value> {
              return WrapISyndicationNode(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::ISyndicationNode^ {
              return UnwrapISyndicationNode(value);
            }
          ));
        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::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(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 UriSetter(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::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Uri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Name;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NameSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Name = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void EmailGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Email;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void EmailSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationPerson^>(info.This())) {
        return;
      }

      SyndicationPerson *wrapper = SyndicationPerson::Unwrap<SyndicationPerson>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Email = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      


    private:
      ::Windows::Web::Syndication::SyndicationPerson^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSyndicationPerson(::Windows::Web::Syndication::SyndicationPerson^ wintRtInstance);
      friend ::Windows::Web::Syndication::SyndicationPerson^ UnwrapSyndicationPerson(Local<Value> value);
  };

  Persistent<FunctionTemplate> SyndicationPerson::s_constructorTemplate;

  v8::Local<v8::Value> WrapSyndicationPerson(::Windows::Web::Syndication::SyndicationPerson^ 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>(SyndicationPerson::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::SyndicationPerson^ UnwrapSyndicationPerson(Local<Value> value) {
     return SyndicationPerson::Unwrap<SyndicationPerson>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSyndicationPerson(Local<Object> exports) {
    SyndicationPerson::Init(exports);
  }

  class SyndicationText : 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>("SyndicationText").ToLocalChecked());
        localRef->InstanceTemplate()->SetInternalFieldCount(1);


          
            Nan::SetPrototypeMethod(localRef, "getXmlDocument", GetXmlDocument);
          



          
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeValue").ToLocalChecked(), NodeValueGetter, NodeValueSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeNamespace").ToLocalChecked(), NodeNamespaceGetter, NodeNamespaceSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("nodeName").ToLocalChecked(), NodeNameGetter, NodeNameSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("language").ToLocalChecked(), LanguageGetter, LanguageSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("baseUri").ToLocalChecked(), BaseUriGetter, BaseUriSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("attributeExtensions").ToLocalChecked(), AttributeExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("elementExtensions").ToLocalChecked(), ElementExtensionsGetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("xml").ToLocalChecked(), XmlGetter, XmlSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("type").ToLocalChecked(), TypeGetter, TypeSetter);
            Nan::SetAccessor(localRef->PrototypeTemplate(), Nan::New<String>("text").ToLocalChecked(), TextGetter, TextSetter);

        Local<Object> constructor = Nan::To<Object>(Nan::GetFunction(localRef).ToLocalChecked()).ToLocalChecked();
        Nan::SetMethod(constructor, "castFrom", CastFrom);



        Nan::Set(exports, Nan::New<String>("SyndicationText").ToLocalChecked(), constructor);
      }

      virtual ::Platform::Object^ GetObjectInstance() const override {
        return _instance;
      }

    private:

      SyndicationText(::Windows::Web::Syndication::SyndicationText^ 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::Web::Syndication::SyndicationText^ winRtInstance;


      if (info.Length() == 1 && OpaqueWrapper::IsOpaqueWrapper(info[0]) &&
        NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info[0])) {
        try {
          winRtInstance = (::Windows::Web::Syndication::SyndicationText^) NodeRT::Utils::GetObjectInstance(info[0]);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else 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])));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationText(arg0);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 2
        && info[0]->IsString()
        && info[1]->IsInt32())
      {
        try {
          Platform::String^ arg0 = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), info[0])));
          ::Windows::Web::Syndication::SyndicationTextType arg1 = static_cast<::Windows::Web::Syndication::SyndicationTextType>(Nan::To<int32_t>(info[1]).FromMaybe(0));
          
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationText(arg0,arg1);
        } catch (Platform::Exception ^exception) {
          NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
          return;
        }
      }
      else if (info.Length() == 0)
      {
        try {
          winRtInstance = ref new ::Windows::Web::Syndication::SyndicationText();
        } 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());

      SyndicationText *wrapperInstance = new SyndicationText(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::Web::Syndication::SyndicationText^>(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::Web::Syndication::SyndicationText^ winRtInstance;
      try {
        winRtInstance = (::Windows::Web::Syndication::SyndicationText^) NodeRT::Utils::GetObjectInstance(info[0]);
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }

      info.GetReturnValue().Set(WrapSyndicationText(winRtInstance));
    }


    static void GetXmlDocument(Nan::NAN_METHOD_ARGS_TYPE info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      if (info.Length() == 1
        && info[0]->IsInt32())
      {
        try
        {
          ::Windows::Web::Syndication::SyndicationFormat arg0 = static_cast<::Windows::Web::Syndication::SyndicationFormat>(Nan::To<int32_t>(info[0]).FromMaybe(0));
          
          ::Windows::Data::Xml::Dom::XmlDocument^ result;
          result = wrapper->_instance->GetXmlDocument(arg0);
          info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Data.Xml.Dom", "XmlDocument", 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 NodeValueGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeValue;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeValueSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeValue = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNamespaceGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeNamespace;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNamespaceSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeNamespace = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void NodeNameGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->NodeName;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void NodeNameSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->NodeName = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void LanguageGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(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 LanguageSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Language = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void BaseUriGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try  {
        ::Windows::Foundation::Uri^ result = wrapper->_instance->BaseUri;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Foundation", "Uri", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void BaseUriSetter(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::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try {

        ::Windows::Foundation::Uri^ winRtValue = dynamic_cast<::Windows::Foundation::Uri^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->BaseUri = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void AttributeExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::SyndicationAttribute^>^ result = wrapper->_instance->AttributeExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::SyndicationAttribute^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::SyndicationAttribute^ val) -> Local<Value> {
              return WrapSyndicationAttribute(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationAttribute^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::SyndicationAttribute^ {
              return UnwrapSyndicationAttribute(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void ElementExtensionsGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try  {
        ::Windows::Foundation::Collections::IVector<::Windows::Web::Syndication::ISyndicationNode^>^ result = wrapper->_instance->ElementExtensions;
        info.GetReturnValue().Set(NodeRT::Collections::VectorWrapper<::Windows::Web::Syndication::ISyndicationNode^>::CreateVectorWrapper(result, 
            [](::Windows::Web::Syndication::ISyndicationNode^ val) -> Local<Value> {
              return WrapISyndicationNode(val);
            },
            [](Local<Value> value) -> bool {
              return NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::ISyndicationNode^>(value);
            },
            [](Local<Value> value) -> ::Windows::Web::Syndication::ISyndicationNode^ {
              return UnwrapISyndicationNode(value);
            }
          ));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void XmlGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try  {
        ::Windows::Data::Xml::Dom::XmlDocument^ result = wrapper->_instance->Xml;
        info.GetReturnValue().Set(NodeRT::Utils::CreateExternalWinRTObject("Windows.Data.Xml.Dom", "XmlDocument", result));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void XmlSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Data::Xml::Dom::XmlDocument^>(value)) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try {

        ::Windows::Data::Xml::Dom::XmlDocument^ winRtValue = dynamic_cast<::Windows::Data::Xml::Dom::XmlDocument^>(NodeRT::Utils::GetObjectInstance(value));

        wrapper->_instance->Xml = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void TypeGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Type;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TypeSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Type = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      
    static void TextGetter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
      HandleScope scope;

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try  {
        Platform::String^ result = wrapper->_instance->Text;
        info.GetReturnValue().Set(NodeRT::Utils::NewString(result->Data()));
        return;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
        return;
      }
    }
      
    static void TextSetter(Local<String> property, Local<Value> value, const Nan::PropertyCallbackInfo<void> &info) {
      HandleScope scope;

      if (!value->IsString()) {
        Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(L"Value to set is of unexpected type")));
        return;
      }

      if (!NodeRT::Utils::IsWinRtWrapperOf<::Windows::Web::Syndication::SyndicationText^>(info.This())) {
        return;
      }

      SyndicationText *wrapper = SyndicationText::Unwrap<SyndicationText>(info.This());

      try {

        Platform::String^ winRtValue = ref new Platform::String(NodeRT::Utils::StringToWchar(v8::String::Value(v8::Isolate::GetCurrent(), value)));

        wrapper->_instance->Text = winRtValue;
      } catch (Platform::Exception ^exception) {
        NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
      }
    }
      


    private:
      ::Windows::Web::Syndication::SyndicationText^ _instance;
      static Persistent<FunctionTemplate> s_constructorTemplate;

      friend v8::Local<v8::Value> WrapSyndicationText(::Windows::Web::Syndication::SyndicationText^ wintRtInstance);
      friend ::Windows::Web::Syndication::SyndicationText^ UnwrapSyndicationText(Local<Value> value);
  };

  Persistent<FunctionTemplate> SyndicationText::s_constructorTemplate;

  v8::Local<v8::Value> WrapSyndicationText(::Windows::Web::Syndication::SyndicationText^ 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>(SyndicationText::s_constructorTemplate);
    return scope.Escape(Nan::NewInstance(Nan::GetFunction(localRef).ToLocalChecked(),_countof(args), args).ToLocalChecked());
  }

  ::Windows::Web::Syndication::SyndicationText^ UnwrapSyndicationText(Local<Value> value) {
     return SyndicationText::Unwrap<SyndicationText>(Nan::To<Object>(value).ToLocalChecked())->_instance;
  }

  void InitSyndicationText(Local<Object> exports) {
    SyndicationText::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::Web::Syndication::InitSyndicationErrorStatusEnum(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationFormatEnum(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationTextTypeEnum(target);
      NodeRT::Windows::Web::Syndication::InitISyndicationClient(target);
      NodeRT::Windows::Web::Syndication::InitISyndicationNode(target);
      NodeRT::Windows::Web::Syndication::InitISyndicationText(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationAttribute(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationCategory(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationClient(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationContent(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationError(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationFeed(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationGenerator(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationItem(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationLink(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationNode(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationPerson(target);
      NodeRT::Windows::Web::Syndication::InitSyndicationText(target);


  NodeRT::Utils::RegisterNameSpace("Windows.Web.Syndication", target);
}



NODE_MODULE(binding, init)
