Skip to content

Instantly share code, notes, and snippets.

View MatthewKing's full-sized avatar

Matthew King MatthewKing

View GitHub Profile
@davidfowl
davidfowl / dotnetlayout.md
Last active May 5, 2024 11:47
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@thecodejunkie
thecodejunkie / DynamicModelBinder.cs
Created May 5, 2013 19:41
Binding to a DynamicDictionary
using System;
using System.Collections.Generic;
using System.Linq;
using Nancy.ModelBinding;
public class DynamicModelBinder : IModelBinder
{
public object Bind(NancyContext context, Type modelType, object instance, BindingConfig configuration, params string[] blackList)
{
var data =
@MatthewKing
MatthewKing / EquatableTemplate.cs
Created July 23, 2012 08:40
Template implementation of IEquatable.
/// <summary>
/// Determines whether the current object is equal to another object of the same type.
/// </summary>
/// <param name="other">An object to compare with this object.</param>
/// <returns>
/// true if the current object is equal to the specified object; otherwise, false.
/// </returns>
public bool Equals(T other)
{
if (Object.ReferenceEquals(other, null)) return false;