Monitors dynamic SQL execution in applications that use dotConnect for Adobe Commerce.
This sample shows how to enable SQL monitoring in console and web applications. To activate monitoring for web applications, a Devart.Data.Magento.MagentoMonitor object may be added to the Application collection at the first load of the default page.
// Console application
[MTAThread]
static void Main(string[] args)
{
MagentoMonitor adobe commerceMonitor = new MagentoMonitor();
adobe commerceMonitor.IsActive = true;
...
}
// Web application
void Page_Load(object sender, EventArgs e)
{
if (Application["mon"] == null)
Application.Add("mon", new Devart.Data.Magento.MagentoMonitor() {IsActive = true});
}
' Console application
<MTAThread()> _
Sub Main()
Dim adobe commerceMonitor As MagentoMonitor = New MagentoMonitor
adobe commerceMonitor.IsActive = True
...
End Sub
// Web application
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Application("mon") Is Nothing Then
Application.Add("mon", New Devart.Data.Magento.MagentoMonitor() With {.IsActive = True})
End If
End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2