Closed inethui closed 2 years ago
As far as I remember Lazy is not supported but you can make a surrogate type.
RuntimeTypeModel.Default.Add(typeof(Lazy<double>), false).SetSurrogate(typeof(LazySurrogate<double>));
[SerializableType]
public class LazySurrogate<T>
{
[SerializableMember(1)]
public T Data { get; set; }
public static explicit operator Lazy<T>(LazySurrogate<T> value);// implement
public static explicit operator LazySurrogate<T>(Lazy<T> value);// implement
}
Thanks a lot!
Also, does Aqla support "Action" and "Func" type fields?
Delegates are not supported. They are code pointers and not meant to be serialized.
I have a class which contains a "Lazy" field, how to set it up and make the test case work? Any help is highly appreciated.