| 1041 | } |
| 1042 | |
| 1043 | static void ReplaceAll(Nan::NAN_METHOD_ARGS_TYPE info) { |
| 1044 | HandleScope scope; |
| 1045 | |
| 1046 | if (!NodeRT::Utils::IsWinRtWrapperOf< |
| 1047 | ::Windows::Foundation::Collections::IVector<T> ^>(info.This())) { |
| 1048 | return; |
| 1049 | } |
| 1050 | |
| 1051 | VectorWrapper<T>* wrapper = |
| 1052 | VectorWrapper<T>::Unwrap<VectorWrapper<T>>(info.This()); |
| 1053 | |
| 1054 | if (info.Length() == 1 && |
| 1055 | NodeRT::Utils::IsWinRtWrapperOf<::Platform::Array<T> ^>(info[0])) { |
| 1056 | try { |
| 1057 | WrapperBase* itemsWrapper = |
| 1058 | WrapperBase::Unwrap<WrapperBase>(info[0].As<Object>()); |
| 1059 | ::Platform::Array<T> ^ items = |
| 1060 | (::Platform::Array<T> ^) itemsWrapper->GetObjectInstance(); |
| 1061 | wrapper->_instance->ReplaceAll(items); |
| 1062 | return; |
| 1063 | } catch (Platform::Exception ^ exception) { |
| 1064 | NodeRT::Utils::ThrowWinRtExceptionInJs(exception); |
| 1065 | return; |
| 1066 | } |
| 1067 | } else { |
| 1068 | Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString( |
| 1069 | L"Bad arguments: no suitable overload found"))); |
| 1070 | return; |
| 1071 | } |
| 1072 | } |
| 1073 | |
| 1074 | static void GetAt(Nan::NAN_METHOD_ARGS_TYPE info) { |
| 1075 | HandleScope scope; |
nothing calls this directly
no test coverage detected