Skip to content

Commit

Permalink
Fix typo incremental-generators.cookbook.md (#74642)
Browse files Browse the repository at this point in the history
  • Loading branch information
elisauhura committed Sep 5, 2024
1 parent 71134f1 commit 07d7a21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/features/incremental-generators.cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ Now, consider that the generator author wants to optionally allow opting in/out
This value of `MyGenerator_EnableLogging` will be emitted to a generated analyzer config file, for each of the additional files in the compilation, with an item name of `build_metadata.AdditionalFiles.MyGenerator_EnableLogging`. The generator can read this value in the context of each additional file:

```cs
context.AdditionalFilesProvider
context.AdditionalTextsProvider
.Combine(context.AnalyzerConfigOptionsProvider)
.Select((pair, ctx) =>
pair.Right.GetOptions(pair.Left).TryGetValue("build_metadata.AdditionalFiles.MyGenerator_EnableLogging", out var perFileLoggingSwitch)
Expand Down

0 comments on commit 07d7a21

Please sign in to comment.