View Dump.razor
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.Text.Json | |
<div> | |
@if (!string.IsNullOrEmpty(Label)) | |
{ | |
<h5>@Label</h5> | |
} | |
<code style="display: block; white-space: pre">@json</code> | |
</div> |
View angular-autoNumeric.js
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
// Directive for autoNumeric.js | |
// Require AngularJS, jQuery and autoNumeric.js | |
angular.module('crunch.ui.numeric', []).directive('numeric', [function () { | |
'use strict'; | |
// Declare a empty options object | |
var options = {}; | |
return { | |
// Require ng-model in the element attribute for watching changes. | |
require: '?ngModel', | |
// This directive only works when used in element's attribute (e.g: cr-numeric) |
View MultiNodeTreePickerIdToUdiMigrator.cs
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.Linq; | |
using Umbraco.Core; | |
using Umbraco.Core.Logging; | |
using Umbraco.Web; | |
namespace Sniper.Umbraco | |
{ | |
public static class MultiNodeTreePickerIdToUdiMigrator | |
{ |
View MagicModelBinder.cs
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 MagicModelBinder : IModelBinder | |
{ | |
public bool BindModel(HttpActionContext actionContext, ModelBindingContext bindingContext) | |
{ | |
var model = Activator.CreateInstance(bindingContext.ModelType); | |
MagicRecursive(string.Empty, bindingContext.ModelType, bindingContext, model); | |
bindingContext.Model = model; | |
bindingContext.ValidationNode.ValidateAllProperties = true; | |
return true; |