| 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) { |
no test coverage detected