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

Method SizeGetter

src/NodeRTLib/ProjectFiles/CollectionsWrap.h:1219–1236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1217 }
1218
1219 static void SizeGetter(Local<String> property,
1220 const Nan::PropertyCallbackInfo<v8::Value>& info) {
1221 HandleScope scope;
1222 if (!NodeRT::Utils::IsWinRtWrapperOf<
1223 ::Windows::Foundation::Collections::IVector<T> ^>(info.This())) {
1224 return;
1225 }
1226
1227 VectorWrapper<T>* wrapper =
1228 VectorWrapper<T>::Unwrap<VectorWrapper<T>>(info.This());
1229
1230 try {
1231 info.GetReturnValue().Set(Nan::New<Integer>(wrapper->_instance->Size));
1232 } catch (Platform::Exception ^ exception) {
1233 NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
1234 return;
1235 }
1236 }
1237
1238 private:
1239 ::Windows::Foundation::Collections::IVector<T> ^ _instance;

Callers

nothing calls this directly

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected