Skip to content
DocsTry Aspire
DocsTry

DockerfileStatement Methods

ClassMethods1 member
Represents a statement that can be written to a Dockerfile.
WriteStatementAsync(StreamWriter, CancellationToken)Section titled WriteStatementAsync(StreamWriter, CancellationToken)abstractTask
Writes the statement to the specified writer.
public abstract class DockerfileStatement
{
public abstract Task WriteStatementAsync(
StreamWriter writer,
CancellationToken cancellationToken = default(CancellationToken))
{
// ...
}
}
writerStreamWriterThe writer to write to.
cancellationTokenCancellationTokenoptionalA cancellation token.
TaskA task representing the asynchronous write operation.