public void SetComponent()
        {
            var container = TestContainer.CreateInstance();

            Measure.Method(() =>
            {
                container.SetComponent <TestComponent>();
            }).WarmupCount(1).MeasurementCount(1000).Run();
        }
        public void SetComponent_WithValue()
        {
            var container = TestContainer.CreateInstance();
            var component = new TestComponent();

            Measure.Method(() =>
            {
                container.SetComponent(component);
            }).WarmupCount(1).MeasurementCount(1000).Run();
        }
        TestContainer CreateContainerHierarchy(int depth, Action <TestContainer> mutator)
        {
            var root = TestContainer.CreateInstance(mutator);

            root.name = "Depth 0";

            var parent = root;

            for (var i = 0; i < depth; ++i)
            {
                var child = TestContainer.CreateInstance(mutator);
                parent.AddDependency(child);
                parent = child;
            }

            return(root);
        }