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

Function Getter

src/NodeRTLib/CppTemplates/StaticPropertyGetter.cpp:2–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1
2 static void @(Model.Name)Getter(Local<String> property, const Nan::PropertyCallbackInfo<v8::Value> &info) {
3 HandleScope scope;
4
5 try
6 {@{
7 var jsConversionInfo = Converter.ToJS(Model.PropertyType, TX.MainModel.Types.ContainsKey(Model.PropertyType));
8 var winrtConversionInfo = Converter.ToWinRT(Model.PropertyType);
9 }
10 @winrtConversionInfo[0] result = @(TX.ToWinRT(Model.DeclaringType, false))::@(Model.Name);
11 info.GetReturnValue().Set(@string.Format(jsConversionInfo[1], "result"));
12 return;
13 } catch (Platform::Exception ^exception) {
14 NodeRT::Utils::ThrowWinRtExceptionInJs(exception);
15 return;
16 }
17 }

Callers

nothing calls this directly

Calls 3

ToJSMethod · 0.80
ToWinRTMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected