コード例 #1
0
        protected System.Tuple <Expression, Type> DeserializeExpression(XElement rootXml)
        {
            //move to ctor
            BoxSerializationTypeResolver    resolver        = new BoxSerializationTypeResolver(this);
            BoxCustomExpressionXmlConverter customConverter = new BoxCustomExpressionXmlConverter(resolver, RepoFinder.Mappings);
            ExpressionSerializer            serializer      = new ExpressionSerializer(resolver)
            {
                Converters = { customConverter }
            };

            return(new System.Tuple <Expression, Type>(serializer.Deserialize(rootXml), customConverter.QueryKind.ElementType));
        }
コード例 #2
0
        protected System.Tuple<Expression, Type> DeserializeExpression(XElement rootXml)
        {
            //move to ctor
            BoxSerializationTypeResolver resolver = new BoxSerializationTypeResolver(this);
            BoxCustomExpressionXmlConverter customConverter = new BoxCustomExpressionXmlConverter(resolver, RepoFinder.Mappings);
            ExpressionSerializer serializer = new ExpressionSerializer(resolver) { Converters = { customConverter } };

            return new System.Tuple<Expression, Type>(serializer.Deserialize(rootXml), customConverter.QueryKind.ElementType);
        }