Fixes #15 by adding a new IAlgoliaIndexService and a default implementation of DefaultAlgoliaIndexService which reproduces the existing behavior.
Developers can use decoration to get access to the IAlgoliaIndexService, or use the ISearchClient directly to generate a new index.
The latter approach also allows developers to target a different index per-environment, which isn't currently possible because index names have to be const string values on the index model.
This PR also addresses the following issues:
Adds VS Code editing support with workspace settings (defines the solution file for Omnisharp)
Sets an explicit language version in Kentico.Xperience.AlgoliaSearch.csproj to C# 7.3, because this is what is compatible with netstandard2.0 which is what the library targets
Removes public modifier from all interface methods because this is not supported with C# 7.3
Also removes abstract interface method modifier which is only useful when other methods provide default implementations
Fixes XML doc comments
Fixes C# standard analyzer warnings for internal code (no public API change)
Checklist
[X] Code follows coding conventions held in this repo
[ ] Automated tests have been added
[X] Tests are passing
[X] Docs have been updated (if applicable)
[ ] Temporary settings (e.g. variables used during development and testing) have been reverted to defaults
How to test
No tests were added since the new abstraction has the exact same behavior as the existing code.
Motivation
Fixes #15 by adding a new
IAlgoliaIndexService
and a default implementation ofDefaultAlgoliaIndexService
which reproduces the existing behavior.Developers can use decoration to get access to the
IAlgoliaIndexService
, or use theISearchClient
directly to generate a new index.The latter approach also allows developers to target a different index per-environment, which isn't currently possible because index names have to be
const string
values on the index model.This PR also addresses the following issues:
Kentico.Xperience.AlgoliaSearch.csproj
to C# 7.3, because this is what is compatible withnetstandard2.0
which is what the library targetspublic
modifier from all interface methods because this is not supported with C# 7.3abstract
interface method modifier which is only useful when other methods provide default implementationsChecklist
How to test
No tests were added since the new abstraction has the exact same behavior as the existing code.
dotnet test