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); }
public static bool RemoveSort(this AuditTrailAdminListOptions options, string value) => options.SortOptionBuilders.Remove(value);