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 System; | |
using EPiServer.PlugIn; | |
using EPiServer.Scheduler; | |
using EPiServer.ServiceLocation; | |
using Microsoft.ApplicationInsights; | |
namespace DemoSite.ScheduledJobs; | |
[ScheduledPlugIn( | |
DisplayName = "Sample job", |
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 System; | |
using System.Text.Json; | |
using Hangfire.Server; | |
using Microsoft.ApplicationInsights; | |
using Microsoft.ApplicationInsights.DataContracts; | |
using Microsoft.ApplicationInsights.Extensibility; | |
namespace DemoSite.Hangfire; | |
public class ApplicationInsightsJobFilter : IServerFilter |
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
// Copyright 2019 Stefan Holm Olsen | |
// | |
// Permission to use, copy, modify, and/or distribute this software for an | |
// purpose with or without fee is hereby granted, provided that the above | |
// copyright notice and this permission notice appear in all copies. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
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 Microsoft.AspNetCore.Builder; | |
using Microsoft.Net.Http.Headers; | |
public class Startup | |
{ | |
public void Configure(IApplicationBuilder app) | |
{ | |
var staticFileOptions = new StaticFileOptions | |
{ | |
OnPrepareResponse = context => |
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
// Copyright 2019 Stefan Holm Olsen | |
// | |
// Permission to use, copy, modify, and/or distribute this software for an | |
// purpose with or without fee is hereby granted, provided that the above | |
// copyright notice and this permission notice appear in all copies. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
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
// Copyright 2019 Stefan Holm Olsen | |
// | |
// Permission to use, copy, modify, and/or distribute this software for an | |
// purpose with or without fee is hereby granted, provided that the above | |
// copyright notice and this permission notice appear in all copies. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
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 DummyEntityListener : IEntityListener | |
{ | |
private LoggingScope _loggingScope; | |
public inRiverContext Context { get; set; } | |
public Dictionary<string, string> DefaultSettings => new Dictionary<string, string> | |
{ | |
{ SettingsConstants.DisableTelemetry, "TRUE" }, | |
{ SettingsConstants.InstrumentationKey, "REPLACE ME" } | |
}; |
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 System.Threading.Tasks; | |
using SendGrid; | |
using SendGrid.Helpers.Mail; | |
namespace EPiServer.Reference.Commerce.Site.Features.Mail.Services | |
{ | |
public class SendGridMailService : ITemplateMailService | |
{ | |
private readonly ISendGridSettings _settings; | |
private readonly ISendGridClient _sendGridClient; |
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
{ | |
"query":"mutation AddToCartMutation($input: AddToCartInput!) { | |
addToCart(input: $input) { | |
cart { | |
total { | |
amount | |
currencyCode | |
formattedAmount | |
} | |
} |
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
<FieldMapping xmlns="http://stefanolsen.com/CatalogFeed.GoogleMerchant/MappingDocument.xsd"> | |
<ContentType CommerceType="CatalogNode"> | |
<Fields> | |
<MappedField MetaField="GoogleProductCategoryId" FeedField="google_product_category"/> | |
</Fields> | |
</ContentType> | |
<ContentType CommerceType="Product"> | |
<Fields> | |
<MappedField MetaField="DisplayName" FeedField="title"/> |
NewerOlder