[Bind] Enums can now be marked as obsolete
This commit is contained in:
parent
ec34d17b21
commit
cab9e85386
2 changed files with 4 additions and 0 deletions
|
@ -505,6 +505,8 @@ namespace Bind
|
|||
sw.WriteLine("/// </summary>");
|
||||
}
|
||||
|
||||
if (@enum.IsObsolete)
|
||||
sw.WriteLine("[Obsolete(\"{0}\")]", @enum.Obsolete);
|
||||
if (@enum.IsFlagCollection)
|
||||
sw.WriteLine("[Flags]");
|
||||
sw.WriteLine("public enum " + @enum.Name + " : " + @enum.Type);
|
||||
|
|
|
@ -353,6 +353,8 @@ namespace Bind
|
|||
Type = node.GetAttribute("type", String.Empty).Trim()
|
||||
};
|
||||
|
||||
e.Obsolete = node.GetAttribute("obsolete", String.Empty).Trim();
|
||||
|
||||
if (String.IsNullOrEmpty(e.Name))
|
||||
throw new InvalidOperationException(String.Format("Empty name for enum element {0}", node.ToString()));
|
||||
|
||||
|
|
Loading…
Reference in a new issue