开发者

Looking at Membership class with reflector

开发者 https://www.devze.com 2023-01-13 04:51 出处:网络
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

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消