G
Guest
hello, can anyone please tell me if the following structure is thread safe
visit.cs
class Visit : System.Web.UI.Page
{
//Variables
IVisitProtocol m_oVisitProtocol
public void Configure(IVisiteProtocol oVisiteProtocol)
{
this.m_oVisitProtocol = oVisitProtocol;
if (!this.GeneralControl(out Message))
this.m_oVisitProtocol.DisplayMessage(Message);
}
private bool GeneralControl(out string Message)
{
//checks that need to be done on evry request
Message = checks_value/string.empty;
return true/false;
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
//more code dealing with the site skeleton
}
//more Public and Private Methodes
}
product.aspx.cs
//this the code behind of product.aspx and almost evry page has the same
structure
public class product : Visit, IVisiteProtocole
{
//variables
//Public and Private Methods
override protected void OnInit(EventArgs e)
{
base.configure(this);
InitializeComponent();
base.OnInit(e);
}
//creating other classes instances
//like Product oProduct = new Product(); etc..
}
Thanks.
visit.cs
class Visit : System.Web.UI.Page
{
//Variables
IVisitProtocol m_oVisitProtocol
public void Configure(IVisiteProtocol oVisiteProtocol)
{
this.m_oVisitProtocol = oVisitProtocol;
if (!this.GeneralControl(out Message))
this.m_oVisitProtocol.DisplayMessage(Message);
}
private bool GeneralControl(out string Message)
{
//checks that need to be done on evry request
Message = checks_value/string.empty;
return true/false;
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
//more code dealing with the site skeleton
}
//more Public and Private Methodes
}
product.aspx.cs
//this the code behind of product.aspx and almost evry page has the same
structure
public class product : Visit, IVisiteProtocole
{
//variables
//Public and Private Methods
override protected void OnInit(EventArgs e)
{
base.configure(this);
InitializeComponent();
base.OnInit(e);
}
//creating other classes instances
//like Product oProduct = new Product(); etc..
}
Thanks.