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 HtmlExtensions | |
| { | |
| public static IHtmlString DropDownListFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, Dictionary<string, IEnumerable<SelectListItem>> selectList) | |
| { | |
| /* | |
| * <select name="tmodel"> | |
| * <optgroup title="Items"> | |
| * <option value="item">Item</option> | |
| * </select> | |
| */ |
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
| angular.module('services', []) | |
| .factory('State', function ($rootScope) { | |
| 'use strict'; | |
| var state; | |
| var broadcast = function (state) { | |
| $rootScope.$broadcast('State.Update', state); | |
| }; | |
| var update = function (newState) { |
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 class PackageBinaryInspector : MarshalByRefObject | |
| { | |
| /// <summary> | |
| /// Entry point to call from your code | |
| /// </summary> | |
| /// <typeparam name="T"></typeparam> | |
| /// <param name="dllPath"></param> | |
| /// <param name="errorReport"></param> | |
| /// <returns></returns> | |
| /// <remarks> |
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
| <?xml version="1.0"?> | |
| <configuration> | |
| <configSections> | |
| <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> | |
| <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> | |
| <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> | |
| </sectionGroup> | |
| </configSections> |
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.Web.Mvc; | |
| using Umbraco.Core; | |
| using Umbraco.Web.Mvc; | |
| namespace UmbMvcMiniProfiler | |
| { | |
| public class Bootstrapper : ApplicationEventHandler | |
| { | |
| protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) | |
| { |
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.Data; | |
| using System.Data.SqlClient; | |
| public class PartialAppPlayground | |
| { | |
| public static void Initialize() | |
| { | |
| Func<IDbConnection> createConnection = () => new SqlConnection(); |
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.Web.Mvc; | |
| namespace DemoApp.Areas.Demo | |
| { | |
| public class DemoAreaRegistration : AreaRegistration | |
| { | |
| public override string AreaName | |
| { | |
| get | |
| { |
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.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Text.RegularExpressions; | |
| using System.Web; | |
| using FakeHost; | |
| using FluentAssertions; | |
| using HtmlAgilityPack; | |
| using NUnit.Framework; |
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.Threading.Tasks; | |
| using System.Web.Mvc; | |
| using JetBrains.Annotations; | |
| using ShortBus; | |
| public abstract class BaseController : Controller | |
| { | |
| public IMediator Mediator { get; set; } | |
| protected Response<TResult> Query<TResult>(IQuery<TResult> query) |
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
| /* A JSON gzip compression filter, which could easily be adapted to any pattern needed. This uses a custom AfterFilter | |
| * type which is just a fancy wrapper of Action<NancyContext>. It's useful for convention based loading of filters | |
| */ | |
| public class GzipCompressionFilter : AfterFilter | |
| { | |
| protected override void Handle(NancyContext ctx) | |
| { | |
| if ((ctx.Response.ContentType == "application/json") && ctx.Request.Headers.AcceptEncoding.Any( |