view Implab/Safe.cs @ 31:dafaadca5b9f

minor cleanup
author cin
date Mon, 07 Apr 2014 18:17:00 +0400
parents aa367305156b
children 2c332a9c64c0
line wrap: on
line source

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Implab
{
    public static class Safe
    {
        public static void Dispose<T>(T obj) where T : class
        {
            var disp = obj as IDisposable;
            if (disp != null)
                disp.Dispose();
        }
    }
}