Skip to content

Instantly share code, notes, and snippets.

View damianh's full-sized avatar
💥

Damian Hickey damianh

💥
View GitHub Profile
@damianh
damianh / gist:4214487
Created December 5, 2012 10:14 — forked from SimonCropp/gist:4214439
LogParamsOnException
Before
public class SimpleClass
{
[LogParamsOnException(LogLevel.Info)]
void Method(string param1, int param2)
{
//Do Stuff
}
@damianh
damianh / gist:1825986
Created February 14, 2012 11:22
Storage (Repository Discussion)
//Guard clauses / contracts omitted for berivity
//Thread safety not considered.
public interface IKeyValueStore
{
void Add<T>(string key, T item);
void AddOrUpdate<T>(string key, T item);
bool Remove(string key);
@damianh
damianh / gist:1825707
Created February 14, 2012 10:42
Storage (Repository Discussion)
namespace WinPhoneKit.Storage
{
using System;
using System.IO.IsolatedStorage;
public static class IsolatedStorage
{
private static readonly IsolatedStorageSettings isolatedStorage = IsolatedStorageSettings.ApplicationSettings;
public static void Add<TEntity>(string key, TEntity entity)