全部,
我正在使用 ZeroFormatter 对大对象进行序列化,有时在序列化错误时会出现以下错误,在使用 ZeroFormatter 的 Union 概念进行继承后会观察到此问题。
以下是异常详细信息:
System.InvalidProgramException:公共语言运行时检测到无效程序。
在 ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.Factors.RateFactor$Formatter.Serialize(Byte[]& , Int32 , RateFactor )
在 ZeroFormatter.Formatters.CollectionFormatter 3.Serialize(Byte[]& bytes, Int32 offset , TCollection 值) 在 ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.PackagePlan$Formatter.Serialize(Byte[]& , Int32 , PackagePlan ) 在 ZeroFormatter.Formatters.CollectionFormatter 3.Serialize(Byte[]& bytes, Int32 偏移量,TCollection 值)3.Serialize(Byte[]& bytes, Int32 offset, TCollection value)
at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.RateClass$Formatter.Serialize(Byte[]& , Int32 , RateClass )
at ZeroFormatter.Formatters.CollectionFormatter3.Serialize(Byte[]& bytes, Int32 offset, TCollection value)
at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.Package$Formatter.Serialize(Byte[]& , Int32 , Package )
at ZeroFormatter.Formatters.CollectionFormatter
在 ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.PackageGroup$Formatter.Serialize(Byte[]& , Int32 , PackageGroup )
在 ZeroFormatter.Formatters.CollectionFormatter 1.Serialize[T](T obj) 在 Colibrium.Utility .Library.ObjectConverter`1.ConvertO bjectToBinaryZeroFormatter(T p_object)3.Serialize(Byte[]& bytes, Int32 offset, TCollection value)
at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.Group.GroupRatingResults$Formatter.Serialize(Byte[]& , Int32 , GroupRatingResults )
at ZeroFormatter.ZeroFormatterSerializer.CustomSerializer在 C:\TFS\UPMC\Repos\Colibrium.Utility.Library\ObjectConverter.cs:407 行