Click here to Skip to main content
Click here to Skip to main content
Technical Blog

Modifying GhostDoc XML Comment

, 15 Mar 2010 CDDL
Rate this:
Please Sign up or sign in to vote.
Today while browsing I came across Matthew M. Osborn’s Blog and I found this fantastic line“Documentation is the coders best and worst friend. It is a two sided sword, it makes your life easier but no one likes writing it. So coders do what we do best and find a way to make [...]

Today while browsing I came across Matthew M. Osborn’s Blog and I found this fantastic line

“Documentation is the coders best and worst friend. It is a two sided sword, it makes your life easier but no one likes writing it. So coders do what we do best and find a way to make the computer do it for us.”

Ideally I use GhostDoc to make comments for my codes and really it works fine for me. From the very first day since I have been using this, I always thought whether I can change the xml documentation as per my need or not.

Today I have found a simple trick to add to custom node to the xml commenting.

Here was my scenario,

All my method/class/event level comment must include author name along with the time when it was written.

For this I need to add the following lines in the Ghost Doc > Options > Custom Texts

<author>$(Environment.UserName)</author>
<datetime>$(Environment.Date)-$(Environment.Time)</datetime>

And the ghost doc generated comment contains author and datetime tag!!!

///<span class="code-SummaryComment"><summary>
</span>/// Gets the user by ID.
///<span class="code-SummaryComment"></summary>
</span>///<span class="code-SummaryComment"><param name=”ID”>The ID.</param>
</span>///<span class="code-SummaryComment"><returns></returns>
</span>///<span class="code-SummaryComment"><author>Mahmudul.Haque</author>
</span>///<span class="code-SummaryComment"><datetime>3/15/2010-11:23 AM</datetime>
</span>private static User GetUserByID(long ID)
{
User user = new User();
return user;
}

License

This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)

Share

About the Author

Mahmudul Haque Azad
Software Developer (Senior) Vizrt Bangladesh
Bangladesh Bangladesh
I am truly versatile and 360 degree Engineer having wide range of development experience in .NET and Java Platform. I am also proficient in system level programming in C++. To me technology is not at all a problem, it’s the client requirement that matters! That is I am ready and comfortable to use any technology to make the business of my client a success.
 
In my five years of experience I have the opportunities to work for fortune 500 companies of US and many renowned clients from Europe.
 
My Linkedin Profile: http://bd.linkedin.com/in/mahmudazad
Follow on   Twitter

Comments and Discussions

 
GeneralAtomineerUtils Pro [modified] PinmemberZot Williams1-Sep-10 20:23 
GeneralRe: AtomineerUtils Pro PinmemberMahmudul Haque Azad2-Sep-10 5:52 
GeneralNice article Pinmembersalmanzaman1-Apr-10 21:36 
GeneralRe: Nice article PinmemberMahmudul Haque Azad8-Apr-10 21:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141220.1 | Last Updated 15 Mar 2010
Article Copyright 2010 by Mahmudul Haque Azad
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid