View GenerateTemplatesStruct.ps1
function Get-CleanName() | |
{ | |
param ( | |
[string] $Name | |
) | |
return $Name.Replace(" ", "") | |
} | |
$templateItem = Get-Item . |
View SearchExtensions.cs
public static class SearchExtensions | |
{ | |
public static IQueryable<TSource> ContainsOr<TSource, TKey>(this IQueryable<TSource> queryable, Expression<Func<TSource, TKey>> keySelector, IEnumerable values) where TKey : IEnumerable | |
{ | |
return Contains(queryable, keySelector, values, true); | |
} | |
public static IQueryable<TSource> ContainsAnd<TSource, TKey>(this IQueryable<TSource> queryable, Expression<Func<TSource, TKey>> keySelector, IEnumerable values) where TKey : IEnumerable | |
{ | |
return Contains(queryable, keySelector, values, false); |
View JsxResult.cs
namespace Sitecore.Foundation.React.Mvc | |
{ | |
using System; | |
using System.Globalization; | |
using System.IO; | |
using System.Text; | |
using System.Web.Mvc; | |
public class JsxResult : ViewResult | |
{ |
View AssembleyReferences.tt
<#@ Assembly Name="$(SolutionDir)\packages\Fortis.3.5.5.2\lib\net45\Fortis.dll" #> | |
<#@ Assembly Name="$(SolutionDir)\..\Libraries\Sitecore.Kernel.dll" #> | |
<#@ assembly name="$(ProjectDir)$(OutDir)Transitus.Rainbow.dll" #> |
View Benchmark.cs
var items = Sitecore.Context.Database.GetItem(new ID("{1FBCAB2D-8444-43FB-916C-951AE3FA244E}")).Axes.GetDescendants(); | |
Response.Write("<h1>{0} Items</h1>".FormatWith(items.Length)); | |
var sw = new Stopwatch(); | |
sw.Start(); | |
var displayNamesScapi = items.Select(item => item[FieldIDs.DisplayName]).ToList(); | |
sw.Stop(); |