Skip to content

Commit 8567bf7

Browse files
committed
docs: Extend WithCommand(params string[]) documentation
1 parent e72bacc commit 8567bf7

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

src/Testcontainers/Builders/IContainerBuilder`2.cs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,34 @@ public interface IContainerBuilder<out TBuilderEntity, out TContainerEntity, out
136136
TBuilderEntity WithEntrypoint(params string[] entrypoint);
137137

138138
/// <summary>
139-
/// Overrides the container's command arguments.
139+
/// Appends command arguments to the container configuration.
140140
/// </summary>
141+
/// <remarks>
142+
/// For modules, the specified command arguments are appended to the already pre-configured command.
143+
///
144+
/// To overwrite or replace an already pre-configured command, use <see cref="WithCommand(ComposableEnumerable{string})" />
145+
/// with <see cref="OverwriteEnumerable{T}" />.
146+
///
147+
/// For more information and examples, see
148+
/// <seealso href="https://dotnet.testcontainers.org/api/create_docker_container/#composing-command-arguments">Composing command arguments</seealso>.
149+
/// </remarks>
141150
/// <param name="command">A list of commands, "executable", "param1", "param2" or "param1", "param2".</param>
142151
/// <returns>A configured instance of <typeparamref name="TBuilderEntity" />.</returns>
143152
[PublicAPI]
144153
TBuilderEntity WithCommand(params string[] command);
145154

146155
/// <summary>
147-
/// Overrides the container's command arguments.
156+
/// Appends command arguments to the container configuration.
148157
/// </summary>
149158
/// <remarks>
150-
/// The <see cref="ComposableEnumerable{T}" /> allows to choose how existing builder configurations are composed.
159+
/// The <see cref="ComposableEnumerable{T}" /> parameter controls how the specified command arguments are composed
160+
/// with the existing container configuration.
161+
///
162+
/// Use <see cref="AppendEnumerable{T}" /> to append command arguments, or <see cref="OverwriteEnumerable{T}" /> to
163+
/// overwrite or replace an already pre-configured command.
164+
///
165+
/// For more information and examples, see
166+
/// <seealso href="https://dotnet.testcontainers.org/api/create_docker_container/#composing-command-arguments">Composing command arguments</seealso>.
151167
/// </remarks>
152168
/// <param name="command">A list of commands, "executable", "param1", "param2" or "param1", "param2".</param>
153169
/// <returns>A configured instance of <typeparamref name="TBuilderEntity" />.</returns>

0 commit comments

Comments
 (0)