protected override void LoadExtraData(string name, XmlNode node) { XmlNode pNode = node.SelectSingleNode("properties"); if (IsMonoTODOAttribute(name)) { isTodo = true; if (pNode.ChildNodes [0].Attributes ["value"] != null) { comment = pNode.ChildNodes [0].Attributes ["value"].Value; } return; } if (MasterUtils.IsImplementationSpecificAttribute(name)) { return; } if (pNode != null) { XMLAttributeProperties p = new XMLAttributeProperties(name); p.LoadData(pNode); IDictionary <string, XMLAttributeProperties> properties = Properties; if (properties.ContainsKey(name)) { properties [name] = p; } else { properties.Add(name, p); } } }
public MasterAttribute(string name, XMLAttributeProperties properties) : base(name) { var sb = new StringBuilder (); if (properties == null) return; IDictionary<string, string> props = properties.Properties; if (props.Count == 0) return; if (name == "System.Runtime.CompilerServices.TypeForwardedToAttribute") { string dest; if (props.TryGetValue ("Destination", out dest) && !String.IsNullOrEmpty (dest)) sb.AppendFormat ("[assembly: TypeForwardedToAttribute (typeof ({0}))]", dest); } else { sb.Append ("<b>Properties:</b>\n"); foreach (var prop in props) sb.AppendFormat ("\t\t<i>{0}</i> == {1}\n", prop.Key, FormatStringValue (prop.Value)); sb.Append ('\n'); } ExtraInfo = sb.ToString (); }
public MasterAttribute(string name, XMLAttributeProperties properties) : base(name) { var sb = new StringBuilder(); if (properties == null) { return; } IDictionary <string, string> props = properties.Properties; if (props.Count == 0) { return; } foreach (var entry in props) { Properties.Add(entry.Key, entry.Value); } if (name == "System.Runtime.CompilerServices.TypeForwardedToAttribute") { string dest; if (props.TryGetValue("Destination", out dest) && !String.IsNullOrEmpty(dest)) { sb.AppendFormat("[assembly: TypeForwardedToAttribute (typeof ({0}))]", dest); } } else { sb.Append("<b>Properties:</b>\n"); foreach (var prop in props) { sb.AppendFormat("\t\t<i>{0}</i> == {1}\n", prop.Key, FormatStringValue(prop.Value)); } sb.Append('\n'); } ExtraInfo = sb.ToString(); }
protected override void LoadExtraData (string name, XmlNode node) { XmlNode pNode = node.SelectSingleNode ("properties"); if (IsMonoTODOAttribute (name)) { isTodo = true; if (pNode.ChildNodes [0].Attributes ["value"] != null) { comment = pNode.ChildNodes [0].Attributes ["value"].Value; } return; } if (MasterUtils.IsImplementationSpecificAttribute (name)) return; if (pNode != null) { XMLAttributeProperties p = new XMLAttributeProperties (name); p.LoadData (pNode); IDictionary <string, XMLAttributeProperties> properties = Properties; if (properties.ContainsKey (name)) properties [name] = p; else properties.Add (name, p); } }