FileGenerator.Drawables.DrawableTypes.GetCommentLines C# (CSharp) Method

GetCommentLines() public method

public GetCommentLines ( ConstructorInfo constructor ) : IEnumerable
constructor System.Reflection.ConstructorInfo
return IEnumerable
    public IEnumerable<string> GetCommentLines(ConstructorInfo constructor)
    {
      string memberName = "M:" + constructor.DeclaringType.FullName + ".#" + constructor.ToString().Substring(6);
      memberName = memberName.Replace("()", "");
      memberName = memberName.Replace(", ", ",");
      memberName = memberName.Replace("Boolean", "System.Boolean");
      memberName = memberName.Replace("Double", "System.Double");
      memberName = memberName.Replace("Int32", "System.Int32");
      if (memberName.Contains("IEnumerable"))
      {
        memberName = memberName.Replace("`1[", "{");
        memberName = memberName.Replace("])", "})");
      }

      var comment = _Comments.XPathSelectElement("/doc/members/member[@name='" + memberName + "']");
      if (comment == null)
        throw new NotImplementedException(memberName);

      foreach (var node in comment.Nodes())
      {
        foreach (string line in node.ToString().Split('\n'))
          yield return "/// " + line.Trim();
      }
    }