ServiceStack:IReturn <t>,数组类型</t>

时间:2013-06-29 13:00:01

标签: .net serialization servicestack

我在我的一个项目和curios中使用Servicestack是否可以在DTO对象的IReturn界面中指定数组类型。

例如:

public sealed class Search : IReturn<Offer[]> { }

但是,如果我将此类用作DTO,则它始终会因序列化错误而失败.System.ArgumentException:值无效。

来自调用堆栈的一些其他信息: System.Runtime.Serialization.FormatterServices.nativeGetUninitializedObject(RuntimeType type) System.Runtime.Serialization.FormatterServices.GetUninitializedObject(Type type)

我可以使用list类,但更喜欢使用非可变类型,如数组类型。

0 个答案:

没有答案