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

Method Get

src/NodeRTLib/ProjectFiles/CollectionsWrap.h:135–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133 }
134
135 static void Get(uint32_t index,
136 const Nan::PropertyCallbackInfo<v8::Value>& info) {
137 HandleScope scope;
138 if (!NodeRT::Utils::IsWinRtWrapperOf<::Platform::Array<T> ^>(info.This())) {
139 return;
140 }
141
142 ArrayWrapper<T>* wrapper =
143 ArrayWrapper<T>::Unwrap<ArrayWrapper<T>>(info.This());
144
145 if (wrapper->_instance->Length <= index) {
146 return;
147 }
148
149 if (wrapper->_getterFunc == nullptr) {
150 info.GetReturnValue().Set(CreateOpaqueWrapper(wrapper->_instance[index]));
151 } else {
152 info.GetReturnValue().Set(
153 wrapper->_getterFunc(wrapper->_instance[index]));
154 }
155 }
156
157 static void Set(uint32_t index,
158 Local<Value> value,

Callers 1

CreateCallbackDataMethod · 0.45

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected