annotate Implab/Safe.cs @ 273:79110a16cab7 v3

Working on Unity xml configuration: Refactoring in progress
author cin
date Thu, 26 Apr 2018 19:35:01 +0300
parents 9d1cca834b05
children
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;
51
2c332a9c64c0 Added methods for parameter checks
cin
parents: 31
diff changeset
5 using System.Text.RegularExpressions;
66
790e8a997d30 Refactoring
cin
parents: 55
diff changeset
6 using System.Diagnostics;
207
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
7 using System.Collections;
228
6fa235c5a760 Rewritten JsonScanner, JsonParser, fixed naming style
cin
parents: 221
diff changeset
8 using System.Runtime.CompilerServices;
251
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 248
diff changeset
9 using System.Threading.Tasks;
259
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
10 using System.Threading;
1
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
11
213
9ee78a345738 Minor code changes
cin
parents: 209
diff changeset
12 #if NET_4_5
9ee78a345738 Minor code changes
cin
parents: 209
diff changeset
13 using System.Threading.Tasks;
9ee78a345738 Minor code changes
cin
parents: 209
diff changeset
14 #endif
9ee78a345738 Minor code changes
cin
parents: 209
diff changeset
15
1
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
16 namespace Implab
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
17 {
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
18 public static class Safe
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
19 {
228
6fa235c5a760 Rewritten JsonScanner, JsonParser, fixed naming style
cin
parents: 221
diff changeset
20 [MethodImpl(MethodImplOptions.AggressiveInlining)]
161
2a8466f0cb8a DFA refactoring
cin
parents: 145
diff changeset
21 public static void ArgumentAssert(bool condition, string paramName) {
2a8466f0cb8a DFA refactoring
cin
parents: 145
diff changeset
22 if (!condition)
2a8466f0cb8a DFA refactoring
cin
parents: 145
diff changeset
23 throw new ArgumentException("The parameter is invalid", paramName);
2a8466f0cb8a DFA refactoring
cin
parents: 145
diff changeset
24 }
2a8466f0cb8a DFA refactoring
cin
parents: 145
diff changeset
25
228
6fa235c5a760 Rewritten JsonScanner, JsonParser, fixed naming style
cin
parents: 221
diff changeset
26 [MethodImpl(MethodImplOptions.AggressiveInlining)]
121
62d2f1e98c4e working version of AsyncQueue and batch operations
cin
parents: 119
diff changeset
27 public static void ArgumentMatch(string value, string paramName, Regex rx) {
51
2c332a9c64c0 Added methods for parameter checks
cin
parents: 31
diff changeset
28 if (rx == null)
2c332a9c64c0 Added methods for parameter checks
cin
parents: 31
diff changeset
29 throw new ArgumentNullException("rx");
121
62d2f1e98c4e working version of AsyncQueue and batch operations
cin
parents: 119
diff changeset
30 if (!rx.IsMatch(value))
62d2f1e98c4e working version of AsyncQueue and batch operations
cin
parents: 119
diff changeset
31 throw new ArgumentException(String.Format("The prameter value must match {0}", rx), paramName);
51
2c332a9c64c0 Added methods for parameter checks
cin
parents: 31
diff changeset
32 }
2c332a9c64c0 Added methods for parameter checks
cin
parents: 31
diff changeset
33
228
6fa235c5a760 Rewritten JsonScanner, JsonParser, fixed naming style
cin
parents: 221
diff changeset
34 [MethodImpl(MethodImplOptions.AggressiveInlining)]
121
62d2f1e98c4e working version of AsyncQueue and batch operations
cin
parents: 119
diff changeset
35 public static void ArgumentNotEmpty(string value, string paramName) {
62d2f1e98c4e working version of AsyncQueue and batch operations
cin
parents: 119
diff changeset
36 if (String.IsNullOrEmpty(value))
62d2f1e98c4e working version of AsyncQueue and batch operations
cin
parents: 119
diff changeset
37 throw new ArgumentException("The parameter can't be empty", paramName);
90
efcb076407a7 code cleanup
cin
parents: 66
diff changeset
38 }
efcb076407a7 code cleanup
cin
parents: 66
diff changeset
39
228
6fa235c5a760 Rewritten JsonScanner, JsonParser, fixed naming style
cin
parents: 221
diff changeset
40 [MethodImpl(MethodImplOptions.AggressiveInlining)]
121
62d2f1e98c4e working version of AsyncQueue and batch operations
cin
parents: 119
diff changeset
41 public static void ArgumentNotEmpty<T>(T[] value, string paramName) {
62d2f1e98c4e working version of AsyncQueue and batch operations
cin
parents: 119
diff changeset
42 if (value == null || value.Length == 0)
62d2f1e98c4e working version of AsyncQueue and batch operations
cin
parents: 119
diff changeset
43 throw new ArgumentException("The array must be not emty", paramName);
51
2c332a9c64c0 Added methods for parameter checks
cin
parents: 31
diff changeset
44 }
2c332a9c64c0 Added methods for parameter checks
cin
parents: 31
diff changeset
45
228
6fa235c5a760 Rewritten JsonScanner, JsonParser, fixed naming style
cin
parents: 221
diff changeset
46 [MethodImpl(MethodImplOptions.AggressiveInlining)]
121
62d2f1e98c4e working version of AsyncQueue and batch operations
cin
parents: 119
diff changeset
47 public static void ArgumentNotNull(object value, string paramName) {
62d2f1e98c4e working version of AsyncQueue and batch operations
cin
parents: 119
diff changeset
48 if (value == null)
62d2f1e98c4e working version of AsyncQueue and batch operations
cin
parents: 119
diff changeset
49 throw new ArgumentNullException(paramName);
51
2c332a9c64c0 Added methods for parameter checks
cin
parents: 31
diff changeset
50 }
2c332a9c64c0 Added methods for parameter checks
cin
parents: 31
diff changeset
51
228
6fa235c5a760 Rewritten JsonScanner, JsonParser, fixed naming style
cin
parents: 221
diff changeset
52 [MethodImpl(MethodImplOptions.AggressiveInlining)]
251
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 248
diff changeset
53 internal static void ArgumentGreaterEqThan(int value, int min, string paramName) {
228
6fa235c5a760 Rewritten JsonScanner, JsonParser, fixed naming style
cin
parents: 221
diff changeset
54 if (value < min)
6fa235c5a760 Rewritten JsonScanner, JsonParser, fixed naming style
cin
parents: 221
diff changeset
55 throw new ArgumentOutOfRangeException(paramName);
6fa235c5a760 Rewritten JsonScanner, JsonParser, fixed naming style
cin
parents: 221
diff changeset
56 }
6fa235c5a760 Rewritten JsonScanner, JsonParser, fixed naming style
cin
parents: 221
diff changeset
57
272
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 259
diff changeset
58 public static object CreateDefaultValue(Type type) {
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 259
diff changeset
59 if (type.IsValueType)
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 259
diff changeset
60 return Activator.CreateInstance(type);
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 259
diff changeset
61
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 259
diff changeset
62 return null;
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 259
diff changeset
63 }
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 259
diff changeset
64
228
6fa235c5a760 Rewritten JsonScanner, JsonParser, fixed naming style
cin
parents: 221
diff changeset
65 [MethodImpl(MethodImplOptions.AggressiveInlining)]
251
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 248
diff changeset
66 public static void ArgumentInRange(bool condition, string paramName) {
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 248
diff changeset
67 if (!condition)
121
62d2f1e98c4e working version of AsyncQueue and batch operations
cin
parents: 119
diff changeset
68 throw new ArgumentOutOfRangeException(paramName);
55
c0bf853aa04f Added initial JSON support
cin
parents: 51
diff changeset
69 }
c0bf853aa04f Added initial JSON support
cin
parents: 51
diff changeset
70
228
6fa235c5a760 Rewritten JsonScanner, JsonParser, fixed naming style
cin
parents: 221
diff changeset
71 [MethodImpl(MethodImplOptions.AggressiveInlining)]
177
a0ff6a0e9c44 refactoring
cin
parents: 161
diff changeset
72 public static void ArgumentOfType(object value, Type type, string paramName) {
a0ff6a0e9c44 refactoring
cin
parents: 161
diff changeset
73 if (!type.IsInstanceOfType(value))
a0ff6a0e9c44 refactoring
cin
parents: 161
diff changeset
74 throw new ArgumentException(String.Format("The parameter must be of type {0}", type), paramName);
a0ff6a0e9c44 refactoring
cin
parents: 161
diff changeset
75 }
a0ff6a0e9c44 refactoring
cin
parents: 161
diff changeset
76
128
6241bff0cd64 Added Signal class a lightweight alternative to ManualResetEvent
cin
parents: 126
diff changeset
77 public static void Dispose(params IDisposable[] objects) {
6241bff0cd64 Added Signal class a lightweight alternative to ManualResetEvent
cin
parents: 126
diff changeset
78 foreach (var d in objects)
126
f7b2b8bfbb8c minor changes
cin
parents: 121
diff changeset
79 if (d != null)
f7b2b8bfbb8c minor changes
cin
parents: 121
diff changeset
80 d.Dispose();
1
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
81 }
66
790e8a997d30 Refactoring
cin
parents: 55
diff changeset
82
128
6241bff0cd64 Added Signal class a lightweight alternative to ManualResetEvent
cin
parents: 126
diff changeset
83 public static void Dispose(params object[] objects) {
6241bff0cd64 Added Signal class a lightweight alternative to ManualResetEvent
cin
parents: 126
diff changeset
84 foreach (var obj in objects) {
6241bff0cd64 Added Signal class a lightweight alternative to ManualResetEvent
cin
parents: 126
diff changeset
85 var d = obj as IDisposable;
6241bff0cd64 Added Signal class a lightweight alternative to ManualResetEvent
cin
parents: 126
diff changeset
86 if (d != null)
6241bff0cd64 Added Signal class a lightweight alternative to ManualResetEvent
cin
parents: 126
diff changeset
87 d.Dispose();
6241bff0cd64 Added Signal class a lightweight alternative to ManualResetEvent
cin
parents: 126
diff changeset
88 }
6241bff0cd64 Added Signal class a lightweight alternative to ManualResetEvent
cin
parents: 126
diff changeset
89 }
6241bff0cd64 Added Signal class a lightweight alternative to ManualResetEvent
cin
parents: 126
diff changeset
90
215
fe5101083150 Fixed InteractiveListener to support OLE and clipboard.
cin
parents: 213
diff changeset
91 public static void DisposeCollection(IEnumerable<IDisposable> objects) {
207
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
92 foreach (var d in objects)
215
fe5101083150 Fixed InteractiveListener to support OLE and clipboard.
cin
parents: 213
diff changeset
93 Dispose(d);
fe5101083150 Fixed InteractiveListener to support OLE and clipboard.
cin
parents: 213
diff changeset
94 }
fe5101083150 Fixed InteractiveListener to support OLE and clipboard.
cin
parents: 213
diff changeset
95
fe5101083150 Fixed InteractiveListener to support OLE and clipboard.
cin
parents: 213
diff changeset
96 public static void DisposeCollection(IEnumerable objects) {
fe5101083150 Fixed InteractiveListener to support OLE and clipboard.
cin
parents: 213
diff changeset
97 foreach (var d in objects)
fe5101083150 Fixed InteractiveListener to support OLE and clipboard.
cin
parents: 213
diff changeset
98 Dispose(d);
207
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
99 }
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
100
128
6241bff0cd64 Added Signal class a lightweight alternative to ManualResetEvent
cin
parents: 126
diff changeset
101 public static void Dispose(object obj) {
238
bdfdba6b645b fixed unpredictable Safe.Dispose behaviour
cin
parents: 228
diff changeset
102 if (obj is IDisposable)
215
fe5101083150 Fixed InteractiveListener to support OLE and clipboard.
cin
parents: 213
diff changeset
103 Dispose((IDisposable)obj);
238
bdfdba6b645b fixed unpredictable Safe.Dispose behaviour
cin
parents: 228
diff changeset
104
128
6241bff0cd64 Added Signal class a lightweight alternative to ManualResetEvent
cin
parents: 126
diff changeset
105 }
6241bff0cd64 Added Signal class a lightweight alternative to ManualResetEvent
cin
parents: 126
diff changeset
106
215
fe5101083150 Fixed InteractiveListener to support OLE and clipboard.
cin
parents: 213
diff changeset
107 [DebuggerStepThrough]
207
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
108 public static void DispatchEvent<T>(this EventHandler<T> handler, object sender, T args) {
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
109 if (handler != null)
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
110 handler(sender, args);
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
111 }
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
112
215
fe5101083150 Fixed InteractiveListener to support OLE and clipboard.
cin
parents: 213
diff changeset
113 [DebuggerStepThrough]
207
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
114 public static void DispatchEvent(this EventHandler handler, object sender, EventArgs args) {
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
115 if (handler != null)
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
116 handler(sender, args);
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
117 }
558f34b2fb50 added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
cin
parents: 205
diff changeset
118
66
790e8a997d30 Refactoring
cin
parents: 55
diff changeset
119 [DebuggerStepThrough]
203
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
120 public static IPromise<T> Run<T>(Func<T> action) {
131
b5c2d609d71b minor changes
cin
parents: 128
diff changeset
121 ArgumentNotNull(action, "action");
b5c2d609d71b minor changes
cin
parents: 128
diff changeset
122
b5c2d609d71b minor changes
cin
parents: 128
diff changeset
123 try {
248
5cb4826c2c2a Added awaiters to promises
cin
parents: 238
diff changeset
124 return Promise.Resolve(action());
131
b5c2d609d71b minor changes
cin
parents: 128
diff changeset
125 } catch (Exception err) {
248
5cb4826c2c2a Added awaiters to promises
cin
parents: 238
diff changeset
126 return Promise.Reject<T>(err);
131
b5c2d609d71b minor changes
cin
parents: 128
diff changeset
127 }
b5c2d609d71b minor changes
cin
parents: 128
diff changeset
128 }
b5c2d609d71b minor changes
cin
parents: 128
diff changeset
129
b5c2d609d71b minor changes
cin
parents: 128
diff changeset
130 [DebuggerStepThrough]
203
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
131 public static IPromise Run(Action action) {
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
132 ArgumentNotNull(action, "action");
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
133
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
134 try {
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
135 action();
248
5cb4826c2c2a Added awaiters to promises
cin
parents: 238
diff changeset
136 return Promise.Resolve();
203
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
137 } catch (Exception err) {
248
5cb4826c2c2a Added awaiters to promises
cin
parents: 238
diff changeset
138 return Promise.Reject(err);
203
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
139 }
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
140 }
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
141
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
142 [DebuggerStepThrough]
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
143 public static IPromise Run(Func<IPromise> action) {
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
144 ArgumentNotNull(action, "action");
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
145
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
146 try {
248
5cb4826c2c2a Added awaiters to promises
cin
parents: 238
diff changeset
147 return action() ?? Promise.Reject(new Exception("The action returned null"));
203
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
148 } catch (Exception err) {
248
5cb4826c2c2a Added awaiters to promises
cin
parents: 238
diff changeset
149 return Promise.Reject(err);
203
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
150 }
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
151 }
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
152
213
9ee78a345738 Minor code changes
cin
parents: 209
diff changeset
153 public static void NoWait(IPromise promise) {
9ee78a345738 Minor code changes
cin
parents: 209
diff changeset
154 }
9ee78a345738 Minor code changes
cin
parents: 209
diff changeset
155
251
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 248
diff changeset
156 public static void NoWait(Task promise) {
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 248
diff changeset
157 }
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 248
diff changeset
158
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 248
diff changeset
159 public static void NoWait<T>(Task<T> promise) {
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 248
diff changeset
160 }
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 248
diff changeset
161
259
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
162 public static void Noop() {
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
163 }
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
164
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
165 public static void Noop(CancellationToken ct) {
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
166 ct.ThrowIfCancellationRequested();
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
167 }
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
168
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
169 public static Task CreateTask() {
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
170 return new Task(Noop);
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
171 }
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
172
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
173 public static Task CreateTask(CancellationToken ct) {
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
174 return new Task(Noop, ct);
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
175 }
7d52dc684bbd PollingComponent: implemented correct stopping
cin
parents: 251
diff changeset
176
203
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
177 [DebuggerStepThrough]
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 177
diff changeset
178 public static IPromise<T> Run<T>(Func<IPromise<T>> action) {
66
790e8a997d30 Refactoring
cin
parents: 55
diff changeset
179 ArgumentNotNull(action, "action");
790e8a997d30 Refactoring
cin
parents: 55
diff changeset
180
790e8a997d30 Refactoring
cin
parents: 55
diff changeset
181 try {
248
5cb4826c2c2a Added awaiters to promises
cin
parents: 238
diff changeset
182 return action() ?? Promise.Reject<T>(new Exception("The action returned null"));
66
790e8a997d30 Refactoring
cin
parents: 55
diff changeset
183 } catch (Exception err) {
248
5cb4826c2c2a Added awaiters to promises
cin
parents: 238
diff changeset
184 return Promise.Reject<T>(err);
66
790e8a997d30 Refactoring
cin
parents: 55
diff changeset
185 }
790e8a997d30 Refactoring
cin
parents: 55
diff changeset
186 }
209
a867536c68fc Bound promise to CancellationToken
cin
parents: 207
diff changeset
187
1
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
188 }
6fb3b01ee971 Added utility class for safe disposing methods.
cin
parents:
diff changeset
189 }