Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I link to MSDN/official documentation from my C# XML documentation comments?

Given an XML comment on a class something like this:

///<summary>Handles the AuthenticateRequest event in the ASP.NET page request lifecycle to authenticate users.</summary>
///<remarks>
///<para>This module will authenticate users based on cookies, form posts, or an impersonation request from the  admin system.</para>
///<para>If authentication succeeds, both the <see cref="System.Threading.Thread.CurrentPrincipal" /> and the <see cref="System.Web.HttpContext.User"/> property are set to an instance of <see cref="MyPrincipal"/> representing the authenticated user.</para>
///</remarks>

How can I get the references to System.Threading.Thread.CurrentPrincipal and System.Web.HttpContext.User to link to the appropriate pages in the framework documentation?

like image 351
Dylan Beattie Avatar asked Jul 07 '11 10:07

Dylan Beattie


2 Answers

You can use href tag to link to MSDN (or any other source for that matter) and do something like this:

... both the <see href="http://msdn.microsoft.com/en-us/library/system.threading.thread.currentprincipal.aspx">System.Threading.Thread.CurrentPrincipal</see>...
like image 57
Mrchief Avatar answered Sep 25 '22 21:09

Mrchief


Based on this url, the msdn url cheatsheet

and these two experiments applying the things learned from the cheatsheet

link to 1.1 version of frameworkclass

System.Threading.Thread.CurrentPrincipal

link to 4.0 version of frameworkclass

System.Threading.Thread.CurrentPrincipal

like image 29
rene Avatar answered Sep 24 '22 21:09

rene