Skip to content

Commit 1ac7f25

Browse files
committed
line numbers
1 parent 53bd17c commit 1ac7f25

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/azure/sdk/aspnetcore-guidance.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ Complete the following steps to register the services you need:
3737
3838
3. In the `Program.cs` file of your app, invoke the `AddAzureClients` extension method from the `Microsoft.Extensions.Azure` library to register a client for each service. Some services use additional subclients, which you can also register for dependency injection.
3939
40-
:::code language="csharp" source="snippets/aspnetcore-guidance/BlazorSample/Program.cs" range="11-30":::
40+
:::code language="csharp" source="snippets/aspnetcore-guidance/BlazorSample/Program.cs" range="11-30" highlight="4-7,11-16":::
4141
4242
4. Inject the registered services into your ASP.NET Core app components, services, or API endpoint methods:
4343
4444
<!-- markdownlint-disable MD023 -->
4545
## [Minimal API](#tab/api)
4646
47-
:::code language="csharp" source="snippets/aspnetcore-guidance/MinApiSample/Program.cs" range="44-59" highlight="44,47,48":::
47+
:::code language="csharp" source="snippets/aspnetcore-guidance/MinApiSample/Program.cs" range="44-59" highlight="1,3,4":::
4848
4949
<!-- markdownlint-disable MD023 -->
5050
## [Blazor](#tab/blazor)
@@ -64,7 +64,7 @@ Use the [Azure Identity client library](/dotnet/api/overview/azure/identity-read
6464
6565
Consider the following use of `DefaultAzureCredential`:
6666
67-
:::code language="csharp" source="snippets/aspnetcore-guidance/BlazorSample/Program.cs" range="11-30" highlight="29":::
67+
:::code language="csharp" source="snippets/aspnetcore-guidance/BlazorSample/Program.cs" range="11-30" highlight="19":::
6868
6969
In the preceding code, the `clientBuilder.UseCredential()` method accepts an instance of `DefaultAzureCredential` to reuse across your registered services. `DefaultAzureCredential` discovers available credentials in the current environment and use them to connect to Azure services. The complete order and locations that `DefaultAzureCredential` looks for credentials lives in the [`Azure Identity library overview`](/dotnet/api/overview/azure/Identity-readme#defaultazurecredential).
7070
@@ -116,7 +116,7 @@ At some point, you may want to change default Azure client configurations global
116116
117117
2. In the `Program.cs` file, the `ConfigureDefaults` extension method `AddAzureClients` retrieves the default settings and applies them to your services:
118118
119-
:::code language="csharp" source="snippets/aspnetcore-guidance/MinApiSample/Program.cs" range="13-31" highlight="29,30":::
119+
:::code language="csharp" source="snippets/aspnetcore-guidance/MinApiSample/Program.cs" range="13-31" highlight="6-7":::
120120
121121
## Configure logging
122122

0 commit comments

Comments
 (0)