public static ITransformationBuilder <TContext> KeysMatchingRegex <TContext>( this ITransformationMiddlewareBuilder <TContext> transformationBuilder, string regexpr) where TContext : StringJObjectContext { var regex = new Regex(regexpr, RegexOptions.Compiled); return(transformationBuilder.KeysMatching((ctx) => regex.IsMatch(ctx.Key))); }
public static ITransformationBuilder <TContext> KeysMatching <TContext>( this ITransformationMiddlewareBuilder <TContext> middlewareBuilder, Func <TContext, bool> condition) where TContext : IContext { var builder = new TransformationBuilder <TContext>(); builder.Base = middlewareBuilder; builder.Condition = condition; return(builder); }