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

Method RemoveAtEnd

src/NodeRTLib/ProjectFiles/CollectionsWrap.h:1017–1041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1015 }
1016
1017 static void RemoveAtEnd(Nan::NAN_METHOD_ARGS_TYPE info) {
1018 HandleScope scope;
1019
1020 if (!NodeRT::Utils::IsWinRtWrapperOf<
1021 ::Windows::Foundation::Collections::IVector<T> ^>(info.This())) {
1022 return;
1023 }
1024
1025 VectorWrapper<T>* wrapper =
1026 VectorWrapper<T>::Unwrap<VectorWrapper<T>>(info.This());
1027
1028 if (info.Length() == 0) {
1029 try {
1030 wrapper->_instance->RemoveAtEnd();
1031 return;
1032 } catch (Platform::Exception ^ exception) {
1033 NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
1034 return;
1035 }
1036 } else {
1037 Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(
1038 L"Bad arguments: no suitable overload found")));
1039 return;
1040 }
1041 }
1042
1043 static void ReplaceAll(Nan::NAN_METHOD_ARGS_TYPE info) {
1044 HandleScope scope;

Callers

nothing calls this directly

Calls 1

NewStringFunction · 0.85

Tested by

no test coverage detected