Example #1
0
        public WriterConventions(Options options)
        {
            Func <Exception, INode, INode, Exception> handler = (e, s, t) =>
                                                                e is FriendlyBenderException ? e : new WriterException(e);

            Mapping  = new MapConventions <ObjectNodeBase, INode>(options, handler);
            Visitors = new VisitConventions <ObjectNodeBase, INode>(options, handler);
        }
Example #2
0
 public void Setup()
 {
     _options = Options.Create();
     _source = new Node { NodeType = NodeType.Value };
     _target = new Node { NodeType = NodeType.Value };
     _conventions = new MapConventions<INode, INode>(_options,
         (e, s, t) => new MapException("The map failed yo!", e));
 }
Example #3
0
        public ReaderConventions(Options options)
        {
            _options = options;
            Func <Exception, INode, INode, Exception> handler = (e, s, t) =>
                                                                e is FriendlyBenderException ? e : new ReaderException(e);

            Mapping  = new MapConventions <INode, ObjectNodeBase>(options, handler);
            Visitors = new VisitConventions <INode, ObjectNodeBase>(options, handler);
        }
Example #4
0
 public void Setup()
 {
     _options = Options.Create();
     _source  = new Node {
         NodeType = NodeType.Value
     };
     _target = new Node {
         NodeType = NodeType.Value
     };
     _conventions = new MapConventions <INode, INode>(_options,
                                                      (e, s, t) => new MapException("The map failed yo!", e));
 }