protected override void Unsubscribe() { foreach (var rApi in r_Apis) { ApiParserManager.GetParser(rApi).AfterProcessCompleted -= Subscription; } }
protected override void Unsubscribe() { foreach (var rApi in r_Apis) { ApiParserManager.GetParser(rApi).BeforeProcessStarted -= Subscription; } }
public void Subscription(ApiInfo rpInfo) { try { r_Action(rpInfo); } catch (SQLiteException e) when(e.ResultCode == SQLiteErrorCode.Error && RecordService.Instance.HistoryCommandTexts.Count > 0) { Logger.Write(LoggingLevel.Error, string.Format(StringResources.Instance.Main.Log_Exception_API_ParseException, e.Message)); RecordService.Instance.HandleException(rpInfo.Session, e); } catch (AggregateException e) when(e.InnerExceptions.Count == 1) { Logger.Write(LoggingLevel.Error, string.Format(StringResources.Instance.Main.Log_Exception_API_ParseException, e.InnerExceptions[0].Message)); RecordService.Instance.HandleException(rpInfo.Session, e); } catch (Exception e) { Logger.Write(LoggingLevel.Error, string.Format(StringResources.Instance.Main.Log_Exception_API_ParseException, e.Message)); ApiParserManager.HandleException(rpInfo.Session, e); } }
protected override void Unsubscribe() => ApiParserManager.GetParser(r_Api).AfterProcessCompleted -= Subscription;
protected override void Unsubscribe() => ApiParserManager.GetParser(r_Api).BeforeProcessStarted -= Subscription;