public RenderTreeDiffComputerTest()
 {
     renderer = new FakeRenderer();
     oldTree  = new RenderTreeBuilder(renderer);
     newTree  = new RenderTreeBuilder(renderer);
     diff     = new RenderTreeDiffComputer(renderer);
 }
Example #2
0
 /// <summary>
 /// Constructs an instance of <see cref="ComponentState"/>.
 /// </summary>
 /// <param name="renderer">The <see cref="Renderer"/> with which the new instance should be associated.</param>
 /// <param name="componentId">The externally visible identifer for the <see cref="IComponent"/>. The identifier must be unique in the context of the <see cref="Renderer"/>.</param>
 /// <param name="component">The <see cref="IComponent"/> whose state is being tracked.</param>
 public ComponentState(Renderer renderer, int componentId, IComponent component)
 {
     _componentId               = componentId;
     _component                 = component ?? throw new ArgumentNullException(nameof(component));
     _renderer                  = renderer ?? throw new ArgumentNullException(nameof(renderer));
     _diffComputer              = new RenderTreeDiffComputer(renderer);
     _renderTreeBuilderCurrent  = new RenderTreeBuilder(renderer);
     _renderTreeBuilderPrevious = new RenderTreeBuilder(renderer);
 }