/// <summary>
		/// Builds code document from specified source code.
		/// </summary>
		private static CsDocument BuildCodeDocument(string sourceCode)
		{
			string tempFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "CodeHelperTest.cs");
			File.WriteAllText(tempFile, sourceCode);

			CodeProject project = new CodeProject(0, string.Empty, new Configuration(null));
			CsParser parser = new CsParser();
			parser.FileTypes.Add("CS");
			parser.PreParse();

			CodeFile file = new CodeFile(tempFile, project, parser);

			CodeDocument doc = null;
			parser.ParseFile(file, 0, ref doc);

			File.Delete(tempFile);

			return (CsDocument)doc;
		}
 public static CsDocument ParseCsFile(string filePath, CodeProject project)
 {
     var csharpParser = new CsParser();
     var sourceCode = new CodeFile(Path.GetFullPath(filePath), project, csharpParser);
     return Parse(sourceCode, project);
 }