Пример #1
0
 public RenderingTests()
 {
     _engine = new RenderingEngine(new DefaultRenderer(), new PlainTextRendering("<null>"));
     _engine.RegisterRenderer <string>(new DefaultRenderer());
     _engine.RegisterRenderer(typeof(IDictionary), new DictionaryRenderer());
     _engine.RegisterRenderer(typeof(IList), new ListRenderer());
     _engine.RegisterRenderer(typeof(IEnumerable), new SequenceRenderer());
 }
Пример #2
0
 public ExecuteRequestHandler(IKernel kernel) : base(kernel)
 {
     _renderingEngine = new RenderingEngine(new DefaultRenderer(), new PlainTextRendering("<null>"));
     _renderingEngine.RegisterRenderer(typeof(string), new DefaultRenderer());
     _renderingEngine.RegisterRenderer(typeof(IDictionary), new DictionaryRenderer());
     _renderingEngine.RegisterRenderer(typeof(IList), new ListRenderer());
     _renderingEngine.RegisterRenderer(typeof(IEnumerable), new SequenceRenderer());
 }
Пример #3
0
 public RenderingTests()
 {
     _engine = new RenderingEngine(new DefaultRenderer());
     _engine.RegisterRenderer <string>(new DefaultRenderer());
     // _engine.RegisterRenderer(typeof(IEnumerable), new CollectionRenderer());
     _engine.RegisterRenderer(typeof(IDictionary), new DictionaryRenderer());
     _engine.RegisterRenderer(typeof(IList), new ListRenderer());
     _engine.RegisterRenderer(typeof(IEnumerable), new SequenceRenderer());
 }
Пример #4
0
        public ExecuteRequestHandler(IKernel kernel)
        {
            _kernel          = kernel;
            _renderingEngine = new RenderingEngine(new DefaultRenderer(), new PlainTextRendering("<null>"));
            _renderingEngine.RegisterRenderer <string>(new DefaultRenderer());
            _renderingEngine.RegisterRenderer(typeof(IDictionary), new DictionaryRenderer());
            _renderingEngine.RegisterRenderer(typeof(IList), new ListRenderer());
            _renderingEngine.RegisterRenderer(typeof(IEnumerable), new SequenceRenderer());

            _kernel.KernelEvents.Subscribe(this);
        }