Skip to content

Commit

Permalink
Add language to the readme.md code blocks (allows syntax highlighting).
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerHowellDfE authored Aug 7, 2024
1 parent 27ac4d5 commit 1c02057
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ The dependencies can be used in isolation or registered as a whole under a singl

In order to use the default search services it is possible to register all dependencies listed under the default composition root, in one registration, as follows:

```
```csharp
builder.Services.AddDefaultCognitiveSearchServices(builder.Configuration);
```

Alternatively, the registrations can be configured in the consuming application's IOC container, with a typical registration configured similar to the following:

```
```csharp
services.TryAddSingleton<ISearchByKeywordClientProvider, SearchByKeywordClientProvider>();
services.TryAddSingleton<ISearchIndexNamesProvider, SearchIndexNamesProvider>();
services.TryAddSingleton<ISearchByKeywordService, DefaultSearchByKeywordService>();
Expand Down Expand Up @@ -62,7 +62,7 @@ services.AddHttpClient("GeoLocationHttpClient", config =>

Typical dependency injection and search request would look something like the following,

```
```csharp
public sealed class CognitiveSearchServiceAdapter<TSearchResult> : ISearchServiceAdapter where TSearchResult : class
{
private readonly ISearchService _cognitiveSearchService;
Expand Down

0 comments on commit 1c02057

Please sign in to comment.