This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Alloy12.Models.Media; | |
using EPiServer.DataAbstraction.Migration; | |
using System.Data.Common; | |
using System.Data; | |
using System.Globalization; | |
using EPiServer.Data; | |
using Newtonsoft.Json; | |
using EPiServer.ServiceLocation; | |
namespace Alloy12.Business.Migrations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static IQueriedSearch<TSource, QueryStringQuery> UsingSynonyms<TSource>( | |
this IQueriedSearch<TSource> search, string queryString) | |
{ | |
search.ValidateNotNullArgument(nameof (search)); | |
if (search.Client.Settings.Admin) | |
{ | |
return new Search<TSource, QueryStringQuery>(search, context => | |
{ | |
if (!(context.RequestBody.Query is QueryStringQuery query2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Class FacetAttribute. This class cannot be inherited. | |
/// </summary> | |
[AttributeUsage(AttributeTargets.Property)] | |
public sealed class FacetAttribute : Attribute | |
{ | |
/// <summary> | |
/// Initializes a new instance of the <see cref="FacetAttribute"/> class. | |
/// </summary> | |
/// <param name="index">The index.</param> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomCatalogItemChangeManager : CatalogItemChangeManager | |
{ | |
private readonly IScheduledJobRepository scheduledJobRepository; | |
public CustomCatalogItemChangeManager( | |
IChangeNotificationManager changeNotificationManager, | |
EntryIdentityResolver entryIdentityResolver, | |
IScheduledJobRepository scheduledJobRepository) | |
: base(changeNotificationManager: changeNotificationManager, entryIdentityResolver: entryIdentityResolver) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void GetProductUrl(ProductContent product, ContentReference catalogLink, out string path) | |
{ | |
path = product.RouteSegment; | |
ContentReference parentLink = product.ParentLink; | |
if (catalogLink.CompareToIgnoreWorkID(contentReference: parentLink)) | |
{ | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Serilog": { | |
"Using": [ "Serilog.Sinks.File" ], | |
"MinimumLevel": { | |
"Default": "Information", | |
"Override": { | |
"Microsoft": "Warning", | |
"Microsoft.Hosting.Lifetime": "Information", | |
"EPiserver": "Information", | |
"EPiServer.Commerce": "Debug" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE [dbo].[tblFindTrackingQueue] | |
( | |
[Id] [bigint] IDENTITY(1,1) NOT NULL, | |
[TrackingId] [nvarchar](max) NOT NULL, | |
[NrOfHits] [int] NOT NULL, | |
[Query] [nvarchar](max) NOT NULL, | |
[Tags] [nvarchar](max) NOT NULL | |
); | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string AutoCorrect(string query) | |
{ | |
if (query.Length < 5) | |
{ | |
return query; | |
} | |
SpellCheckClient spellCheckClient = new SpellCheckClient(new ApiKeyServiceClientCredentials("Your_BING_SpellCheck_Key_Here")); | |
HttpOperationResponse<SpellCheckModel> result = spellCheckClient.SpellCheckerWithHttpMessagesAsync(text: query, mode: "spell", setLang: ContentLanguage.PreferredCulture.TwoLetterISOLanguageName).Result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Global : EPiServer.Global | |
{ | |
protected void Application_Start() | |
{ | |
// Other stuff here | |
// See: https://support.microsoft.com/en-gb/help/821268/contention-poor-performance-and-deadlocks-when-you-make-calls-to-web-s | |
// See: https://docs.microsoft.com/en-us/azure/redis-cache/cache-faq | |
SetMinThreads(); | |
SetMaxThreads(); |
NewerOlder