示例#1
0
        private static TreeNodeWithConnectionInfo CreateVerbArgumentNode(IMetadataProvider provider, VerbArgument argument)
        {
            string text    = DocumentationBuilder.ToNodeText(argument);
            var    argNode = CreateNode(provider, text, ImageKeys.Argument, argument);

            argNode.ToolTipText = DocumentationBuilder.ToToolTip(argument);
            return(argNode);
        }
示例#2
0
        private static TreeNodeWithConnectionInfo CreateEntityNode(IMetadataProvider provider, Entity entity)
        {
            var imageKey = ImageKeys.GetImageKey(entity);
            var node     = CreateNode(provider, entity.FullName, imageKey, entity);

            node.ToolTipText = DocumentationBuilder.ToToolTip(provider.ConnectionInfo, entity);
            return(node);
        }
示例#3
0
        public static TreeNodeWithConnectionInfo CreateNamespaceNode(IMetadataProvider provider, TreeNode[] entityNodes, string namespaceName)
        {
            var name          = DocumentationBuilder.ToNodeText(namespaceName, entityNodes.Length);
            var namespaceNode = CreateNode(provider, name, ImageKeys.Namespace, namespaceName);

            namespaceNode.Nodes.AddRange(entityNodes);
            return(namespaceNode);
        }
示例#4
0
        private static TreeNodeWithConnectionInfo CreateEntityNode(IMetadataProvider provider, Entity entity, TreeNode[] childNodes)
        {
            var imageKey   = !entity.IsAbstract ? ImageKeys.BaseType : ImageKeys.BaseTypeAbstract;
            var name       = DocumentationBuilder.ToNodeText(entity.FullName, childNodes.Length);
            var entityNode = CreateNode(provider, name, imageKey, entity);

            entityNode.Nodes.AddRange(childNodes);
            return(entityNode);
        }
 public void UpdateDocumentation(TreeNode newNode)
 {
     if (newNode != null)
     {
         var doc = DocumentationBuilder.Build(newNode);
         itemTypeLabel.Text = doc.ItemType;
         docTextBox.Text    = doc.Documents;
     }
 }
示例#6
0
 private static void AddPropertiesToNode(IMetadataProvider provider, TreeNode entityNode, IEnumerable <Property> properties)
 {
     foreach (Property property in properties.OrderBy(c => c.Name))
     {
         string   name     = DocumentationBuilder.ToNodeText(property);
         var      imageKey = ImageKeys.GetImageKey(property);
         TreeNode node     = CreateNode(provider, name, imageKey, property);
         node.ToolTipText = DocumentationBuilder.ToToolTip(property);
         entityNode.Nodes.Add(node);
     }
 }
示例#7
0
        private static void AddVerbsToNode(TreeNode entityNode, Entity entity, IMetadataProvider provider)
        {
            foreach (var verb in entity.Verbs.OrderBy(v => v.Name))
            {
                TreeNode verbNode = CreateNode(provider, verb.Name, ImageKeys.Verb, verb);
                verbNode.ToolTipText = DocumentationBuilder.ToToolTip(verb);

                var argumentsPlaceholder = new ArgumentsPlaceholderTreeNode(verb, provider);
                verbNode.Nodes.Add(argumentsPlaceholder);

                entityNode.Nodes.Add(verbNode);
            }
        }