Added a few KnownTypes to support value type arrays

This commit is contained in:
Erguotou
2015-04-24 11:57:37 -07:00
committed by amaitland
parent 124253754c
commit 35db8ce87d
2 changed files with 38 additions and 0 deletions
+24
View File
@@ -11,6 +11,30 @@ namespace CefSharp.Example
public Type MyUnconvertibleProperty { get; set; }
public SubBoundObject SubObject { get; set; }
public uint[] MyUintArray
{
get { return new uint[] { 7, 8 }; }
set { }
}
public int[] MyIntArray
{
get { return new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; }
set { }
}
public Array MyArray
{
get { return new short[] { 1, 2, 3 }; }
set { }
}
public byte[] MyBytes
{
get { return new byte[] { 3, 4, 5 }; }
set { }
}
public BoundObject()
{
MyProperty = 42;
@@ -2,11 +2,25 @@
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace CefSharp.Internals
{
[DataContract]
[KnownType(typeof(bool[]))]
[KnownType(typeof(byte[]))]
[KnownType(typeof(short[]))]
[KnownType(typeof(int[]))]
[KnownType(typeof(long[]))]
[KnownType(typeof(ushort[]))]
[KnownType(typeof(uint[]))]
[KnownType(typeof(ulong[]))]
[KnownType(typeof(float[]))]
[KnownType(typeof(double[]))]
[KnownType(typeof(string[]))]
public class BrowserProcessResponse
{
[DataMember]