return (object []) list.ToArray (type);
}
+ public static bool IsMonoTODOAttribute (string s)
+ {
+ if (s == null)
+ return false;
+ if (//s.EndsWith ("MonoTODOAttribute") ||
+ s.EndsWith ("MonoDocumentationNoteAttribute") ||
+ s.EndsWith ("MonoExtensionAttribute") ||
+// s.EndsWith ("MonoInternalNoteAttribute") ||
+ s.EndsWith ("MonoLimitationAttribute") ||
+ s.EndsWith ("MonoNotSupportedAttribute"))
+ return true;
+ return s.EndsWith ("TODOAttribute");
+ }
+
protected void AddAttribute (XmlNode node, string name, string value)
{
XmlAttribute attr = document.CreateAttribute (name);
count = other.Length;
for (int i = 0; i < count; i++) {
XMLClass c = other [i];
- if (c == null || c.Name.EndsWith ("TODOAttribute"))
+ if (c == null || IsMonoTODOAttribute (c.Name))
continue;
node = document.CreateElement ("class", null);
count = other.Length;
for (int i = 0; i < count; i++) {
XMLClass c = other [i];
- if (c == null || c.Name.EndsWith ("TODOAttribute"))
+ if (c == null || IsMonoTODOAttribute (c.Name))
continue;
node = document.CreateElement ("nestedclass", null);
protected override bool CheckIfAdd (string value, XmlNode node)
{
- if (value.EndsWith ("TODOAttribute")) {
+ if (IsMonoTODOAttribute (value)) {
isTodo = true;
XmlNode pNode = node.SelectSingleNode ("properties");
- if (pNode.ChildNodes [0].Attributes ["value"] != null) {
+ if (pNode != null && pNode.ChildNodes.Count > 0 && pNode.ChildNodes [0].Attributes ["value"] != null) {
comment = pNode.ChildNodes [0].Attributes ["value"].Value;
}
return false;
{
XmlNode pNode = node.SelectSingleNode ("properties");
- if (name.EndsWith ("TODOAttribute")) {
+ if (IsMonoTODOAttribute (name)) {
isTodo = true;
if (pNode.ChildNodes [0].Attributes ["value"] != null) {
comment = pNode.ChildNodes [0].Attributes ["value"].Value;
attr.Value = value;
node.Attributes.Append (attr);
}
+
+ public static bool IsMonoTODOAttribute (string s)
+ {
+ if (s == null)
+ return false;
+ if (//s.EndsWith ("MonoTODOAttribute") ||
+ s.EndsWith ("MonoDocumentationNoteAttribute") ||
+ s.EndsWith ("MonoExtensionAttribute") ||
+// s.EndsWith ("MonoInternalNoteAttribute") ||
+ s.EndsWith ("MonoLimitationAttribute") ||
+ s.EndsWith ("MonoNotSupportedAttribute"))
+ return true;
+ return s.EndsWith ("TODOAttribute");
+ }
}
class AssemblyData : BaseData
for (int i = 0; i < atts.Length; ++i) {
Type t = atts [i].GetType ();
- if (!t.IsPublic && !t.Name.EndsWith ("TODOAttribute"))
+ if (!t.IsPublic && !IsMonoTODOAttribute ("TODOAttribute"))
continue;
// we ignore attributes that inherit from SecurityAttribute on purpose as they:
private static bool MustDocumentAttribute (Type attributeType)
{
// only document MonoTODOAttribute and public attributes
- return attributeType.Name.EndsWith ("TODOAttribute") || attributeType.IsPublic;
+ return attributeType.IsPublic || IsMonoTODOAttribute (attributeType.Name);
}
}