| 1317 | } |
| 1318 | |
| 1319 | static void KeyGetter(Local<String> property, |
| 1320 | const Nan::PropertyCallbackInfo<v8::Value>& info) { |
| 1321 | HandleScope scope; |
| 1322 | if (!NodeRT::Utils::IsWinRtWrapperOf< |
| 1323 | ::Windows::Foundation::Collections::IKeyValuePair<K, V> ^>( |
| 1324 | info.This())) { |
| 1325 | return; |
| 1326 | } |
| 1327 | |
| 1328 | KeyValuePairWrapper<K, V>* wrapper = |
| 1329 | KeyValuePairWrapper<K, V>::Unwrap<KeyValuePairWrapper<K, V>>( |
| 1330 | info.This()); |
| 1331 | |
| 1332 | try { |
| 1333 | info.GetReturnValue().Set( |
| 1334 | wrapper->_keyGetterFunc(wrapper->_instance->Key)); |
| 1335 | } catch (Platform::Exception ^ exception) { |
| 1336 | NodeRT::Utils::ThrowWinRtExceptionInJs(exception); |
| 1337 | return; |
| 1338 | } |
| 1339 | } |
| 1340 | |
| 1341 | static void ValueGetter(Local<String> property, |
| 1342 | const Nan::PropertyCallbackInfo<v8::Value>& info) { |