public void TypeNodeIsInitialized() { var node = new TypeNode(typeof(object)); Assert.AreSame(typeof(object), node.Data); Assert.AreEqual("Object", node.DisplayName); Assert.AreEqual("System.Object", node.FullName); Assert.AreEqual(Visibility.Visible, node.Visibility); Assert.IsFalse(node.IsExpanded); Assert.IsFalse(node.IsSelected); }
TypeNode INodeCreator.CreateTypeNode(Type type) { var node = new TypeNode(type); node.PropertyChanged += OnTypeNodePropertyChanged; return node; }
private void UpdateSelection(TypeNode entry) { this.selectedTypeNode = entry; this.GenericTypeParameters.Clear(); if (this.selectedTypeNode != null && this.selectedTypeNode.Data.IsGenericTypeDefinition) { foreach (var argument in this.selectedTypeNode.Data.GetGenericArguments()) { this.GenericTypeParameters.Add(new GenericTypeParameter(argument, this.serviceProvider)); } } Notify("HasGenericParameters"); this.ConcreteType = entry != null ? entry.Data : null; }
/// <summary> /// Initializes a new instance of the <see cref="SearchActionEventArgs"/> with a selected node. /// </summary> /// <param name="result">The node that should be selected by default as the result of the search /// action, or <see langword="null"/> if there is no such node.</param> public SearchActionEventArgs(TypeNode result) { this.Result = result; }