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

Method Clear

src/NodeRTLib/ProjectFiles/CollectionsWrap.h:1927–1951  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1925 }
1926
1927 static void Clear(Nan::NAN_METHOD_ARGS_TYPE info) {
1928 HandleScope scope;
1929
1930 if (!NodeRT::Utils::IsWinRtWrapperOf<
1931 ::Windows::Foundation::Collections::IMap<K, V> ^>(info.This())) {
1932 return;
1933 }
1934
1935 MapWrapper<K, V>* wrapper =
1936 MapWrapper<K, V>::Unwrap<MapWrapper<K, V>>(info.This());
1937
1938 if (info.Length() == 0) {
1939 try {
1940 wrapper->_instance->Clear();
1941 return;
1942 } catch (Platform::Exception ^ exception) {
1943 NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
1944 return;
1945 }
1946 } else {
1947 Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString(
1948 L"Bad arguments: no suitable overload found")));
1949 return;
1950 }
1951 }
1952
1953 static void SizeGetter(Local<String> property,
1954 const Nan::PropertyCallbackInfo<v8::Value>& info) {

Callers 4

ClearMethod · 0.45
ClearSettingsAndUIMethod · 0.45
FilterNamespacesMethod · 0.45
cmdOpenFile_ClickMethod · 0.45

Calls 1

NewStringFunction · 0.85

Tested by

no test coverage detected