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

Method SizeGetter

src/NodeRTLib/ProjectFiles/CollectionsWrap.h:1953–1970  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1951 }
1952
1953 static void SizeGetter(Local<String> property,
1954 const Nan::PropertyCallbackInfo<v8::Value>& info) {
1955 HandleScope scope;
1956 if (!NodeRT::Utils::IsWinRtWrapperOf<
1957 ::Windows::Foundation::Collections::IMap<K, V> ^>(info.This())) {
1958 return;
1959 }
1960
1961 MapWrapper<K, V>* wrapper =
1962 MapWrapper<K, V>::Unwrap<MapWrapper<K, V>>(info.This());
1963
1964 try {
1965 info.GetReturnValue().Set(Nan::New<Integer>(wrapper->_instance->Size));
1966 } catch (Platform::Exception ^ exception) {
1967 NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
1968 return;
1969 }
1970 }
1971
1972 private:
1973 ::Windows::Foundation::Collections::IMap<K, V> ^ _instance;

Callers

nothing calls this directly

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected