Ejemplo n.º 1
0
        public static AuditTrailCategoryDescriptorBuilder For <TLocalizer>(this AuditTrailOptions options, string categoryName, Func <IStringLocalizer, LocalizedString> localizedName) where TLocalizer : class
        {
            if (!options.CategoryDescriptorBuilders.TryGetValue(categoryName, out var auditTrailCategoryDescriptorBuilder))
            {
                auditTrailCategoryDescriptorBuilder = new AuditTrailCategoryDescriptorBuilder <TLocalizer>(categoryName, localizedName);
                options.CategoryDescriptorBuilders[categoryName] = auditTrailCategoryDescriptorBuilder;
            }

            return(auditTrailCategoryDescriptorBuilder);
        }
Ejemplo n.º 2
0
 public static bool Remove(this AuditTrailOptions options, string categoryName)
 => options.CategoryDescriptorBuilders.Remove(categoryName);