You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception appears to be thrown in SyntaxToModelTransform.GetOrCreateSubObject(...), line 216.
The reason I am getting this exception is because I am trying to use wrappers for various types, and so implemented a ConvertToModel that creates the wrapper from the deserialized value. The error happens when the wrapped type is a list.
If it helps, the ConvertToModel function looks like this:
interfaceIWrapper<T>{TValue{get;}}classStructValue<T>:IWrapper<T>whereT:struct{/* ... */}classReferenceValue<T>:IWrapper<T>whereT:class{/* ... */}classListValue<T>:IWrapper<IList<T>>{/* ... */}// ... and othersobject?ConvertToModel(objectdeserialized,TypetargetType){// [return deserialized if deserialized.GetType() is already targetType]// [return null if targetType does not implement IWrapper]returnCreateWrapper(deserialized,targetType);}
This works for StructValue and ReferenceValue, just not ListValue because of the error.
The text was updated successfully, but these errors were encountered:
Exception appears to be thrown in
SyntaxToModelTransform.GetOrCreateSubObject(...)
, line 216.The reason I am getting this exception is because I am trying to use wrappers for various types, and so implemented a
ConvertToModel
that creates the wrapper from the deserialized value. The error happens when the wrapped type is a list.If it helps, the
ConvertToModel
function looks like this:This works for
StructValue
andReferenceValue
, just notListValue
because of the error.The text was updated successfully, but these errors were encountered: