Skip to content

Instantly share code, notes, and snippets.

View andrewabest's full-sized avatar

Andrew Best andrewabest

View GitHub Profile
@andrewabest
andrewabest / Landlord.cs
Last active November 23, 2015 00:03 — forked from sheastrickland/Landlord.cs
Landlord: The Com Destroyer. A simple utility class to wrap those nasty little devils.
using System;
using System.Runtime.InteropServices;
namespace Things
{
public static class LandLordExtensions
{
public static LandLord<TWrapped> AsDisposable<TWrapped>(this TWrapped tenant)
{
return new LandLord<TWrapped>(tenant);