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
public static class MappingExtensions { | |
public static void ForAllOtherMembers<TSource, TDestination>(this IMappingExpression<TSource, TDestination> expression, Action<IMemberConfigurationExpression<TSource>> memberOptions) { | |
var sourceTypeMap = Mapper.GetAllTypeMaps().FirstOrDefault(t => t.SourceType.IsEquivalentTo(typeof(TSource)) && t.DestinationType.IsEquivalentTo(typeof(TDestination))); | |
if (sourceTypeMap == null) throw new ArgumentNullException(); | |
var typeInfo = new TypeInfo(sourceTypeMap.DestinationType); | |
typeInfo.GetPublicWriteAccessors().Each(acc => { |
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
public static class HtmlHelperExtensions | |
{ | |
private static readonly char Separator = '/'; | |
private static readonly string TemplateFolder = HttpContext.Current.Server.MapPath("~/App/templates"); | |
private static readonly IViewEngine ViewEngine = new HandlebarsRazorViewEngine(); | |
public static MvcHtmlString RenderEmber(this HtmlHelper helper, string path = "", bool noTemplateName = false) | |
{ | |
if (HttpRuntime.Cache[path] == null) | |
{ |
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" ng-app> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<div data-ng-controller="TestController"> | |
<h2>{{ text }}</h2> | |
</div> | |
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script> |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using Umbraco.Core; | |
using Umbraco.Web.Mvc; | |
using UmbracoStrongTypeViews.Controllers; | |
namespace UmbracoStrongTypeViews.App_Start { | |
public class ApplicationStartupHandler : IApplicationEventHandler { |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using Umbraco.Web.Mvc; | |
namespace MyWebsite { | |
[PluginController("MyCustomApi")] | |
public class SamplePluginController : Umbraco.Web.WebApi.UmbracoApiController { |
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
set "NET232=Framework\v2.0.50727" | |
set "NET264=Framework64\v2.0.50727" | |
set "NET432=Framework\v4.0.30319" | |
set "NET464=Framework64\v4.0.30319" | |
cd "\WINDOWS\Microsoft.NET\%NET232%\Temporary ASP.NET Files" | |
del *.* /S /Q | |
cd "\WINDOWS\Microsoft.NET\%NET264%\Temporary ASP.NET Files" | |
del *.* /S /Q | |
cd "\WINDOWS\Microsoft.NET\%NET432%\Temporary ASP.NET Files" |
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
<Target Name="AfterBuild"> | |
<ItemGroup> | |
<FilesToCopy Include="App_Plugins\**\*.*" Exclude="App_Plugins\**\*.cs;App_Plugins\*.cs" /> | |
</ItemGroup> | |
<Copy SourceFiles="@(FilesToCopy)" DestinationFiles="@(FilesToCopy->'<destination directory>\%(RecursiveDir)\%(Filename)%(Extension)')" /> | |
</Target> |
NewerOlder