Example #1
0
        public CloneDebugView(Type type)
        {
            var parser         = new ObjectParser(type);
            var cloneTransform = new DeserializerTransform <object>((o, i) => clone[i](o));
            var expressions    = cloneTransform.Generate(parser, type);

            debugView = DebugViewHelper.ToString(expressions);
        }
Example #2
0
        Transcoder(RuntimeSchema schema, IParser parser)
        {
            var serializerTransform = SerializerGeneratorFactory <R, W> .Create(
                (r, w, i) => transcode[i](r, w), schema);

            var expressions = serializerTransform.Generate(parser);

            debugView = DebugViewHelper.ToString(expressions);
        }
Example #3
0
        public DeserializerDebugView(Type type)
        {
            var parser = ParserFactory <R> .Create(type);

            var expressions = new DeserializerTransform <R>(
                (r, i) => deserialize[i](r))
                              .Generate(parser, type);

            debugView = DebugViewHelper.ToString(expressions);
        }
Example #4
0
        public SerializerDebugView(Type type)
        {
            var parser = new ObjectParser(type);
            var serializerTransform = SerializerGeneratorFactory <object, W> .Create(
                (o, w, i) => serialize[i](o, w), type);

            var expressions = serializerTransform.Generate(parser);

            debugView = DebugViewHelper.ToString(expressions);
        }