This file contains hidden or 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 EPiServer; | |
using EPiServer.Cms.UI.AspNetIdentity; | |
using EPiServer.Core; | |
using EPiServer.Logging; | |
using EPiServer.Notification; | |
using EPiServer.ServiceLocation; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Identity; | |
using Microsoft.AspNetCore.Mvc; | |
using Newtonsoft.Json; |
This file contains hidden or 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
<component type="typeof(Counter)" render-mode="ServerPrerendered" | |
param-Count="@Model.StartCount" /> | |
___above in cshtml________below in razor____________ | |
@using Microsoft.AspNetCore.Components | |
<p>Current count: @Count</p> | |
<button @onclick="IncrementCount" class="btn btn-primary">Click me</button> |
This file contains hidden or 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 Azure.Storage.Blobs; | |
public string UploadJsonToAzureBlobStorage(string json) | |
{ | |
// Name of the share, directory, and file | |
string shareName = ConfigurationManager.AppSettings.Get("inRiver.StorageAccountShareReference"); | |
string storageAccountName = ConfigurationManager.AppSettings.Get("inRiver.StorageAccountName"); | |
string storageAccountKey = ConfigurationManager.AppSettings.Get("inRiver.StorageAccountKey"); |
This file contains hidden or 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.Text.RegularExpressions; | |
namespace Gosso.Mvc.Helpers | |
{ | |
public class MailToHelper | |
{ | |
private static readonly string replaceTemplate = @"#"" onclick=""window.location = 'mailto:' + ['{0}'].join(''); return false;"; | |
public static string TransformMailToLinks(string text) |
This file contains hidden or 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.Mvc.ApplicationModels; | |
using System; | |
using System.Linq; | |
using System.Reflection; | |
namespace Foundation.Infrastructure.Display | |
{ | |
public class FeatureConvention : IControllerModelConvention | |
{ | |
public void Apply(ControllerModel controller) |
This file contains hidden or 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> | |
/// Iterates the prices from ERP into Episerver Commerce | |
/// </summary> | |
/// <param name="variant"></param> | |
/// <param name="item">Custom Entity from ERP system</param> | |
private static void AddUpdatePrice(VariationContent variant, PriceMessage item) | |
{ | |
//no need to delete any prices, IPriceService optimizes the prices from the new prices | |
var priceService = ServiceLocator.Current.GetInstance<IPriceService>(); | |
List<IPriceValue> priceValues = new List<IPriceValue>(); |
This file contains hidden or 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 EPiServer; | |
using EPiServer.Core; | |
using EPiServer.DataAbstraction; | |
using EPiServer.Framework.Web; | |
using EPiServer.Globalization; | |
using EPiServer.Logging; | |
using EPiServer.ServiceLocation; | |
using EPiServer.Web; | |
using EPiServer.Web.Mvc; | |
using System.Collections.Generic; |
This file contains hidden or 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 AlloyTemplates.Business; | |
using EPiServer; | |
using EPiServer.Core; | |
using EPiServer.Personalization.VisitorGroups; | |
using EPiServer.ServiceLocation; | |
using EPiServer.Web; | |
using System; | |
using System.Configuration; | |
using System.Reflection; | |
using System.Web; |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<module> | |
<!--clientResources> | |
<add name="epi-cms.widgets.base" path="Styles/Styles.css" resourceType="Style"/> | |
</clientResources--> | |
<dojo> | |
<!-- Add a mapping from site to ~/ClientResources/Scripts to the dojo loader configuration --> | |
<paths> | |
<add name="clientscripts" path="Scripts" /> | |
</paths> |
NewerOlder