| 926 | } |
| 927 | |
| 928 | static void GetView(Nan::NAN_METHOD_ARGS_TYPE info) { |
| 929 | HandleScope scope; |
| 930 | |
| 931 | if (!NodeRT::Utils::IsWinRtWrapperOf< |
| 932 | ::Windows::Foundation::Collections::IVector<T> ^>(info.This())) { |
| 933 | return; |
| 934 | } |
| 935 | |
| 936 | VectorWrapper<T>* wrapper = |
| 937 | VectorWrapper<T>::Unwrap<VectorWrapper<T>>(info.This()); |
| 938 | |
| 939 | if (info.Length() == 0) { |
| 940 | try { |
| 941 | ::Windows::Foundation::Collections::IVectorView<T> ^ result = |
| 942 | wrapper->_instance->GetView(); |
| 943 | info.GetReturnValue().Set(VectorViewWrapper<T>::CreateVectorViewWrapper( |
| 944 | result, wrapper->_getterFunc, wrapper->_checkTypeFunc, |
| 945 | wrapper->_convertToTypeFunc)); |
| 946 | } catch (Platform::Exception ^ exception) { |
| 947 | NodeRT::Utils::ThrowWinRtExceptionInJs(exception); |
| 948 | return; |
| 949 | } |
| 950 | } else { |
| 951 | Nan::ThrowError(Nan::Error(NodeRT::Utils::NewString( |
| 952 | L"Bad arguments: no suitable overload found"))); |
| 953 | return; |
| 954 | } |
| 955 | |
| 956 | return; |
| 957 | } |
| 958 | |
| 959 | static void InsertAt(Nan::NAN_METHOD_ARGS_TYPE info) { |
| 960 | HandleScope scope; |