Skip to content

Commit

Permalink
Fix code snippets (#494)
Browse files Browse the repository at this point in the history
Set correct range and source file for embedded code snippets.
  • Loading branch information
damirarh authored Feb 16, 2022
1 parent 6a19eb4 commit 8129fd0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/docs/advanced/generic-host.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ Generic host integration allows you to use the most current DI configuration app

Then you can configure your features:

[!code-csharp[Program](../../samples/dependency-injection/generic-host/Program.cs?range=27-34)]
[!code-csharp[Program](../../samples/dependency-injection/generic-host/Program.cs?range=27-35)]

And finally, run your program:

[!code-csharp[Program](../../samples/dependency-injection/generic-host/Program.cs?range=35-35)]
[!code-csharp[Program](../../samples/dependency-injection/generic-host/Program.cs?range=36-36)]

Below is the full source code for the generic host services example. Notice that instance of `IGreeter` will be injected into the `Program` constructor thanks to the dependency injection.

[!code-csharp[Program](../../samples/dependency-injection/custom/Program.cs?highlight=32)]
[!code-csharp[Program](../../samples/dependency-injection/generic-host/Program.cs?highlight=42)]

0 comments on commit 8129fd0

Please sign in to comment.