| 987 | } |
| 988 | |
| 989 | static void RemoveAt(Nan::NAN_METHOD_ARGS_TYPE info) { |
| 990 | HandleScope scope; |
| 991 | |
| 992 | if (!NodeRT::Utils::IsWinRtWrapperOf< |
| 993 | ::Windows::Foundation::Collections::IVector<T> ^>(info.This())) { |
| 994 | return; |
| 995 | } |
| 996 | |
| 997 | VectorWrapper<T>* wrapper = |
| 998 | VectorWrapper<T>::Unwrap<VectorWrapper<T>>(info.This()); |
| 999 | |
| 1000 | if (info.Length() == 1 && info[0]->IsUint32()) { |
| 1001 | try { |
| 1002 | unsigned int index = info[0]->Uint32Value(); |
| 1003 | |
| 1004 | wrapper->_instance->RemoveAt(index); |
| 1005 | return; |
| 1006 | } catch (Platform::Exception ^ exception) { |
| 1007 | NodeRT::Utils::ThrowWinRtExceptionInJs(exception); |
| 1008 | return; |
| 1009 | } |
| 1010 | } else { |
| 1011 | Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString( |
| 1012 | L"Bad arguments: no suitable overload found"))); |
| 1013 | return; |
| 1014 | } |
| 1015 | } |
| 1016 | |
| 1017 | static void RemoveAtEnd(Nan::NAN_METHOD_ARGS_TYPE info) { |
| 1018 | HandleScope scope; |
nothing calls this directly
no test coverage detected