ConfigureOptionsImageGeneratorBuilderExtensions.ConfigureOptions Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a callback that configures a ImageGenerationOptions to be passed to the next generator in the pipeline.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::AI::ImageGeneratorBuilder ^ ConfigureOptions(Microsoft::Extensions::AI::ImageGeneratorBuilder ^ builder, Action<Microsoft::Extensions::AI::ImageGenerationOptions ^> ^ configure);
public static Microsoft.Extensions.AI.ImageGeneratorBuilder ConfigureOptions(this Microsoft.Extensions.AI.ImageGeneratorBuilder builder, Action<Microsoft.Extensions.AI.ImageGenerationOptions> configure);
static member ConfigureOptions : Microsoft.Extensions.AI.ImageGeneratorBuilder * Action<Microsoft.Extensions.AI.ImageGenerationOptions> -> Microsoft.Extensions.AI.ImageGeneratorBuilder
<Extension()>
Public Function ConfigureOptions (builder As ImageGeneratorBuilder, configure As Action(Of ImageGenerationOptions)) As ImageGeneratorBuilder
Parameters
- builder
- ImageGeneratorBuilder
- configure
- Action<ImageGenerationOptions>
The delegate to invoke to configure the ImageGenerationOptions instance.
It is passed a clone of the caller-supplied ImageGenerationOptions instance (or a newly constructed instance if the caller-supplied instance is null
).
Returns
The builder
.
Exceptions
builder
or configure
is null
.
Remarks
This method can be used to set default options. The configure
delegate is passed either a new instance of ImageGenerationOptions if the caller didn't supply a ImageGenerationOptions instance, or a clone (via Clone()) of the caller-supplied instance if one was supplied.