public static MutateInSpecBuilder Remove <T>(this MutateInSpecBuilder builder, string path, T value, Action <MutateInRemoveOptions> configureOptions) { var options = new MutateInRemoveOptions(); configureOptions?.Invoke(options); return(builder.Remove(path, options.XAttr)); }
public static MutateInSpecBuilder <TDocument> Remove <TDocument, TContent>(this MutateInSpecBuilder <TDocument> builder, Expression <Func <TDocument, TContent> > path) { // ReSharper disable ConditionIsAlwaysTrueOrFalse if (builder == null) { ThrowHelper.ThrowArgumentNullException(nameof(builder)); } if (path == null) { ThrowHelper.ThrowArgumentNullException(nameof(path)); } // ReSharper restore ConditionIsAlwaysTrueOrFalse return((MutateInSpecBuilder <TDocument>) builder.Remove(SubDocumentPathExpressionVisitor.GetPath(builder, path))); }