/// <summary> /// /// </summary> /// <param name="auditLogInfo"></param> protected virtual void ExecutePreContributors(AuditInfo auditLogInfo) { using (var scope = ServiceProvider.CreateScope()) { var context = new AuditContributionContext(scope.ServiceProvider, auditLogInfo); foreach (var contributor in Options.Contributors) { try { contributor.PreContribute(context); } catch (Exception ex) { Logger.LogException(ex, LogLevel.Warning); } } } }
public void PreContribute(AuditContributionContext context) { context.AuditInfo.Comments.Add("PreContribute"); }