public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) { var expr = ((EditableExpression)SimpleSerializer.Binary().Deserialize(info.GetValue("_", typeof(byte[])) as byte[])); if (expr == null) { return(null); } return(expr.ToExpression()); }
public void GetObjectData(object obj, SerializationInfo info, StreamingContext context) { info.AddValue("_", SimpleSerializer.Binary().Serialize(EditableExpression.Create(Funcletizer.PartialEval((Expression)obj)))); }