M
MuZZy
Hi,
I need to be able to find out if the assembly is currently used by an
asp.net app or a windows app.
Assembly contains a class which has an object factory, but this object
factory should throw an exception if used in asp.net app.
//-------------
public class CLogin
{
public static string m_sUser;
public static string m_sServer;
public static string m_sDatabase;
CLogin(sUser, sServer, sDatabase)
{
m_sUser = sUser;
m_sServer = sServer;
m_sDatabase = sDatabase;
}
}
//------------
public class CConnection
{
public CConnection Create()
{
if (!SomeCheckIfCalledFromWindowsApp())
throw new Exception("Do not use this factory in asp.net app!");
return new CConnection(CLogin.m_sUser, CLogin.m_sServer,
CLogin.m_sDatabase);
}
}
//-------------
Any ideas would be appreciated!
Thank you,
Andrey
I need to be able to find out if the assembly is currently used by an
asp.net app or a windows app.
Assembly contains a class which has an object factory, but this object
factory should throw an exception if used in asp.net app.
//-------------
public class CLogin
{
public static string m_sUser;
public static string m_sServer;
public static string m_sDatabase;
CLogin(sUser, sServer, sDatabase)
{
m_sUser = sUser;
m_sServer = sServer;
m_sDatabase = sDatabase;
}
}
//------------
public class CConnection
{
public CConnection Create()
{
if (!SomeCheckIfCalledFromWindowsApp())
throw new Exception("Do not use this factory in asp.net app!");
return new CConnection(CLogin.m_sUser, CLogin.m_sServer,
CLogin.m_sDatabase);
}
}
//-------------
Any ideas would be appreciated!
Thank you,
Andrey