@@ -278,6 +278,32 @@ public GeneratorStringBuilder ForEachAppendBody<T>(IEnumerable<T> items, Func<T,
278
278
items ,
279
279
itemFormatter : ( g , item ) => g . AppendBody ( itemFormatter ( item ) )
280
280
) ;
281
+
282
+
283
+
284
+ /// <summary>
285
+ /// Appends the content of each item in the provided enumerable to the builder
286
+ /// by formatting them as body content as an indented body.
287
+ /// </summary>
288
+ /// <param name="items">The collection of strings to be appended as body content.</param>
289
+ /// <returns>The current instance of <see cref="GeneratorStringBuilder" />, allowing for method chaining.</returns>
290
+ public GeneratorStringBuilder ForEachAppendBodyIndented ( IEnumerable < string > items ) => ForEach ( items , itemFormatter : ( g , item ) => g . AppendBodyIndented ( item ) ) ;
291
+
292
+ /// <summary>
293
+ /// Iterates over the specified enumerable collection and appends the formatted body content for each item
294
+ /// using the provided item formatter function an indented body.
295
+ /// </summary>
296
+ /// <typeparam name="T">The type of the items in the enumerable collection.</typeparam>
297
+ /// <param name="items">The collection of items to iterate over.</param>
298
+ /// <param name="itemFormatter">
299
+ /// A function that formats each item into a string representation. This formatted value is appended as body content
300
+ /// using <see cref="AppendBody" />.
301
+ /// </param>
302
+ /// <returns>The current instance of <see cref="GeneratorStringBuilder" />, allowing for method chaining.</returns>
303
+ public GeneratorStringBuilder ForEachAppendBodyIndented < T > ( IEnumerable < T > items , Func < T , string > itemFormatter ) => ForEach (
304
+ items ,
305
+ itemFormatter : ( g , item ) => g . AppendBodyIndented ( itemFormatter ( item ) )
306
+ ) ;
281
307
282
308
/// <summary>
283
309
/// Iterates through a collection of items, applying a specified action for each item.
0 commit comments