protected override void CreateChildren() { base.TreeNode.Nodes.Clear(); if (this.OkayToCreateChildren()) { foreach (PropertyInfo info in this.Type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) { object val = info.GetValue(this.val, null); if ((val == null) && this.IsInput()) { val = TreeNodeProperty.CreateNewInstance(info.PropertyType); } TreeNodeProperty.CreateTreeNodeProperty(base.GetIncludedTypes(info.PropertyType), info.Name, val).RecreateSubtree(base.TreeNode); } foreach (FieldInfo info2 in this.Type.GetFields(BindingFlags.Public | BindingFlags.Instance)) { object obj3 = info2.GetValue(this.val); if ((obj3 == null) && this.IsInput()) { obj3 = TreeNodeProperty.CreateNewInstance(info2.FieldType); } TreeNodeProperty.CreateTreeNodeProperty(base.GetIncludedTypes(info2.FieldType), info2.Name, obj3).RecreateSubtree(base.TreeNode); } } }
protected override void CreateChildren() { base.TreeNode.Nodes.Clear(); if (base.InternalValue != null) { TreeNodeProperty.CreateTreeNodeProperty(stringType, "Name", this.xmlElement.Name).RecreateSubtree(base.TreeNode); TreeNodeProperty.CreateTreeNodeProperty(stringType, "NamespaceURI", this.xmlElement.NamespaceURI).RecreateSubtree(base.TreeNode); TreeNodeProperty.CreateTreeNodeProperty(stringType, "TextValue", this.xmlElement.InnerText).RecreateSubtree(base.TreeNode); ArrayList list = new ArrayList(); ArrayList list2 = new ArrayList(); if (this.xmlElement != null) { for (XmlNode node = this.xmlElement.FirstChild; node != null; node = node.NextSibling) { if (node.NodeType == XmlNodeType.Element) { list2.Add(node); } } foreach (XmlAttribute attribute in this.xmlElement.Attributes) { if ((attribute.Name != "xmlns") && !attribute.Name.StartsWith("xmlns:")) { list.Add(attribute); } } } XmlAttribute[] val = ((list.Count == 0) && !this.IsInput()) ? null : (list.ToArray(typeof(XmlAttribute)) as XmlAttribute[]); XmlElement[] elementArray = ((list2.Count == 0) && !this.IsInput()) ? null : (list2.ToArray(typeof(XmlElement)) as XmlElement[]); TreeNodeProperty.CreateTreeNodeProperty(attrArrayType, "Attributes", val).RecreateSubtree(base.TreeNode); TreeNodeProperty.CreateTreeNodeProperty(elemArrayType, "SubElements", elementArray).RecreateSubtree(base.TreeNode); } }
private void AddBody() { TreeNode parentNode = base.TreeNode.Nodes.Add("Body"); if (!this.isIn && (this.method.ReturnType != typeof(void))) { System.Type type = (this.result != null) ? this.result.GetType() : this.method.ReturnType; TreeNodeProperty.CreateTreeNodeProperty(new System.Type[] { type }, "result", this.result).RecreateSubtree(parentNode); } ParameterInfo[] parameters = this.method.GetParameters(); for (int i = 0; i < parameters.Length; i++) { if ((!this.isIn && (parameters[i].IsOut || parameters[i].ParameterType.IsByRef)) || (this.isIn && !parameters[i].IsOut)) { System.Type parameterType = parameters[i].ParameterType; if (parameterType.IsByRef) { parameterType = parameterType.GetElementType(); } object val = (this.paramValues != null) ? this.paramValues[i] : (this.isIn ? TreeNodeProperty.CreateNewInstance(parameterType) : null); TreeNodeProperty.CreateTreeNodeProperty(base.GetIncludedTypes(parameterType), parameters[i].Name, val).RecreateSubtree(parentNode); } } parentNode.ExpandAll(); }
protected override void CreateChildren() { base.TreeNode.Nodes.Clear(); foreach (PropertyInfo info in this.Type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) { object val = info.GetValue(this.proxyProperties, null); TreeNodeProperty.CreateTreeNodeProperty(base.GetIncludedTypes(info.PropertyType), info.Name, val).RecreateSubtree(base.TreeNode); } }
protected override void CreateChildren() { base.TreeNode.Nodes.Clear(); if (base.InternalValue != null) { TreeNodeProperty.CreateTreeNodeProperty(stringType, "Name", this.xmlAttribute.Name).RecreateSubtree(base.TreeNode); TreeNodeProperty.CreateTreeNodeProperty(stringType, "NamespaceURI", this.xmlAttribute.NamespaceURI).RecreateSubtree(base.TreeNode); TreeNodeProperty.CreateTreeNodeProperty(stringType, "Value", this.xmlAttribute.Value).RecreateSubtree(base.TreeNode); } }
private void AddHeaders() { TreeNode parentNode = base.TreeNode.Nodes.Add("Headers"); FieldInfo[] soapHeaders = GetSoapHeaders(this.method, this.isIn); HttpWebClientProtocol proxy = this.proxyProperty.GetProxy(); foreach (FieldInfo info in soapHeaders) { object val = (proxy != null) ? info.GetValue(proxy) : null; TreeNodeProperty.CreateTreeNodeProperty(base.GetIncludedTypes(info.FieldType), info.Name, val).RecreateSubtree(parentNode); } parentNode.ExpandAll(); }
protected override void CreateChildren() { base.TreeNode.Nodes.Clear(); if (this.OkayToCreateChildren()) { System.Type elementType = this.Type.GetElementType(); int length = this.Length; for (int i = 0; i < length; i++) { object val = this.ArrayValue.GetValue(i); if ((val == null) && this.IsInput()) { val = TreeNodeProperty.CreateNewInstance(elementType); } TreeNodeProperty.CreateTreeNodeProperty(base.GetIncludedTypes(elementType), base.Name + "_" + i.ToString(), val).RecreateSubtree(base.TreeNode); } } }