##// END OF EJS Templates
Minor code changes
cin -
r213:9ee78a345738 v2
parent child
Show More
@@ -8,7 +8,7 namespace Implab.Components {
8 /// Base class the objects which support disposing.
8 /// Base class the objects which support disposing.
9 /// </summary>
9 /// </summary>
10 public class Disposable : IDisposable {
10 public class Disposable : IDisposable {
11
11
12 int m_disposed;
12 int m_disposed;
13
13
14 public event EventHandler Disposed;
14 public event EventHandler Disposed;
@@ -75,11 +75,9 namespace Implab.Components {
75 /// ΠΈΠ· Π½Π΅ΡΠΊΠΎΠ»ΡŒΠΊΠΈΡ… ΠΏΠΎΡ‚ΠΎΠΊΠΎΠ².
75 /// ΠΈΠ· Π½Π΅ΡΠΊΠΎΠ»ΡŒΠΊΠΈΡ… ΠΏΠΎΡ‚ΠΎΠΊΠΎΠ².
76 /// </remarks>
76 /// </remarks>
77 protected virtual void Dispose(bool disposing) {
77 protected virtual void Dispose(bool disposing) {
78 if (disposing) {
78 if (disposing)
79 EventHandler temp = Disposed;
79 Disposed.DispatchEvent(this, EventArgs.Empty);
80 if (temp != null)
80
81 temp(this, EventArgs.Empty);
82 }
83 }
81 }
84
82
85 [SuppressMessage("Microsoft.Design", "CA1063:ImplementIDisposableCorrectly", Justification = "Dipose(bool) and GC.SuppessFinalize are called")]
83 [SuppressMessage("Microsoft.Design", "CA1063:ImplementIDisposableCorrectly", Justification = "Dipose(bool) and GC.SuppessFinalize are called")]
@@ -6,6 +6,10 using System.Text.RegularExpressions;
6 using System.Diagnostics;
6 using System.Diagnostics;
7 using System.Collections;
7 using System.Collections;
8
8
9 #if NET_4_5
10 using System.Threading.Tasks;
11 #endif
12
9 namespace Implab
13 namespace Implab
10 {
14 {
11 public static class Safe
15 public static class Safe
@@ -117,6 +121,9 namespace Implab
117 }
121 }
118 }
122 }
119
123
124 public static void NoWait(IPromise promise) {
125 }
126
120 [DebuggerStepThrough]
127 [DebuggerStepThrough]
121 public static IPromise<T> Run<T>(Func<IPromise<T>> action) {
128 public static IPromise<T> Run<T>(Func<IPromise<T>> action) {
122 ArgumentNotNull(action, "action");
129 ArgumentNotNull(action, "action");
@@ -128,5 +135,10 namespace Implab
128 }
135 }
129 }
136 }
130
137
138 #if NET_4_5
139 public static void NoWait(Task t) {
140 }
141 #endif
142
131 }
143 }
132 }
144 }
General Comments 3
Under Review
author

Auto status change to "Under Review"

Approved
author

ok, latest stable version should be in default

You need to be logged in to leave comments. Login now