Mono.CSharp.CSharpCodeGenerator.GenerateComment C# (CSharp) Method

GenerateComment() protected method

protected GenerateComment ( CodeComment comment ) : void
comment CodeComment
return void
		protected override void GenerateComment (CodeComment comment)
		{
			TextWriter output = Output;

			string commentChars = null;

			if (comment.DocComment) {
				commentChars = "///";
			} else {
				commentChars = "//";
			}

			output.Write (commentChars);
			output.Write (' ');
			string text = comment.Text;

			for (int i = 0; i < text.Length; i++) {
				output.Write (text[i]);
				if (text[i] == '\r') {
					if (i < (text.Length - 1) && text[i + 1] == '\n') {
						continue;
					}
					output.Write (commentChars);
				} else if (text[i] == '\n') {
					output.Write (commentChars);
				}
			}

			output.WriteLine ();
		}
CSharpCodeGenerator