I was just going through user registration process in asp.net (System.Web.Security.Membership class) with reflector and spotted that some code was commented out
public static bool ValidateUser(string username, string password)
{
return Provider.ValidateUser(username, password);
/*
if (retVal) {
PerfCounters.IncrementCounter(AppPerfCounter.MEMBER_SUCCESS);
WebBaseEvent.RaiseSystemEvent(null, WebEventCodes.AuditMembershi开发者_运维百科pAuthenticationSuccess, username);
}
else {
PerfCounters.IncrementCounter(AppPerfCounter.MEMBER_FAIL);
WebBaseEvent.RaiseSystemEvent(null, WebEventCodes.AuditMembershipAuthenticationFailure, username);
}
return retVal;
*/
}
Now I'm puzzled with two things. 1. Does MS lives such legacy code commented out "for later" 2. How can Reflector read comments in code. After all comments shouldn't be compiled into DLL, aren't they?
精彩评论