I'm using fluent nhibernate on my project. Internally, fluent nhibernate use this code below to perform DeepClone
(reference) :
using (var stream = new MemoryStream()) {
var formatter = new BinaryFormatter();
formatter.Serialize(stream, obj);
stream.Position = 0;
return (T)formatter.Deserialize(stream);
}
Unfortunately, this doesn't work on mono because those code will call
System.Collections.Generic.HashSet<T>.GetObjectData
(System.Runtime.Serialization.SerializationInfo info, StreamingContext
context)
which not yet implemented (throw NotImplementedException
).
Does anyone know deep clone codes that works on mono ?
I think you should report a bug in bugzilla.xamarin.com (with a title like "FluentNHibernate doesn't work with Mono" or something, rather than focusing just on the NIE which they already may know about).