Programming in C#
|
Top Previous Next |
HTTPAnalyzer Automation Common Library
|
The common library which defines most of the automation interfaces. Both Stand-alone and IE add-on editions need the library.
|
HTTPAnalyzer Stand-alone Automation Library
|
The stand-alone automation library includes the creatable object, IHTTPAnalyzerStandalone, which controls the HTTPAnalyzer Stand-alone out-proc COM server.
|
HTTPAnalyzer IE Add-on Library
|
The IE Add-on automation library includes the creatable object, IHTTPAnalyzerAddon, which controls the HTTPAnalyzer IE Add-on.
|
HTTPAnalyzer Firefox Add-on Library
|
The Firefox Add-on automation library includes the creatable object, IHTTPAnalyzerFirefox, which controls the HTTPAnalyzer Firefox Add-on.
|
using System.Runtime.InteropServices;// Includes the COMException class
using HTTPAnalyzer;//adding a reference to "HTTPAnalyzer Automation Common Library" using HTTPAnalyzerStd;//adding a reference to "HTTPAnalyzer Stand-alone Automation Library" ....... private void handleOnNewEntryEvent(ILogEntry logEntry, ref bool DiscardIt) { ;//do something on adding a new log entry } private void handleOnUpdateEntryEvent(ILogEntry logEntry) { ;//do something on updating log entry } IHTTPAnalyzerStandAlone standalone = new HTTPAnalyzerStandAloneClass(); standalone.Visible = true standalone.AttachProcessByID(Process.GetCurrentProcess().Id); standalone.OnNewEntry+= handleOnNewEntryEvent; standalone.OnUpdateEntry += handleOnUpdateEntryEvent; standalone.Start(); ...... standalone.Stop(); foreach (ILogEntry entry in standalone.Log) { Console.WriteLine(entry.URL); entry.Request;//get request entry.Response;//get response entry.Content;//get reqest content. // do something } |
using System.Runtime.InteropServices;// Includes the COMException class
using HTTPAnalyzer;//adding a reference to "HTTPAnalyzer Automation Common Library" using IEHTTPAnalyzer;//adding a reference to "HTTPAnalyzer IE Add-on Library" ....... private void handleOnNewEntryEvent(ILogEntry logEntry, ref bool DiscardIt) { ;//do something on adding a new log entry } private void handleOnUpdateEntryEvent(ILogEntry logEntry) { ;//do something on updating log entry } HTTPAnalyzerAddOnClass addon=new HTTPAnalyzerAddonClass(); addon.start(); addon.OnNewEntry+= handleOnNewEntryEvent; addon.OnUpdateEntry += handleOnUpdateEntryEvent; addon.NavigateAndWait("http://www.ieinspector.com", -1); ......... addon.Stop(); foreach (ILogEntry entry in addon.log) { Console.WriteLine(entry.URL); entry.Request;//get request entry.Response;//get response entry.Content;//get reqest content. // do something } |
using System.Runtime.InteropServices;// Includes the COMException class
using HTTPAnalyzer;//adding a reference to "HTTPAnalyzer Automation Common Library" using IEHTTPAnalyzer;//adding a reference to "HTTPAnalyzer Firefox Add-on Library" ....... private void handleOnNewEntryEvent(ILogEntry logEntry, ref bool DiscardIt) { ;//do something on adding a new log entry } private void handleOnUpdateEntryEvent(ILogEntry logEntry) { ;//do something on updating log entry } HTTPAnalyzerFirefoxClass addon=new HTTPAnalyzerFirefoxClass(); addon.start(); addon.OnNewEntry+= handleOnNewEntryEvent; addon.OnUpdateEntry += handleOnUpdateEntryEvent; addon.NavigateAndWait("http://www.ieinspector.com", -1); ......... addon.Stop(); foreach (ILogEntry entry in addon.log) { Console.WriteLine(entry.URL); entry.Request;//get request entry.Response;//get response entry.Content;//get reqest content. // do something } |