Exemplo n.º 1
0
 internal SerializableConditionalExpression(ZetboxStreamReader binReader, StreamSerializationContext ctx, InterfaceType.Factory iftFactory)
     : base(binReader, ctx, iftFactory)
 {
     Test    = SerializableExpression.FromStream(binReader, ctx, iftFactory);
     IfTrue  = SerializableExpression.FromStream(binReader, ctx, iftFactory);
     IfFalse = SerializableExpression.FromStream(binReader, ctx, iftFactory);
 }
Exemplo n.º 2
0
        internal SerializableCompoundExpression(ZetboxStreamReader binReader, StreamSerializationContext ctx, InterfaceType.Factory iftFactory)
            : base(binReader, ctx, iftFactory)
        {
            var children = new List <SerializableExpression>();

            while (binReader.ReadBoolean())
            {
                children.Add(SerializableExpression.FromStream(binReader, ctx, iftFactory));
            }
            this.Children = children.ToArray();
        }
Exemplo n.º 3
0
 /// <summary>
 /// Deserialize a Linq Expression Tree.
 /// </summary>
 /// <param name="iftFactory">InterfaceType.Factory to pass on the the read SerializableExpressions</param>
 public SerializableExpression ReadSerializableExpression(InterfaceType.Factory iftFactory)
 {
     TraceCurrentPos();
     if (_source.ReadBoolean())
     {
         return(SerializableExpression.FromStream(this, iftFactory));
     }
     else
     {
         return(null);
     }
 }
Exemplo n.º 4
0
        internal SerializableMethodCallExpression(ZetboxStreamReader binReader, StreamSerializationContext ctx, InterfaceType.Factory iftFactory)
            : base(binReader, ctx, iftFactory)
        {
            var hasObject = binReader.ReadBoolean();

            if (hasObject)
            {
                ObjectExpression = SerializableExpression.FromStream(binReader, ctx, iftFactory);
            }

            MethodName             = binReader.ReadString();
            SerializableMethodType = binReader.ReadSerializableType();
            ParameterTypes         = ReadTypeArray(binReader);
            GenericArguments       = ReadTypeArray(binReader);
        }