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.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Runtime.Serialization.Formatters.Binary; | |
using Microsoft.Extensions.Caching.Distributed; | |
using Microsoft.Extensions.DependencyInjection; | |
using Newtonsoft.Json; | |
using Piranha; | |
using Piranha.Cache; |
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 Microsoft.AspNetCore.Builder; | |
using Piranha.Models; | |
namespace Piranha.Fixes | |
{ | |
public static class PostCacheFix | |
{ | |
private static ICache _cache; |
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 Piranha; | |
using Piranha.Models; | |
public static class AbsoluteUrlExtension | |
{ | |
public static async Task<string> AbsoluteUrl(this PageBase page, IApi api, string scheme = "http") | |
{ | |
// Get the site. If cache is enabled the site | |
// will be fetched from cache |
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 Piranha.Extend.Fields; | |
namespace MyApp.Fields | |
{ | |
public class BooleanField : SimpleField<bool> {} | |
} |