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.Threading.Tasks; | |
using GraphQL.Language.AST; | |
using GraphQL.Validation; | |
using Microsoft.AspNetCore.Authorization; | |
using Microsoft.Extensions.Localization; | |
using OrchardCore.Apis.GraphQL; | |
namespace Some.Nsamespace.ValidationRules | |
{ |
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
<script> | |
(function () { | |
var ip, newNode, referenceNode; | |
// helper function to execute once we have the IP address | |
function useIP (ip) { | |
if (ip.indexOf("194.176.105.") === 0) { | |
var el = document.getElementsByTagName('body')[0]; | |
el.setAttribute('data-n3', 'true'); | |
} |
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.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Orchard.Alias; | |
using Orchard.ContentManagement; | |
namespace SomeNamespace.Alias { | |
public class AliasContentAccessor : IAliasContentAccessor { | |
ConcurrentDictionary<string, int?> _lookups; |
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 Orchard.Themes; | |
namespace Something.Themes { | |
public class CustomThemeSelector : IThemeSelector { | |
public ThemeSelectorResult GetTheme(RequestContext context) { | |
if (someCondition) { | |
return new ThemeSelectorResult { | |
Priority = 10, |
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 Orchard.ContentManagement; | |
using Orchard.DisplayManagement.Descriptors; | |
using Patient.Framework.DisplayManagement; | |
namespace Patient.ContentTypes.Clinical.Providers { | |
public class HubPlacementParseStrategyMatchProvider : IPlacementParseStategyMatchProvider { | |
public string Key { get { return "Hub"; } } | |
public bool IsMatch(ShapePlacementContext context, string expression) { | |
var contentItem = context.Content.ContentItem; |
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
<div class="topic" id="readspeaker-content"> | |
<header class="slat hubHeader hubHeader--action hubHeader--image" style="background-image: url('/assets/img/tmp/hub-hero-2.jpg')"> | |
<div class="container hubHeader__tools"> | |
@Display(Model.ContentMenu) | |
</div> | |
<div class="container hubHeader__content"> | |
<a class="button button--transparent hubHeader__action" | |
href="#" | |
data-modal="#hub-header-video"> |
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.ComponentModel.DataAnnotations; | |
using System.Web; | |
using Orchard; | |
using Patient.Framework.AntiSpam.Services; | |
namespace Patient.Framework.AntiSpam.Attributes { | |
public class RecaptchaAttribute : ValidationAttribute { |
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.IO; | |
using Orchard; | |
using Orchard.DisplayManagement; | |
using Orchard.DisplayManagement.Descriptors; | |
using Orchard.Environment; | |
namespace Some.Namespace { | |
public class MyShapes : IShapeTableProvider { | |
private Work<IShapeFactory> _shapefactory; | |
private readonly Work<IShapeDisplay> _shapeDisplay; |
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
[Themed] | |
public class MyController : Controller { | |
public ActionResult Index() { | |
var shape = _orchardServices.New.MyShape(SomeProperty: "woowooo"); | |
return new ShapeResult(this, shape); | |
} | |
} | |
NewerOlder