MCPcopy Create free account
hub / github.com/NodeRT/NodeRT / SizeGetter

Method SizeGetter

src/NodeRTLib/ProjectFiles/CollectionsWrap.h:1608–1626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1606 }
1607
1608 static void SizeGetter(Local<String> property,
1609 const Nan::PropertyCallbackInfo<v8::Value>& info) {
1610 HandleScope scope;
1611 if (!NodeRT::Utils::IsWinRtWrapperOf<
1612 ::Windows::Foundation::Collections::IMapView<K, V> ^>(
1613 info.This())) {
1614 return;
1615 }
1616
1617 MapViewWrapper<K, V>* wrapper =
1618 MapViewWrapper<K, V>::Unwrap<MapViewWrapper<K, V>>(info.This());
1619
1620 try {
1621 info.GetReturnValue().Set(Nan::New<Integer>(wrapper->_instance->Size));
1622 } catch (Platform::Exception ^ exception) {
1623 NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
1624 return;
1625 }
1626 }
1627
1628 private:
1629 ::Windows::Foundation::Collections::IMapView<K, V> ^ _instance;

Callers

nothing calls this directly

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected