Share via


IncrementalGeneratorInitializationContext.RegisterHostOutput Method

Definition

Overloads

Name Description
RegisterHostOutput<TSource>(IncrementalValueProvider<TSource>, Action<HostOutputProductionContext,TSource>)

Registers an output node that will produce host-specific outputs that are not added to the compilation. Host outputs have no defined use and do not contribute to the final compilation. They are made available to the host (i.e., the development environment or build system running the generator, such as Visual Studio, dotnet build, etc.) via HostOutputs and it is up to the host to decide how to use them. The provided action will be invoked with the value from the provider whenever it changes.

RegisterHostOutput<TSource>(IncrementalValuesProvider<TSource>, Action<HostOutputProductionContext,TSource>)

Registers an output node that will produce host-specific outputs that are not added to the compilation. Host outputs have no defined use and do not contribute to the final compilation. They are made available to the host (i.e., the development environment or build system running the generator, such as Visual Studio, dotnet build, etc.) via HostOutputs and it is up to the host to decide how to use them. The provided action will be invoked once for each value from the provider whenever they change.

RegisterHostOutput<TSource>(IncrementalValueProvider<TSource>, Action<HostOutputProductionContext,TSource>)

Source:
IncrementalContexts.cs
Source:
IncrementalContexts.cs
Source:
IncrementalContexts.cs
Source:
IncrementalContexts.cs
Source:
IncrementalContexts.cs

Registers an output node that will produce host-specific outputs that are not added to the compilation. Host outputs have no defined use and do not contribute to the final compilation. They are made available to the host (i.e., the development environment or build system running the generator, such as Visual Studio, dotnet build, etc.) via HostOutputs and it is up to the host to decide how to use them. The provided action will be invoked with the value from the provider whenever it changes.

public void RegisterHostOutput<TSource>(Microsoft.CodeAnalysis.IncrementalValueProvider<TSource> source, Action<Microsoft.CodeAnalysis.HostOutputProductionContext,TSource> action);
member this.RegisterHostOutput : Microsoft.CodeAnalysis.IncrementalValueProvider<'Source> * Action<Microsoft.CodeAnalysis.HostOutputProductionContext, 'Source> -> unit
Public Sub RegisterHostOutput(Of TSource) (source As IncrementalValueProvider(Of TSource), action As Action(Of HostOutputProductionContext, TSource))

Type Parameters

TSource

The type of the value provided by the source provider

Parameters

source
IncrementalValueProvider<TSource>

An IncrementalValueProvider<TValue> that provides the input value

action
Action<HostOutputProductionContext,TSource>

An action that receives a HostOutputProductionContext and the input value, and can add host-specific outputs

Applies to

RegisterHostOutput<TSource>(IncrementalValuesProvider<TSource>, Action<HostOutputProductionContext,TSource>)

Source:
IncrementalContexts.cs
Source:
IncrementalContexts.cs
Source:
IncrementalContexts.cs
Source:
IncrementalContexts.cs
Source:
IncrementalContexts.cs

Registers an output node that will produce host-specific outputs that are not added to the compilation. Host outputs have no defined use and do not contribute to the final compilation. They are made available to the host (i.e., the development environment or build system running the generator, such as Visual Studio, dotnet build, etc.) via HostOutputs and it is up to the host to decide how to use them. The provided action will be invoked once for each value from the provider whenever they change.

public void RegisterHostOutput<TSource>(Microsoft.CodeAnalysis.IncrementalValuesProvider<TSource> source, Action<Microsoft.CodeAnalysis.HostOutputProductionContext,TSource> action);
member this.RegisterHostOutput : Microsoft.CodeAnalysis.IncrementalValuesProvider<'Source> * Action<Microsoft.CodeAnalysis.HostOutputProductionContext, 'Source> -> unit
Public Sub RegisterHostOutput(Of TSource) (source As IncrementalValuesProvider(Of TSource), action As Action(Of HostOutputProductionContext, TSource))

Type Parameters

TSource

The type of each value provided by the source provider

Parameters

source
IncrementalValuesProvider<TSource>

An IncrementalValuesProvider<TValues> that provides input values

action
Action<HostOutputProductionContext,TSource>

An action that receives a HostOutputProductionContext and an input value, and can add host-specific outputs

Applies to