annotate Implab/Safe.cs @ 33:b255e4aeef17

removed the reference to the parent from the promise object this allows resolved promises to release parents and results they are holding. Added complete set of operations to IPromiseBase interface Subscribing to the cancellation event of the promise should not affect it's IsExclusive property More tests.
author cin
date Thu, 10 Apr 2014 02:39:29 +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 }