Skip to content

Instantly share code, notes, and snippets.

View blakepell's full-sized avatar

Blake Pell blakepell

View GitHub Profile
namespace YourNamespace
{
/// <summary>
/// Uses the Name value of the <see cref="ColumnAttribute"/> specified to determine
/// the association between the name of the column in the query results and the member to
/// which it will be extracted. If no column mapping is present all members are mapped as
/// usual.
/// </summary>
/// <typeparam name="T">The type of the object that this association between the mapper applies to.</typeparam>
public class ColumnAttributeTypeMapper<T> : FallbackTypeMapper
@smwhit
smwhit / gist:aea23e1e4d85c03792fd
Created May 26, 2014 19:57
WPF - passing multiple parameters to a command
public class SendCommand : ICommand
{
public void Execute(object parameter)
{
var labels = ((object[]) parameter).OfType<Label>();
}
public bool CanExecute(object parameter)
{
return true;
@xanathar
xanathar / MoonSharp_Threading.cs
Created August 20, 2015 17:05
MoonSharp threading example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using MoonSharp.Interpreter;
using MoonSharp.Interpreter.Interop;
namespace Playground