mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 04:00:07 +00:00
Added a few KnownTypes to support value type arrays
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user