예제 #1
0
        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());
        }
예제 #2
0
 public void GetObjectData(object obj, SerializationInfo info, StreamingContext context)
 {
     info.AddValue("_", SimpleSerializer.Binary().Serialize(EditableExpression.Create(Funcletizer.PartialEval((Expression)obj))));
 }