Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add language to the readme.md code blocks (allows syntax highlighting). #5

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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