annotate Implab/Safe.cs @ 35:2880242f987a diagnostics

initial log capabilities
author cin
date Mon, 14 Apr 2014 18:25:26 +0400
parents dafaadca5b9f
children 2c332a9c64c0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
1 using System;
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
2 using System.Collections.Generic;
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
3 using System.Linq;
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
4 using System.Text;
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
5
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
6 namespace Implab
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
7 {
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
8 public static class Safe
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
9 {
31
dafaadca5b9f minor cleanup
cin
parents: 2
diff changeset
10 public static void Dispose<T>(T obj) where T : class
1
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
11 {
2
aa367305156b small fixes
cin
parents: 1
diff changeset
12 var disp = obj as IDisposable;
aa367305156b small fixes
cin
parents: 1
diff changeset
13 if (disp != null)
aa367305156b small fixes
cin
parents: 1
diff changeset
14 disp.Dispose();
1
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
15 }
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
16 }
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
17 }