Search code examples
.netasp.net-membershipreflector

How to read the .NET reflector --- for MemberShipProvider


I am implementing the MembershipProvider. So I want to refer to the implementation of sqlMemberShipProvider by Microsoft in .NET reflector and find an interesting thing:

for RequiresQuestionAndAnswer, it retrieve value of _RequiresQuestionAndAnswer directly.

public override bool RequiresQuestionAndAnswer
{
    get
    {
        return this._RequiresQuestionAndAnswer;
    }
}

But where the _RequiresQuestionAndAnswer get the value? I think there must be some logic retrieve value from web.config, right? But I can't find. Why? Where is the code?


Solution

  • As of Version 6.6:

    1. Click on the backing _RequiresQuestionAndAnswer field in the getter-body. This will take you to the field-declaration and highlight the field on the browser-panel.
    2. Right-Click on the field on the browser-panel and choose Analyze on the context-menu.
    3. Open up the Assigned By node from the analyzer-tree. Notice that the only method assigning to the field is the public Initialize method.
    4. Right-click on the method and choose Go to Member on the context-menu. You will see that this method assigns the field to the value of a call to SecUtility.GetBooleanValue with appropriate arguments.
    5. For further information, investigate the implementation of this method by clicking on the method-call.