/// <summary> /// Method call befor sending Excel /// </summary> /// <param name="context"></param> protected virtual void BeforeExcelSending(ExcelSendingContext context) { }
private void Deliver(ExcelMessage excel, bool async) { var excelContext = new ExcelSendingContext(excel); _interceptor.BeforeExcelSending(excelContext); if(excelContext.Cancel) { return; } if (async) { ExcelSender.SendAsync(excel, AsyncSendCompleted); return; } _interceptor.AfterExcelSend(excel); }
/// <summary> /// Implementation IExcelInterceptor /// </summary> /// <param name="context"></param> void IExcelInterceptor.BeforeExcelSending(ExcelSendingContext context) { BeforeExcelSending(context); }