示例#1
0
        public static AuditTrailAdminListOptions ForSort(this AuditTrailAdminListOptions options, string value, Action <AuditTrailAdminListOptionBuilder> builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }
            if (!options.SortOptionBuilders.TryGetValue(value, out var auditTrailAdminListOptionBuilder))
            {
                auditTrailAdminListOptionBuilder  = new AuditTrailAdminListOptionBuilder(value);
                options.SortOptionBuilders[value] = auditTrailAdminListOptionBuilder;
            }
            builder(auditTrailAdminListOptionBuilder);

            return(options);
        }
示例#2
0
 public static bool RemoveSort(this AuditTrailAdminListOptions options, string value)
 => options.SortOptionBuilders.Remove(value);