Skip to content

Commit

Permalink
beautify
Browse files Browse the repository at this point in the history
  • Loading branch information
bkapustik committed Feb 8, 2024
1 parent d4e9d96 commit 8d4fdb2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
4 changes: 0 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,6 @@ dotnet_naming_rule.members_are_pascal_case.symbols = memb
dotnet_naming_rule.members_are_pascal_case.style = const_field_symbols
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_primary_constructors = true:suggestion
[*.{cs,vb}]
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
indent_size = 4
end_of_line = crlf
dotnet_style_coalesce_expression = true:error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Kentico.Xperience.Algolia.Admin.Providers;

public class ChannelOptionsProvider : IDropDownOptionsProvider
internal class ChannelOptionsProvider : IDropDownOptionsProvider
{
private readonly IInfoProvider<ChannelInfo> channelInfoProvider;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Kentico.Xperience.Algolia.Admin;

public class IndexingStrategyOptionsProvider : IDropDownOptionsProvider
internal class IndexingStrategyOptionsProvider : IDropDownOptionsProvider
{
public Task<IEnumerable<DropDownOptionItem>> GetOptionItems() =>
Task.FromResult(StrategyStorage.Strategies.Keys.Select(x => new DropDownOptionItem()
Expand Down
2 changes: 1 addition & 1 deletion src/Kentico.Xperience.Algolia/AlgoliaSearchModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal class AlgoliaSearchModule : Module
private IAlgoliaTaskLogger? algoliaTaskLogger;
private IAppSettingsService? appSettingsService;
private IConversionService? conversionService;
private const string APP_SETTINGS_KEY_INDEXING_DISABLED = "AlgoliaSearchDisableIndexing";
private const string APP_SETTINGS_KEY_INDEXING_DISABLED = "CMSAlgoliaSearchDisableIndexing";

private bool IndexingDisabled => conversionService?.GetBoolean(appSettingsService?[APP_SETTINGS_KEY_INDEXING_DISABLED], false) ?? false;

Expand Down
7 changes: 5 additions & 2 deletions src/Kentico.Xperience.Algolia/AlgoliaStartupExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Algolia.Search.Clients;
using System.Diagnostics;
using Algolia.Search.Clients;
using Kentico.Xperience.Algolia.Admin;
using Kentico.Xperience.Algolia.Indexing;
using Microsoft.Extensions.Configuration;
Expand Down Expand Up @@ -30,7 +31,9 @@ public static IServiceCollection AddKenticoAlgolia(this IServiceCollection servi
{
var options = s.GetRequiredService<IOptions<AlgoliaOptions>>();
var configuration = new SearchConfig(options.Value.ApplicationId, options.Value.ApiKey);
configuration.DefaultHeaders["User-Agent"] = "Kentico Xperience for Algolia (2.0.2)";
var fileVersion = FileVersionInfo.GetVersionInfo(typeof(AlgoliaOptions).Assembly.Location);
string versioNumber = new Version(fileVersion.FileVersion ?? "").ToString(3);
configuration.DefaultHeaders["User-Agent"] = $"Kentico Xperience for Algolia ({versioNumber})";

return new SearchClient(configuration);
})
Expand Down

0 comments on commit 8d4fdb2

Please sign in to comment.