I've created a singleton which in the constructor goes like this:
public static class MyCertificate
{
private readonly static X509Certificate2 _singletonInstance = new X509Certificate2();
static MyCertificate()
{
if(_singletonInstance == null)
_singletonInstance = GetMyCertificateFromDatabase();
}
public static X509Certificate2 MyX509Certificate
{
get { return _singletonInstance; }
}
...
}
the MyX509Certificate property returns _sigletonInstance.
What I need to do though is debug the methods being called such as GetMyCertificateFromDatabase(). So in an.aspx.cs I have this:
protected void Page_Load(object sender, EventArgs e)
{
InsertCertificate();
}
private static void InsertCertificate()
{
X509Certificate2 certificate;
certificate = MyCerfiticate.MyX509Certificate;
}
I am not quite sure how to step through so that I can step through the methods being called that help to set that singleton. It just steps to the property then returns when I debug the InsertCertificate()