internal static void Check() { while (On) { try { Session IrSe; lock (CheckRequest) { IrSe = CheckRequest.Dequeue(); } if (IrSe != null) { PluginStore.RunAllRequestBasedOfflinePassivePlugins(IrSe); } } catch (InvalidOperationException) { } catch (Exception Exp) { IronException.Report("Error Running Offline Plugins on Request", Exp.Message, Exp.StackTrace); } try { Session IrSe; lock (CheckResponse) { IrSe = CheckResponse.Dequeue(); } if (IrSe != null) { PluginStore.RunAllResponseBasedOfflinePassivePlugins(IrSe); } } catch (InvalidOperationException) { Thread.Sleep(500); } catch (Exception Exp) { IronException.Report("Error Running Offline Plugins on Response", Exp.Message, Exp.StackTrace); } } }
public static void RunAllResponseBasedOfflinePassivePlugins(Session IrSe) { foreach (string Name in PassivePlugin.List()) { PassivePlugin P = PassivePlugin.Get(Name); if ((P.WorksOn == PluginWorksOn.Response) || (P.WorksOn == PluginWorksOn.Both)) { if (P.CallingState == PluginCallingState.Offline) { try { PluginStore.RunPassivePlugin(P, IrSe); } catch (Exception Exp) { IronException.Report("Error executing 'Offline' Passive Plugin : " + Name, Exp.Message, Exp.StackTrace); } } } } }
public static void RunAllRequestBasedInlinePassivePlugins(Session IrSe) { foreach (string Name in PassivePlugin.GetInLinePluginsForRequest()) { PassivePlugin P = PassivePlugin.Get(Name); if ((P.WorksOn == PluginWorksOn.Request) || (P.WorksOn == PluginWorksOn.Both)) { if (P.CallingState == PluginCallingState.Inline) { try { PluginStore.RunPassivePlugin(P, IrSe); } catch (Exception Exp) { IronException.Report("Error executing 'BeforeRequestInterception' Passive Plugin - " + Name, Exp.Message, Exp.StackTrace); } } } } }