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

Method Init

src/NodeRTLib/ProjectFiles/CollectionsWrap.h:1252–1268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1250class KeyValuePairWrapper : NodeRT::WrapperBase {
1251 public:
1252 static void Init() {
1253 HandleScope scope;
1254
1255 Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
1256 s_constructorTemplate.Reset(localRef);
1257 localRef->SetClassName(
1258 Nan::New<String>("Windows::Foundation::Collections:IKeyValuePair")
1259 .ToLocalChecked());
1260 localRef->InstanceTemplate()->SetInternalFieldCount(1);
1261
1262 Nan::SetAccessor(localRef->PrototypeTemplate(),
1263 Nan::New<String>("key").ToLocalChecked(), KeyGetter);
1264 Nan::SetAccessor(localRef->PrototypeTemplate(),
1265 Nan::New<String>("value").ToLocalChecked(), ValueGetter);
1266
1267 return;
1268 }
1269
1270 static Local<Value> CreateKeyValuePairWrapper(
1271 ::Windows::Foundation::Collections::IKeyValuePair<K, V> ^ winRtInstance,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected