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; | |
namespace Samples | |
{ | |
public static class EnumHelper | |
{ | |
public static string GetDescription(this Enum value) | |
{ | |
if (value == null) | |
{ |
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.Collections; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using System.Windows.Forms; | |
namespace Samples |
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.Collections.Generic; | |
using System.Linq; | |
using System.Windows.Forms; | |
namespace Samples | |
{ | |
public class CascadingListDecorator<TChildValue, TParentValue> where TParentValue : class | |
{ | |
private ListControl _childList; |
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.ComponentModel.Composition; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Samples | |
{ | |
public class ViewModelIndexer | |
{ | |
public ViewModelIndexer() |
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.ComponentModel; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace Samples | |
{ | |
public static class NotificationExtensions | |
{ |
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.Threading; | |
using log4net; | |
namespace Samples | |
{ | |
public class EngineThatCould | |
{ | |
private static readonly ILog Log = LogManager.GetLogger(typeof(EngineThatCould)); | |
private const int SecondsBetweenAttempts = 1; |
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
function Hg-Export([string]$Path) { | |
<# | |
.SYNOPSIS | |
Exports all uncommitted changes in the current HG repository | |
to a git formatted diff file at the specified path. | |
The resultant diff file can be re-imported into a repo using: hg import changes.diff | |
.EXAMPLE | |
Hg-Export changes.diff |
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
# Helper function for opening the Tortoise SVN GUI from a PowerShell prompt. | |
# Put this into your PowerShell profile. | |
# Ensure Tortoise SVN is in your PATH (usually C:\Program Files\TortoiseSVN\bin). | |
function Svn-Tortoise([string]$Command = "commit") { | |
<# | |
.SYNOPSIS | |
Launches TortoiseSVN with the given command. | |
Opens the commit screen if no command is given. | |
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
HTTP/1.1 200 OK | |
Cache-Control: private | |
Content-Type: text/html; charset=utf-8 | |
Content-Encoding: deflate | |
Server: Microsoft-IIS/7.5 | |
X-AspNet-Version: 4.0.30319 | |
X-Compressed-By: HttpCompress | |
X-Glimpse-RequestID: e379b425-9573-477e-81d8-7eda4d1643c6 | |
X-Powered-By: ASP.NET | |
Date: Wed, 26 Oct 2011 16:13:21 GMT |
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 System.Web.Mvc; | |
public abstract class BaseController : Controller | |
{ | |
protected override JsonResult Json(object data, string contentType, System.Text.Encoding contentEncoding) | |
{ | |
return new JsonNetResult | |
{ |