Skip to content

Commit

Permalink
Merge pull request #5 from RogerHowellDfE/add-language-to-markdown-co…
Browse files Browse the repository at this point in the history
…de-blocks

Add language to the readme.md code blocks (allows syntax highlighting).
  • Loading branch information
RogerHowellDfE authored Aug 7, 2024
2 parents 0f11543 + 1c02057 commit 495c71e
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 495c71e

Please sign in to comment.