Skip to content

Commit f21fcbf

Browse files
mohdimasamaitland
authored andcommitted
Adding List type conversion (#1719)
* Adding List type conversion
1 parent d74abda commit f21fcbf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

CefSharp.Core/Internals/TypeConversion.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,17 @@ namespace CefSharp
149149
{
150150
cefValue->SetDouble(Convert::ToDouble(value));
151151
}
152+
else if (type == List<Object^>::typeid)
153+
{
154+
auto list = safe_cast<List<Object^>^>(value);
155+
auto cefList = CefListValue::Create();
156+
for (int i = 0; i < list->Count; i++)
157+
{
158+
auto value = list[i];
159+
SerializeV8Object(cefList, i, value);
160+
}
161+
cefValue->SetList(cefList);
162+
}
152163
else if (type == Dictionary<String^, Object^>::typeid)
153164
{
154165
auto dictionary = safe_cast<Dictionary<String^, Object^>^>(value);

0 commit comments

Comments
 (0)