Esempio n. 1
0
        /// <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);
                    }
                }
            }
        }
Esempio n. 2
0
 public void PreContribute(AuditContributionContext context)
 {
     context.AuditInfo.Comments.Add("PreContribute");
 }