Skip to content

Instantly share code, notes, and snippets.

View mahizsas's full-sized avatar

MAHIZ mahizsas

View GitHub Profile
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)
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;
using System.Web.Mvc;
namespace DemoApp.Areas.Demo
{
public class DemoAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
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();
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)
{
@mahizsas
mahizsas / Web.config
Created November 2, 2013 15:23 — forked from BennyM/Web.config
<?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>
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>
@mahizsas
mahizsas / state.js
Created October 17, 2013 14:27 — forked from joladev/state.js
angular.module('services', [])
.factory('State', function ($rootScope) {
'use strict';
var state;
var broadcast = function (state) {
$rootScope.$broadcast('State.Update', state);
};
var update = function (newState) {
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>
*/
@mahizsas
mahizsas / Maybe.cs
Created September 26, 2013 09:37 — forked from rarous/Maybe.cs
using System;
using System.Collections.Generic;
using System.Linq;
public interface Maybe<T> { }
public class Nothing<T> : Maybe<T> { }
public class Just<T> : Maybe<T> {
public T Value { get; private set; }