Наследование: IRawElementProviderFragmentRoot
                private AutomationProvider AddChild()
                {
                    var child = new AutomationProvider();

                    _parent.AddChild(child);
                    return(child);
                }
 public ListItemProvider(AutomationProvider listProvider, ListItemInformation listItem) : base(listProvider, SelectionItemPattern.Pattern)
 {
     _listProvider = listProvider;
     _listItem = listItem;
     Name = listItem.Text;
     ControlType = ControlType.ListItem;
 }
Пример #3
0
 public ListItemProvider(AutomationProvider listProvider, ListItemInformation listItem) : base(listProvider, SelectionItemPattern.Pattern)
 {
     _listProvider = listProvider;
     _listItem     = listItem;
     Name          = listItem.Text;
     ControlType   = ControlType.ListItem;
 }
            public void ChildElementsAppendTheirsToTheirParents()
            {
                var child = new AutomationProvider();

                _automationProvider.AddChild(child);
                _automationProvider.RuntimeId = 123;

                child.GetRuntimeId().Should().Equal(new[] { AutomationInteropProvider.AppendRuntimeId, 123, 0 });
            }
Пример #5
0
 public AutomationProvider(AutomationProvider parent, params AutomationPattern[] patterns)
     : this(patterns)
 {
     Parent = parent;
 }
Пример #6
0
 public virtual void AddChild(AutomationProvider child)
 {
     child.Parent    = this;
     child.RuntimeId = Children.Count;
     Children.Add(child);
 }
 public void SetUp()
 {
     _automationProvider = new AutomationProvider();
 }
        public void IfYouHaveNoRootsYouMustHaveStartedItAll()
        {
            var provider = new AutomationProvider();

            provider.FragmentRoot.Should().Be(provider);
        }
 public void SetUp()
 {
     _parent = new AutomationProvider();
 }
 public void SetUp()
 {
     _parent        = new Mock <AutomationProvider>();
     _childProvider = new AutomationProvider(_parent.Object);
 }
 public AutomationProvider(AutomationProvider parent, params AutomationPattern[] patterns)
     : this(patterns)
 {
     Parent = parent;
 }
 public virtual void AddChild(AutomationProvider child)
 {
     child.Parent = this;
     child.RuntimeId = Children.Count;
     Children.Add(child);
 }