Merge lp:~mandel/ubuntuone-windows-installer/performance_improve into lp:ubuntuone-windows-installer/beta
- performance_improve
- Merge into beta
Proposed by
Manuel de la Peña
Status: | Merged |
---|---|
Merged at revision: | 114 |
Proposed branch: | lp:~mandel/ubuntuone-windows-installer/performance_improve |
Merge into: | lp:ubuntuone-windows-installer/beta |
Prerequisite: | lp:~mandel/ubuntuone-windows-installer/add_icon_overlay |
Diff against target: |
14329 lines (+12080/-1153) 57 files modified
install/UbuntuOne7.wxs (+9/-225) install/UbuntuOneXP.wxs (+17/-225) src/Canonical.Ubuntu.SSO/ISSOCredentialsProvider.cs (+1/-1) src/Canonical.Ubuntu.SSO/SSOCredentialsProvider.cs (+7/-6) src/Canonical.UbuntuOne.Client.Test/Notification/NotificationPresenterFixture.cs (+0/-19) src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml (+2/-2) src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml.cs (+37/-5) src/Canonical.UbuntuOne.Client/Notification/INotificationIconView.cs (+12/-2) src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs (+31/-49) src/Canonical.UbuntuOne.Client/Preferences/PreferencesDialogPresenter.cs (+5/-3) src/Canonical.UbuntuOne.Client/objects.xml (+3/-2) src/Canonical.UbuntuOne.Common/OperationContracts/IEventNotifier.cs (+1/-0) src/Canonical.UbuntuOne.Common/OperationContracts/ISyncDaemon.cs (+1/-0) src/Canonical.UbuntuOne.ProcessDispatcher/Canonical.UbuntuOne.ProcessDispatcher.csproj (+8/-4) src/Canonical.UbuntuOne.ProcessDispatcher/EventNotifier.cs (+0/-171) src/Canonical.UbuntuOne.ProcessDispatcher/IPipeListener.cs (+1/-1) src/Canonical.UbuntuOne.ProcessDispatcher/JsonMessageProcessor.cs (+18/-2) src/Canonical.UbuntuOne.ProcessDispatcher/JsonPipeStreamer.cs (+3/-2) src/Canonical.UbuntuOne.ProcessDispatcher/JsonPipeStreamerFactory.cs (+1/-1) src/Canonical.UbuntuOne.ProcessDispatcher/PipeListener.cs (+3/-2) src/Canonical.UbuntuOne.ProcessDispatcher/Program.cs (+0/-88) src/Canonical.UbuntuOne.ProcessDispatcher/SyncDaemonService.cs (+56/-50) src/Canonical.UbuntuOne.ProcessDispatcher/objects.xml (+0/-52) src/UbuntuOneClient.Tests/ProgramFixture.cs (+90/-83) src/UbuntuOneClient.Tests/UbuntuOneClient.Tests.csproj (+4/-0) src/UbuntuOneClient/App.config (+1/-5) src/UbuntuOneClient/Config/serviceModel.bindings.config (+0/-23) src/UbuntuOneClient/Config/serviceModel.client.config (+0/-38) src/UbuntuOneClient/Program.cs (+22/-36) src/UbuntuOneClient/UbuntuOneClient.csproj (+4/-6) src/UbuntuOneClient/objects.xml (+2/-34) src/u1sync/client.py (+1/-1) src/u1sync/main.py (+7/-4) src/u1sync/metadata.py (+2/-1) src/u1sync/scan.py (+1/-1) src/u1sync/sync.py (+12/-7) src/u1sync/utils.py (+9/-2) tools/NUnit/NUnitFitTests.html (+277/-0) tools/NUnit/NUnitTests.config (+84/-0) tools/NUnit/NUnitTests.nunit (+14/-0) tools/NUnit/agent.conf (+4/-0) tools/NUnit/agent.log.conf (+18/-0) tools/NUnit/fit-license.txt (+342/-0) tools/NUnit/framework/nunit.framework.xml (+10228/-0) tools/NUnit/launcher.log.conf (+18/-0) tools/NUnit/license.txt (+15/-0) tools/NUnit/nunit-agent-x86.exe.config (+76/-0) tools/NUnit/nunit-agent.exe.config (+76/-0) tools/NUnit/nunit-console-x86.exe.config (+76/-0) tools/NUnit/nunit-console.exe.config (+76/-0) tools/NUnit/nunit-x86.exe.config (+91/-0) tools/NUnit/nunit.exe.config (+91/-0) tools/NUnit/pnunit-agent.exe.config (+77/-0) tools/NUnit/pnunit-launcher.exe.config (+77/-0) tools/NUnit/runFile.exe.config (+43/-0) tools/NUnit/runpnunit.bat (+2/-0) tools/NUnit/test.conf (+24/-0) |
To merge this branch: | bzr merge lp:~mandel/ubuntuone-windows-installer/performance_improve |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu One hackers | Pending | ||
Review via email: mp+38840@code.launchpad.net |
Commit message
Description of the change
Improves performance by removing code that is not used at the moment.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'install/UbuntuOne7.wxs' |
2 | --- install/UbuntuOne7.wxs 2010-10-19 14:28:02 +0000 |
3 | +++ install/UbuntuOne7.wxs 2010-10-19 14:28:04 +0000 |
4 | @@ -110,190 +110,6 @@ |
5 | KeyPath="yes"/> |
6 | </Component> |
7 | </Directory> |
8 | - <Directory Id="DaemonDir" |
9 | - Name="Daemon"> |
10 | - <Component Id="DaemonAutostart" |
11 | - Guid="c3308920-d2d1-11df-bd3b-0800200c9a66"> |
12 | - <RegistryValue Id="Daemon.rst" |
13 | - Root="HKCU" |
14 | - Key="Software\Microsoft\Windows\CurrentVersion\Run" |
15 | - Name="Ubuntu One Client Daemon" |
16 | - Value="[DaemonDir]Canonical.UbuntuOne.ProcessDispatcher.exe" |
17 | - Type="string"/> |
18 | - <Condition>UBUNTUONeDAEMON_START_VIA_REGISTRY</Condition> |
19 | - </Component> |
20 | - <Component Id="DaemonCommonLibComponent" |
21 | - Guid="a609b650-94b5-11df-981c-0800200c9a66"> |
22 | - <File Id="Canonical.UbuntuOne.Common.dll" |
23 | - Name="Canonical.UbuntuOne.Common.dll" |
24 | - DiskId="1" |
25 | - Source="build_results\Daemon\Canonical.UbuntuOne.Common.dll" |
26 | - KeyPath="yes"/> |
27 | - </Component> |
28 | - <Component Id="DaemonCommonPdbComponent" |
29 | - Guid="c4ddb5e0-94b5-11df-981c-0800200c9a66"> |
30 | - <File Id="Canonical.UbuntuOne.Common.pdb" |
31 | - Name="Canonical.UbuntuOne.Common.pdb" |
32 | - DiskId="1" |
33 | - Source="build_results\Daemon\Canonical.UbuntuOne.Common.pdb" |
34 | - KeyPath="yes"/> |
35 | - </Component> |
36 | - <Component Id="DaemonProgramComponent" |
37 | - Guid="f2d91a70-94b5-11df-981c-0800200c9a66"> |
38 | - <File Id="Canonical.UbuntuOne.ProcessDispatcher.exe" |
39 | - Name="Canonical.UbuntuOne.ProcessDispatcher.exe" |
40 | - DiskId="1" |
41 | - Source="build_results\Daemon\Canonical.UbuntuOne.ProcessDispatcher.exe" |
42 | - KeyPath="yes"/> |
43 | - </Component> |
44 | - <Component Id="DaemonProgramComponentConfig" |
45 | - Guid="6ac2f100-94bb-11df-981c-0800200c9a66"> |
46 | - <File Id="Canonical.UbuntuOne.ProcessDispatcher.exe.config" |
47 | - Name="Canonical.UbuntuOne.ProcessDispatcher.exe.config" |
48 | - DiskId="1" |
49 | - Source="build_results\Daemon\Canonical.UbuntuOne.ProcessDispatcher.exe.config" |
50 | - KeyPath="yes"/> |
51 | - </Component> |
52 | - <Component Id="DaemonProgramPdbComponent" |
53 | - Guid="052b3280-94b6-11df-981c-0800200c9a66"> |
54 | - <File Id="Canonical.UbuntuOne.ProcessDispatcher.pdb" |
55 | - Name="Canonical.UbuntuOne.ProcessDispatcher.pdb" |
56 | - DiskId="1" |
57 | - Source="build_results\Daemon\Canonical.UbuntuOne.ProcessDispatcher.pdb" |
58 | - KeyPath="yes"/> |
59 | - </Component> |
60 | - <Component Id="CommonLoggingComponent" |
61 | - Guid="24d7ded0-94b6-11df-981c-0800200c9a66"> |
62 | - <File Id="Common.Logging.dll" |
63 | - Name="Common.Logging.dll" |
64 | - DiskId="1" |
65 | - Source="build_results\Daemon\Common.Logging.dll" |
66 | - KeyPath="yes"/> |
67 | - </Component> |
68 | - <Component Id="CommonLoggingLog4NetComponent" |
69 | - Guid="6ac0e8b0-967d-11df-981c-0800200c9a66"> |
70 | - <File Id="Common.Logging.Log4Net.dll" |
71 | - Name="Common.Logging.Log4Net.dll" |
72 | - DiskId="1" |
73 | - Source="build_results\Daemon\Common.Logging.Log4Net.dll" |
74 | - KeyPath="yes"/> |
75 | - </Component> |
76 | - <Component Id="DotUpdaterLib" |
77 | - Guid="af217c90-967d-11df-981c-0800200c9a66"> |
78 | - <File Id="DotUpdater.dll" |
79 | - Name="DotUpdater.dll" |
80 | - DiskId="1" |
81 | - Source="build_results\Daemon\DotUpdater.dll" |
82 | - KeyPath="yes"/> |
83 | - </Component> |
84 | - <Component Id="Log4NetComponent" |
85 | - Guid="0eafc310-94b7-11df-981c-0800200c9a66"> |
86 | - <File Id="log4net.dll" |
87 | - Name="log4net.dll" |
88 | - DiskId="1" |
89 | - Source="build_results\Daemon\log4net.dll" |
90 | - KeyPath="yes"/> |
91 | - </Component> |
92 | - <Component Id="SpringAopComponent" |
93 | - Guid="5431cc80-94b7-11df-981c-0800200c9a66"> |
94 | - <File Id="Spring.Aop.dll" |
95 | - Name="Spring.Aop.dll" |
96 | - DiskId="1" |
97 | - Source="build_results\Daemon\Spring.Aop.dll" |
98 | - KeyPath="yes"/> |
99 | - </Component> |
100 | - <Component Id="SpringAopConfigComponent" |
101 | - Guid="668e92f0-94b7-11df-981c-0800200c9a66"> |
102 | - <File Id="Spring.Aop.xml" |
103 | - Name="Spring.Aop.xml" |
104 | - DiskId="1" |
105 | - Source="build_results\Daemon\Spring.Aop.xml" |
106 | - KeyPath="yes"/> |
107 | - </Component> |
108 | - <Component Id="SpringCoreComponent" |
109 | - Guid="7780a5d0-94b7-11df-981c-0800200c9a66"> |
110 | - <File Id="Spring.Core.dll" |
111 | - Name="Spring.Core.dll" |
112 | - DiskId="1" |
113 | - Source="build_results\Daemon\Spring.Core.dll" |
114 | - KeyPath="yes"/> |
115 | - </Component> |
116 | - <Component Id="SpringCoreConfigComponent" |
117 | - Guid="8149fd00-94b7-11df-981c-0800200c9a66"> |
118 | - <File Id="Spring.Core.xml" |
119 | - Name="Spring.Core.xml" |
120 | - DiskId="1" |
121 | - Source="build_results\Daemon\Spring.Core.xml" |
122 | - KeyPath="yes"/> |
123 | - </Component> |
124 | - <Component Id="SpringServicesComponent" |
125 | - Guid="fd27e7a0-98ce-11df-981c-0800200c9a66"> |
126 | - <File Id="Spring.Services.dll" |
127 | - Name="Spring.Services.dll" |
128 | - DiskId="1" |
129 | - Source="build_results\Daemon\Spring.Services.dll" |
130 | - KeyPath="yes"/> |
131 | - </Component> |
132 | - <Component Id="SpringServicesConfigComponent" |
133 | - Guid="33b757b0-98cf-11df-981c-0800200c9a66"> |
134 | - <File Id="Spring.Services.xml" |
135 | - Name="Spring.Services.xml" |
136 | - DiskId="1" |
137 | - Source="build_results\Daemon\Spring.Services.xml" |
138 | - KeyPath="yes"/> |
139 | - </Component> |
140 | - <Component Id="SpringDataComponent" |
141 | - Guid="e1736390-aac1-11df-94e2-0800200c9a66"> |
142 | - <File Id="Spring.Data.dll" |
143 | - Name="Spring.Data.dll" |
144 | - DiskId="1" |
145 | - Source="build_results\Daemon\Spring.Data.dll" |
146 | - KeyPath="yes"/> |
147 | - </Component> |
148 | - <Component Id="SymstemDataSQLiteComponent" |
149 | - Guid="43573410-aac2-11df-94e2-0800200c9a66"> |
150 | - <File Id="System.Data.SQLite.DLL" |
151 | - Name="System.Data.SQLite.DLL" |
152 | - DiskId="1" |
153 | - Source="build_results\Daemon\System.Data.SQLite.DLL" |
154 | - KeyPath="yes"/> |
155 | - </Component> |
156 | - <Directory Id="DaemonConfigDir" |
157 | - Name="Config"> |
158 | - <Component Id="DaemonConfigLog4Net" |
159 | - Guid="306252c0-967e-11df-981c-0800200c9a66"> |
160 | - <File Id="log4net.config" |
161 | - Name="log4net.config" |
162 | - DiskId="1" |
163 | - Source="build_results\Daemon\Config\log4net.config" |
164 | - KeyPath="yes"/> |
165 | - </Component> |
166 | - <Component Id="ServiceModelBehavioursConfig" |
167 | - Guid="5f9a6390-98cf-11df-981c-0800200c9a66"> |
168 | - <File Id="serviceModel.behaviours.config" |
169 | - Name="serviceModel.behaviours.config" |
170 | - DiskId="1" |
171 | - Source="build_results\Daemon\Config\serviceModel.behaviours.config" |
172 | - KeyPath="yes"/> |
173 | - </Component> |
174 | - <Component Id="ServiceModelBindingsConfig" |
175 | - Guid="65aca630-98cf-11df-981c-0800200c9a66"> |
176 | - <File Id="serviceModel.bindings.config" |
177 | - Name="serviceModel.bindings.config" |
178 | - DiskId="1" |
179 | - Source="build_results\Daemon\Config\serviceModel.bindings.config" |
180 | - KeyPath="yes"/> |
181 | - </Component> |
182 | - <Component Id="ServiceModelServicesConfig" |
183 | - Guid="6a7e5280-98cf-11df-981c-0800200c9a66"> |
184 | - <File Id="serviceModel.services.config" |
185 | - Name="serviceModel.services.config" |
186 | - DiskId="1" |
187 | - Source="build_results\Daemon\Config\serviceModel.services.config" |
188 | - KeyPath="yes"/> |
189 | - </Component> |
190 | - </Directory> |
191 | - </Directory> |
192 | <Directory Id="ClientDir" |
193 | Name="Client"> |
194 | <!-- Auto-start via Registry --> |
195 | @@ -379,6 +195,14 @@ |
196 | Source="build_results\Client\Canonical.UbuntuOne.Client.Views.pdb" |
197 | KeyPath="yes"/> |
198 | </Component> |
199 | + <Component Id="UbuntuOneProcessLib" |
200 | + Guid="a0d70ad0-db6d-11df-937b-0800200c9a66"> |
201 | + <File Id="Canonical.UbuntuOne.ProcessDispatcher.dll" |
202 | + Name="Canonical.UbuntuOne.ProcessDispatcher.dll" |
203 | + DiskId="1" |
204 | + Source="build_results\Client\Canonical.UbuntuOne.ProcessDispatcher.dll" |
205 | + KeyPath="yes"/> |
206 | + </Component> |
207 | <Component Id="UbuntuOneCommonLib" |
208 | Guid="cadc1620-9f9c-11df-981c-0800200c9a66"> |
209 | <File Id="Canonical.UbuntuOne.Common.dll_client" |
210 | @@ -493,22 +317,6 @@ |
211 | Source="build_results\Client\Config\log4net.config" |
212 | KeyPath="yes"/> |
213 | </Component> |
214 | - <Component Id="ClientConfigServiceModelBindings" |
215 | - Guid="a76325d0-d200-11df-bd3b-0800200c9a66"> |
216 | - <File Id="serviceModelBindings_client" |
217 | - Name="serviceModel.bindings.config" |
218 | - DiskId="1" |
219 | - Source="build_results\Client\Config\serviceModel.bindings.config" |
220 | - KeyPath="yes"/> |
221 | - </Component> |
222 | - <Component Id="ClientConfigServiceModelClient" |
223 | - Guid="b2b8c250-d200-11df-bd3b-0800200c9a66"> |
224 | - <File Id="serviceModelClient_client" |
225 | - Name="serviceModel.client.config" |
226 | - DiskId="1" |
227 | - Source="build_results\Client\Config\serviceModel.client.config" |
228 | - KeyPath="yes"/> |
229 | - </Component> |
230 | </Directory> |
231 | <Directory Id="U1SyncExecutable" |
232 | Name="U1Sync"> |
233 | @@ -930,31 +738,10 @@ |
234 | <ComponentRef Id="UbuntuOneGoDaddyClass2CAComponent" /> |
235 | <ComponentRef Id="AddedIconComponent" /> |
236 | <ComponentRef Id="ConflictIconComponent" /> |
237 | - <!-- Daemon components --> |
238 | - <ComponentRef Id="DaemonCommonLibComponent" /> |
239 | - <ComponentRef Id="DaemonCommonPdbComponent" /> |
240 | - <ComponentRef Id="CommonLoggingComponent" /> |
241 | - <ComponentRef Id="CommonLoggingLog4NetComponent" /> |
242 | - <ComponentRef Id="DotUpdaterLib" /> |
243 | - <ComponentRef Id="Log4NetComponent" /> |
244 | - <ComponentRef Id="SpringAopComponent" /> |
245 | - <ComponentRef Id="SpringAopConfigComponent" /> |
246 | - <ComponentRef Id="SpringCoreComponent" /> |
247 | - <ComponentRef Id="SpringCoreConfigComponent" /> |
248 | - <ComponentRef Id="SpringServicesComponent" /> |
249 | - <ComponentRef Id="SpringServicesConfigComponent" /> |
250 | - <ComponentRef Id="DaemonProgramComponent" /> |
251 | - <ComponentRef Id="DaemonProgramComponentConfig" /> |
252 | - <ComponentRef Id="DaemonProgramPdbComponent" /> |
253 | - <ComponentRef Id="DaemonConfigLog4Net" /> |
254 | - <ComponentRef Id="ServiceModelBehavioursConfig" /> |
255 | - <ComponentRef Id="ServiceModelBindingsConfig" /> |
256 | - <ComponentRef Id="ServiceModelServicesConfig" /> |
257 | - <ComponentRef Id="SpringDataComponent" /> |
258 | - <ComponentRef Id="SymstemDataSQLiteComponent" /> |
259 | <!-- Client components --> |
260 | <ComponentRef Id="PhoenixLib" /> |
261 | <ComponentRef Id="AvalonLib" /> |
262 | + <ComponentRef Id="UbuntuOneProcessLib" /> |
263 | <ComponentRef Id="UbuntuOneClientLib" /> |
264 | <ComponentRef Id="UbuntuOneClientLibPdb" /> |
265 | <ComponentRef Id="UbuntuOneClientViewsLib" /> |
266 | @@ -973,10 +760,7 @@ |
267 | <ComponentRef Id="UbuntuOneClientConfig" /> |
268 | <ComponentRef Id="UbuntuOneClientPdb" /> |
269 | <ComponentRef Id="ClientConfigLog4Net" /> |
270 | - <ComponentRef Id="ClientConfigServiceModelBindings" /> |
271 | - <ComponentRef Id="ClientConfigServiceModelClient" /> |
272 | <!-- Client auto start --> |
273 | - <ComponentRef Id="DaemonAutostart" /> |
274 | <ComponentRef Id="UbuntuOneClietnAutostart" /> |
275 | <!-- U1Sync pacakge --> |
276 | <ComponentRef Id="CTypesComponent" /> |
277 | |
278 | === modified file 'install/UbuntuOneXP.wxs' |
279 | --- install/UbuntuOneXP.wxs 2010-10-19 14:28:02 +0000 |
280 | +++ install/UbuntuOneXP.wxs 2010-10-19 14:28:04 +0000 |
281 | @@ -110,190 +110,6 @@ |
282 | KeyPath="yes"/> |
283 | </Component> |
284 | </Directory> |
285 | - <Directory Id="DaemonDir" |
286 | - Name="Daemon"> |
287 | - <Component Id="DaemonAutostart" |
288 | - Guid="c3308920-d2d1-11df-bd3b-0800200c9a66"> |
289 | - <RegistryValue Id="Daemon.rst" |
290 | - Root="HKCU" |
291 | - Key="Software\Microsoft\Windows\CurrentVersion\Run" |
292 | - Name="Ubuntu One Client Daemon" |
293 | - Value="[DaemonDir]Canonical.UbuntuOne.ProcessDispatcher.exe" |
294 | - Type="string"/> |
295 | - <Condition>UBUNTUONeDAEMON_START_VIA_REGISTRY</Condition> |
296 | - </Component> |
297 | - <Component Id="DaemonCommonLibComponent" |
298 | - Guid="a609b650-94b5-11df-981c-0800200c9a66"> |
299 | - <File Id="Canonical.UbuntuOne.Common.dll" |
300 | - Name="Canonical.UbuntuOne.Common.dll" |
301 | - DiskId="1" |
302 | - Source="build_results\Daemon\Canonical.UbuntuOne.Common.dll" |
303 | - KeyPath="yes"/> |
304 | - </Component> |
305 | - <Component Id="DaemonCommonPdbComponent" |
306 | - Guid="c4ddb5e0-94b5-11df-981c-0800200c9a66"> |
307 | - <File Id="Canonical.UbuntuOne.Common.pdb" |
308 | - Name="Canonical.UbuntuOne.Common.pdb" |
309 | - DiskId="1" |
310 | - Source="build_results\Daemon\Canonical.UbuntuOne.Common.pdb" |
311 | - KeyPath="yes"/> |
312 | - </Component> |
313 | - <Component Id="DaemonProgramComponent" |
314 | - Guid="f2d91a70-94b5-11df-981c-0800200c9a66"> |
315 | - <File Id="Canonical.UbuntuOne.ProcessDispatcher.exe" |
316 | - Name="Canonical.UbuntuOne.ProcessDispatcher.exe" |
317 | - DiskId="1" |
318 | - Source="build_results\Daemon\Canonical.UbuntuOne.ProcessDispatcher.exe" |
319 | - KeyPath="yes"/> |
320 | - </Component> |
321 | - <Component Id="DaemonProgramComponentConfig" |
322 | - Guid="6ac2f100-94bb-11df-981c-0800200c9a66"> |
323 | - <File Id="Canonical.UbuntuOne.ProcessDispatcher.exe.config" |
324 | - Name="Canonical.UbuntuOne.ProcessDispatcher.exe.config" |
325 | - DiskId="1" |
326 | - Source="build_results\Daemon\Canonical.UbuntuOne.ProcessDispatcher.exe.config" |
327 | - KeyPath="yes"/> |
328 | - </Component> |
329 | - <Component Id="DaemonProgramPdbComponent" |
330 | - Guid="052b3280-94b6-11df-981c-0800200c9a66"> |
331 | - <File Id="Canonical.UbuntuOne.ProcessDispatcher.pdb" |
332 | - Name="Canonical.UbuntuOne.ProcessDispatcher.pdb" |
333 | - DiskId="1" |
334 | - Source="build_results\Daemon\Canonical.UbuntuOne.ProcessDispatcher.pdb" |
335 | - KeyPath="yes"/> |
336 | - </Component> |
337 | - <Component Id="CommonLoggingComponent" |
338 | - Guid="24d7ded0-94b6-11df-981c-0800200c9a66"> |
339 | - <File Id="Common.Logging.dll" |
340 | - Name="Common.Logging.dll" |
341 | - DiskId="1" |
342 | - Source="build_results\Daemon\Common.Logging.dll" |
343 | - KeyPath="yes"/> |
344 | - </Component> |
345 | - <Component Id="CommonLoggingLog4NetComponent" |
346 | - Guid="6ac0e8b0-967d-11df-981c-0800200c9a66"> |
347 | - <File Id="Common.Logging.Log4Net.dll" |
348 | - Name="Common.Logging.Log4Net.dll" |
349 | - DiskId="1" |
350 | - Source="build_results\Daemon\Common.Logging.Log4Net.dll" |
351 | - KeyPath="yes"/> |
352 | - </Component> |
353 | - <Component Id="DotUpdaterLib" |
354 | - Guid="af217c90-967d-11df-981c-0800200c9a66"> |
355 | - <File Id="DotUpdater.dll" |
356 | - Name="DotUpdater.dll" |
357 | - DiskId="1" |
358 | - Source="build_results\Daemon\DotUpdater.dll" |
359 | - KeyPath="yes"/> |
360 | - </Component> |
361 | - <Component Id="Log4NetComponent" |
362 | - Guid="0eafc310-94b7-11df-981c-0800200c9a66"> |
363 | - <File Id="log4net.dll" |
364 | - Name="log4net.dll" |
365 | - DiskId="1" |
366 | - Source="build_results\Daemon\log4net.dll" |
367 | - KeyPath="yes"/> |
368 | - </Component> |
369 | - <Component Id="SpringAopComponent" |
370 | - Guid="5431cc80-94b7-11df-981c-0800200c9a66"> |
371 | - <File Id="Spring.Aop.dll" |
372 | - Name="Spring.Aop.dll" |
373 | - DiskId="1" |
374 | - Source="build_results\Daemon\Spring.Aop.dll" |
375 | - KeyPath="yes"/> |
376 | - </Component> |
377 | - <Component Id="SpringAopConfigComponent" |
378 | - Guid="668e92f0-94b7-11df-981c-0800200c9a66"> |
379 | - <File Id="Spring.Aop.xml" |
380 | - Name="Spring.Aop.xml" |
381 | - DiskId="1" |
382 | - Source="build_results\Daemon\Spring.Aop.xml" |
383 | - KeyPath="yes"/> |
384 | - </Component> |
385 | - <Component Id="SpringCoreComponent" |
386 | - Guid="7780a5d0-94b7-11df-981c-0800200c9a66"> |
387 | - <File Id="Spring.Core.dll" |
388 | - Name="Spring.Core.dll" |
389 | - DiskId="1" |
390 | - Source="build_results\Daemon\Spring.Core.dll" |
391 | - KeyPath="yes"/> |
392 | - </Component> |
393 | - <Component Id="SpringCoreConfigComponent" |
394 | - Guid="8149fd00-94b7-11df-981c-0800200c9a66"> |
395 | - <File Id="Spring.Core.xml" |
396 | - Name="Spring.Core.xml" |
397 | - DiskId="1" |
398 | - Source="build_results\Daemon\Spring.Core.xml" |
399 | - KeyPath="yes"/> |
400 | - </Component> |
401 | - <Component Id="SpringServicesComponent" |
402 | - Guid="fd27e7a0-98ce-11df-981c-0800200c9a66"> |
403 | - <File Id="Spring.Services.dll" |
404 | - Name="Spring.Services.dll" |
405 | - DiskId="1" |
406 | - Source="build_results\Daemon\Spring.Services.dll" |
407 | - KeyPath="yes"/> |
408 | - </Component> |
409 | - <Component Id="SpringServicesConfigComponent" |
410 | - Guid="33b757b0-98cf-11df-981c-0800200c9a66"> |
411 | - <File Id="Spring.Services.xml" |
412 | - Name="Spring.Services.xml" |
413 | - DiskId="1" |
414 | - Source="build_results\Daemon\Spring.Services.xml" |
415 | - KeyPath="yes"/> |
416 | - </Component> |
417 | - <Component Id="SpringDataComponent" |
418 | - Guid="e1736390-aac1-11df-94e2-0800200c9a66"> |
419 | - <File Id="Spring.Data.dll" |
420 | - Name="Spring.Data.dll" |
421 | - DiskId="1" |
422 | - Source="build_results\Daemon\Spring.Data.dll" |
423 | - KeyPath="yes"/> |
424 | - </Component> |
425 | - <Component Id="SymstemDataSQLiteComponent" |
426 | - Guid="43573410-aac2-11df-94e2-0800200c9a66"> |
427 | - <File Id="System.Data.SQLite.DLL" |
428 | - Name="System.Data.SQLite.DLL" |
429 | - DiskId="1" |
430 | - Source="build_results\Daemon\System.Data.SQLite.DLL" |
431 | - KeyPath="yes"/> |
432 | - </Component> |
433 | - <Directory Id="DaemonConfigDir" |
434 | - Name="Config"> |
435 | - <Component Id="DaemonConfigLog4Net" |
436 | - Guid="306252c0-967e-11df-981c-0800200c9a66"> |
437 | - <File Id="log4net.config" |
438 | - Name="log4net.config" |
439 | - DiskId="1" |
440 | - Source="build_results\Daemon\Config\log4net.config" |
441 | - KeyPath="yes"/> |
442 | - </Component> |
443 | - <Component Id="ServiceModelBehavioursConfig" |
444 | - Guid="5f9a6390-98cf-11df-981c-0800200c9a66"> |
445 | - <File Id="serviceModel.behaviours.config" |
446 | - Name="serviceModel.behaviours.config" |
447 | - DiskId="1" |
448 | - Source="build_results\Daemon\Config\serviceModel.behaviours.config" |
449 | - KeyPath="yes"/> |
450 | - </Component> |
451 | - <Component Id="ServiceModelBindingsConfig" |
452 | - Guid="65aca630-98cf-11df-981c-0800200c9a66"> |
453 | - <File Id="serviceModel.bindings.config" |
454 | - Name="serviceModel.bindings.config" |
455 | - DiskId="1" |
456 | - Source="build_results\Daemon\Config\serviceModel.bindings.config" |
457 | - KeyPath="yes"/> |
458 | - </Component> |
459 | - <Component Id="ServiceModelServicesConfig" |
460 | - Guid="6a7e5280-98cf-11df-981c-0800200c9a66"> |
461 | - <File Id="serviceModel.services.config" |
462 | - Name="serviceModel.services.config" |
463 | - DiskId="1" |
464 | - Source="build_results\Daemon\Config\serviceModel.services.config" |
465 | - KeyPath="yes"/> |
466 | - </Component> |
467 | - </Directory> |
468 | - </Directory> |
469 | <Directory Id="ClientDir" |
470 | Name="Client"> |
471 | <!-- Auto-start via Registry --> |
472 | @@ -307,6 +123,14 @@ |
473 | Type="string"/> |
474 | <Condition>UBUNTUONECLIENT_START_VIA_REGISTRY</Condition> |
475 | </Component> |
476 | + <Component Id="DaemonProgramComponent" |
477 | + Guid="f2d91a70-94b5-11df-981c-0800200c9a66"> |
478 | + <File Id="Canonical.UbuntuOne.ProcessDispatcher.dll" |
479 | + Name="Canonical.UbuntuOne.ProcessDispatcher.dll" |
480 | + DiskId="1" |
481 | + Source="build_results\Client\Canonical.UbuntuOne.ProcessDispatcher.dll" |
482 | + KeyPath="yes"/> |
483 | + </Component> |
484 | <Component Id="PhoenixLib" |
485 | Guid="02c46240-d77e-11df-937b-0800200c9a66"> |
486 | <File Id="PhoenixControlLib.dll" |
487 | @@ -379,6 +203,14 @@ |
488 | Source="build_results\Client\Canonical.UbuntuOne.Client.Views.pdb" |
489 | KeyPath="yes"/> |
490 | </Component> |
491 | + <Component Id="UbuntuOneProcessLib" |
492 | + Guid="a0d70ad0-db6d-11df-937b-0800200c9a66"> |
493 | + <File Id="Canonical.UbuntuOne.ProcessDispatcher.dll" |
494 | + Name="Canonical.UbuntuOne.ProcessDispatcher.dll" |
495 | + DiskId="1" |
496 | + Source="build_results\Client\Canonical.UbuntuOne.ProcessDispatcher.dll" |
497 | + KeyPath="yes"/> |
498 | + </Component> |
499 | <Component Id="UbuntuOneCommonLib" |
500 | Guid="cadc1620-9f9c-11df-981c-0800200c9a66"> |
501 | <File Id="Canonical.UbuntuOne.Common.dll_client" |
502 | @@ -493,22 +325,6 @@ |
503 | Source="build_results\Client\Config\log4net.config" |
504 | KeyPath="yes"/> |
505 | </Component> |
506 | - <Component Id="ClientConfigServiceModelBindings" |
507 | - Guid="a76325d0-d200-11df-bd3b-0800200c9a66"> |
508 | - <File Id="serviceModelBindings_client" |
509 | - Name="serviceModel.bindings.config" |
510 | - DiskId="1" |
511 | - Source="build_results\Client\Config\serviceModel.bindings.config" |
512 | - KeyPath="yes"/> |
513 | - </Component> |
514 | - <Component Id="ClientConfigServiceModelClient" |
515 | - Guid="b2b8c250-d200-11df-bd3b-0800200c9a66"> |
516 | - <File Id="serviceModelClient_client" |
517 | - Name="serviceModel.client.config" |
518 | - DiskId="1" |
519 | - Source="build_results\Client\Config\serviceModel.client.config" |
520 | - KeyPath="yes"/> |
521 | - </Component> |
522 | </Directory> |
523 | <Directory Id="U1SyncExecutable" |
524 | Name="U1Sync"> |
525 | @@ -778,34 +594,13 @@ |
526 | <ComponentRef Id="UbuntuOneGoDaddyClass2CAComponent" /> |
527 | <ComponentRef Id="AddedIconComponent" /> |
528 | <ComponentRef Id="ConflictIconComponent" /> |
529 | - <!-- Daemon components --> |
530 | - <ComponentRef Id="DaemonCommonLibComponent" /> |
531 | - <ComponentRef Id="DaemonCommonPdbComponent" /> |
532 | - <ComponentRef Id="CommonLoggingComponent" /> |
533 | - <ComponentRef Id="CommonLoggingLog4NetComponent" /> |
534 | - <ComponentRef Id="DotUpdaterLib" /> |
535 | - <ComponentRef Id="Log4NetComponent" /> |
536 | - <ComponentRef Id="SpringAopComponent" /> |
537 | - <ComponentRef Id="SpringAopConfigComponent" /> |
538 | - <ComponentRef Id="SpringCoreComponent" /> |
539 | - <ComponentRef Id="SpringCoreConfigComponent" /> |
540 | - <ComponentRef Id="SpringServicesComponent" /> |
541 | - <ComponentRef Id="SpringServicesConfigComponent" /> |
542 | - <ComponentRef Id="DaemonProgramComponent" /> |
543 | - <ComponentRef Id="DaemonProgramComponentConfig" /> |
544 | - <ComponentRef Id="DaemonProgramPdbComponent" /> |
545 | - <ComponentRef Id="DaemonConfigLog4Net" /> |
546 | - <ComponentRef Id="ServiceModelBehavioursConfig" /> |
547 | - <ComponentRef Id="ServiceModelBindingsConfig" /> |
548 | - <ComponentRef Id="ServiceModelServicesConfig" /> |
549 | - <ComponentRef Id="SpringDataComponent" /> |
550 | - <ComponentRef Id="SymstemDataSQLiteComponent" /> |
551 | <!-- Client components --> |
552 | <ComponentRef Id="PhoenixLib" /> |
553 | <ComponentRef Id="AvalonLib" /> |
554 | <ComponentRef Id="UbuntuOneClientLib" /> |
555 | <ComponentRef Id="UbuntuOneClientLibPdb" /> |
556 | <ComponentRef Id="UbuntuOneClientViewsLib" /> |
557 | + <ComponentRef Id="UbuntuOneProcessLib" /> |
558 | <ComponentRef Id="UbuntuOneClientViewsLibPdb" /> |
559 | <ComponentRef Id="UbuntuOneCommonLib" /> |
560 | <ComponentRef Id="UbuntuOneCommonLibPdb" /> |
561 | @@ -821,10 +616,7 @@ |
562 | <ComponentRef Id="UbuntuOneClientConfig" /> |
563 | <ComponentRef Id="UbuntuOneClientPdb" /> |
564 | <ComponentRef Id="ClientConfigLog4Net" /> |
565 | - <ComponentRef Id="ClientConfigServiceModelBindings" /> |
566 | - <ComponentRef Id="ClientConfigServiceModelClient" /> |
567 | <!-- auto start --> |
568 | - <ComponentRef Id="DaemonAutostart" /> |
569 | <ComponentRef Id="UbuntuOneClietnAutostart" /> |
570 | <!-- U1Sync pacakge --> |
571 | <ComponentRef Id="CTypesComponent" /> |
572 | |
573 | === modified file 'src/Canonical.Ubuntu.SSO/ISSOCredentialsProvider.cs' |
574 | --- src/Canonical.Ubuntu.SSO/ISSOCredentialsProvider.cs 2010-09-09 09:11:07 +0000 |
575 | +++ src/Canonical.Ubuntu.SSO/ISSOCredentialsProvider.cs 2010-10-19 14:28:04 +0000 |
576 | @@ -58,7 +58,7 @@ |
577 | /// The result of this action will be notified through the use of the event handlers |
578 | /// due to the fact that the call to the sso webservice is async. |
579 | /// </summary> |
580 | - void LoginToGetCredentials(); |
581 | + void LoginToGetCredentials(string eventName, string applicationName); |
582 | |
583 | /// <summary> |
584 | /// This method will try to fetch the credentials from the registry and return them, |
585 | |
586 | === modified file 'src/Canonical.Ubuntu.SSO/SSOCredentialsProvider.cs' |
587 | --- src/Canonical.Ubuntu.SSO/SSOCredentialsProvider.cs 2010-10-19 14:28:02 +0000 |
588 | +++ src/Canonical.Ubuntu.SSO/SSOCredentialsProvider.cs 2010-10-19 14:28:04 +0000 |
589 | @@ -70,7 +70,7 @@ |
590 | /// due to the fact that the call to the sso webservice is async. |
591 | /// </summary> |
592 | [DebugLogged] |
593 | - public void LoginToGetCredentials() |
594 | + public void LoginToGetCredentials(string eventName, string applicationName) |
595 | { |
596 | try |
597 | { |
598 | @@ -87,13 +87,14 @@ |
599 | var tokenName = string.Format(ApplicationTokenName, Environment.MachineName); |
600 | secret = SSOLoginProcessor.Login(LoginView.EmailAddress, LoginView.Password, tokenName); |
601 | // save the credentials in the keyring |
602 | - Keyring.CreateSecret(KeyringName, ApplicationName, secret); |
603 | + // TODO: We have an issue here since we have more than one listening for the same credntials of Ubuntu One |
604 | + Keyring.CreateSecret(KeyringName, applicationName, secret); |
605 | } |
606 | else |
607 | { |
608 | if (OnCredetialsDenied != null) |
609 | { |
610 | - OnCredetialsDenied(this, new CredentialsDeniedEventArgs(ApplicationName)); |
611 | + OnCredetialsDenied(this, new CredentialsDeniedEventArgs(eventName)); |
612 | } |
613 | return; |
614 | } |
615 | @@ -114,14 +115,14 @@ |
616 | {"ConsumerKey", consumerKey}, |
617 | {"ConsumerSecret", consumerSecret} |
618 | }; |
619 | - OnCredentialsFound(this, new CredentialsFoundEventArgs(ApplicationName, credentials)); |
620 | + OnCredentialsFound(this, new CredentialsFoundEventArgs(eventName, credentials)); |
621 | } |
622 | } |
623 | catch (SSOLoginException e) |
624 | { |
625 | if (OnCredetialsDenied != null) |
626 | { |
627 | - OnCredetialsDenied(this, new CredentialsDeniedEventArgs(ApplicationName)); |
628 | + OnCredetialsDenied(this, new CredentialsDeniedEventArgs(eventName)); |
629 | } |
630 | } |
631 | catch (Exception e) |
632 | @@ -129,7 +130,7 @@ |
633 | // we have an error, therefore we will execute the OnCredentialsError |
634 | if (OnCredentialsError != null) |
635 | { |
636 | - OnCredentialsError(this, new CredentialsErrorEventArgs(ApplicationName, e.Message, e.StackTrace)); |
637 | + OnCredentialsError(this, new CredentialsErrorEventArgs(eventName, e.Message, e.StackTrace)); |
638 | } |
639 | } |
640 | |
641 | |
642 | === modified file 'src/Canonical.UbuntuOne.Client.Test/Notification/NotificationPresenterFixture.cs' |
643 | --- src/Canonical.UbuntuOne.Client.Test/Notification/NotificationPresenterFixture.cs 2010-10-19 14:28:02 +0000 |
644 | +++ src/Canonical.UbuntuOne.Client.Test/Notification/NotificationPresenterFixture.cs 2010-10-19 14:28:04 +0000 |
645 | @@ -141,25 +141,6 @@ |
646 | } |
647 | |
648 | [Test] |
649 | - public void OnNotificationTest() |
650 | - { |
651 | - IEventRaiser onNotificationRaiser; |
652 | - var notification = "mensagge"; |
653 | - var args = new NotificationEventArgs(notification); |
654 | - using (_mocks.Record()) |
655 | - { |
656 | - _notifier.OnNotification += null; |
657 | - onNotificationRaiser = LastCall.IgnoreArguments().GetEventRaiser(); |
658 | - _view.Notification = notification; |
659 | - } |
660 | - using(_mocks.Playback()) |
661 | - { |
662 | - _presenter.SyncDaemonClientNotifier = _notifier; |
663 | - onNotificationRaiser.Raise(this, args); |
664 | - } |
665 | - } |
666 | - |
667 | - [Test] |
668 | public void OpenPreferencesTest() |
669 | { |
670 | using(_mocks.Record()) |
671 | |
672 | === modified file 'src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml' |
673 | --- src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml 2010-10-19 14:28:02 +0000 |
674 | +++ src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml 2010-10-19 14:28:04 +0000 |
675 | @@ -31,10 +31,10 @@ |
676 | ShowActivated="False"> |
677 | <DockPanel> |
678 | <StackPanel Margin="20"> |
679 | - <av:NotifyIcon Name="notifyIcon" Icon="/Canonical.UbuntuOne.Client.Views;component/Resources/ubuntu-logo-22x22.png" |
680 | + <av:NotifyIcon Name="NotifyIcon" Icon="/Canonical.UbuntuOne.Client.Views;component/Resources/ubuntu-logo-22x22.png" |
681 | Text="Ubuntu One"> <!-- TODO: Add icon Icon="/AvalonLibraryTestPages;component/Properties/App.ico" Open preferences when click --> |
682 | <FrameworkElement.ContextMenu > |
683 | - <ContextMenu> |
684 | + <ContextMenu StaysOpen="False"> |
685 | <MenuItem x:Uid="UbuntuOneManualSync" |
686 | Name="UbuntuOneManualSync" |
687 | Header="{x:Static resx:Resources.NotificationIconUbuntuOneManualSyncLabel}" |
688 | |
689 | === modified file 'src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml.cs' |
690 | --- src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml.cs 2010-10-19 14:28:02 +0000 |
691 | +++ src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml.cs 2010-10-19 14:28:04 +0000 |
692 | @@ -18,7 +18,10 @@ |
693 | */ |
694 | using System; |
695 | using System.Collections.Generic; |
696 | +using System.Threading; |
697 | +using Avalon.Windows.Controls; |
698 | using Canonical.UbuntuOne.Client.Notification; |
699 | +using Canonical.UbuntuOne.Common.Threading; |
700 | |
701 | namespace Canonical.UbuntuOne.Client.Views |
702 | { |
703 | @@ -27,6 +30,13 @@ |
704 | /// </summary> |
705 | public partial class UbuntuOneNotifyIcon : INotificationIconView |
706 | { |
707 | + #region Variables |
708 | + |
709 | + private IDispatcher _dispatcher; |
710 | + private readonly object _dispatcherLock = new object(); |
711 | + |
712 | + #endregion |
713 | + |
714 | #region DI Properties |
715 | |
716 | /// <summary> |
717 | @@ -53,12 +63,14 @@ |
718 | } |
719 | |
720 | /// <summary> |
721 | - /// Gets and sets a notification to be shown to the user. |
722 | + /// Shows the given notification to the user. |
723 | /// </summary> |
724 | - public string Notification |
725 | + /// <param name="timeout">The amount of time to show the notification.</param> |
726 | + /// <param name="title">The title of the notification.</param> |
727 | + /// <param name="text">The text of the notification.</param> |
728 | + public void ShowNotification(int timeout, string title, string text) |
729 | { |
730 | - get { throw new NotImplementedException(); } |
731 | - set { throw new NotImplementedException(); } |
732 | + NotifyIcon.ShowBalloonTip(timeout, title, text, NotifyBalloonIcon.Info); |
733 | } |
734 | |
735 | /// <summary> |
736 | @@ -89,11 +101,31 @@ |
737 | set { throw new NotImplementedException(); } |
738 | } |
739 | |
740 | + /// <summary> |
741 | + /// Gets the dispatcher that can be used to call actions on the object from a |
742 | + /// different thread. |
743 | + /// </summary> |
744 | + public IDispatcher ViewDispatcher |
745 | + { |
746 | + get |
747 | + { |
748 | + if(_dispatcher == null) |
749 | + { |
750 | + lock (_dispatcherLock) |
751 | + { |
752 | + _dispatcher = new WpfDispatcher(Dispatcher); |
753 | + } |
754 | + } |
755 | + return _dispatcher; |
756 | + } |
757 | + set { _dispatcher = value; } |
758 | + } |
759 | #endregion |
760 | |
761 | private void OnUbuntuOneManualSyncClick(object sender, System.Windows.RoutedEventArgs e) |
762 | { |
763 | - NotificationIconPresenter.ManualSync(); |
764 | + var thread = new Thread(NotificationIconPresenter.ManualSync); |
765 | + thread.Start(); |
766 | } |
767 | |
768 | private void OnExitMenuItemClick(object sender, System.Windows.RoutedEventArgs e) |
769 | |
770 | === modified file 'src/Canonical.UbuntuOne.Client/Notification/INotificationIconView.cs' |
771 | --- src/Canonical.UbuntuOne.Client/Notification/INotificationIconView.cs 2010-10-19 14:28:02 +0000 |
772 | +++ src/Canonical.UbuntuOne.Client/Notification/INotificationIconView.cs 2010-10-19 14:28:04 +0000 |
773 | @@ -16,6 +16,7 @@ |
774 | // |
775 | // Authors: Manuel de la Peña <manuel.delapena@canonical.com> |
776 | using System.Collections.Generic; |
777 | +using Canonical.UbuntuOne.Common.Threading; |
778 | |
779 | namespace Canonical.UbuntuOne.Client.Notification |
780 | { |
781 | @@ -30,9 +31,12 @@ |
782 | bool IsManualSyncEnabled { get; set; } |
783 | |
784 | /// <summary> |
785 | - /// Gets and sets a notification to be shown to the user. |
786 | + /// Shows a notification to the user. |
787 | /// </summary> |
788 | - string Notification { get; set; } |
789 | + /// <param name="timeout">The amount of time the notification will be shown.</param> |
790 | + /// <param name="title">The title of the notification.</param> |
791 | + /// <param name="text">The text of the actual notification.</param> |
792 | + void ShowNotification(int timeout, string title, string text); |
793 | |
794 | /// <summary> |
795 | /// Gets and sets the list of recently modified files. |
796 | @@ -49,5 +53,11 @@ |
797 | /// performed. |
798 | /// </summary> |
799 | string CurrentOperation { get; set; } |
800 | + |
801 | + /// <summary> |
802 | + /// Gets the dispatcher that can be used to call actions on the object from a |
803 | + /// different thread. |
804 | + /// </summary> |
805 | + IDispatcher ViewDispatcher { get; set; } |
806 | } |
807 | } |
808 | |
809 | === modified file 'src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs' |
810 | --- src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs 2010-10-19 14:28:02 +0000 |
811 | +++ src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs 2010-10-19 14:28:04 +0000 |
812 | @@ -53,6 +53,8 @@ |
813 | private ISSOCredentialsProvider _ssoProvider; |
814 | private ILog _logger; |
815 | private readonly object _loggerLock = new object(); |
816 | + private static string EventName = "UbuntuOneNotificationIconPresenter"; |
817 | + private static string ApplicationName = "UbuntuOne"; |
818 | |
819 | #endregion |
820 | |
821 | @@ -133,13 +135,8 @@ |
822 | /// Gets and sets the channel factory that can be used to create communication objects that are used to |
823 | /// interact with the sync daemon. |
824 | /// </summary> |
825 | - public ChannelFactory<ISyncDaemon> SyncDaemonChannelFactory { get; set; } |
826 | + public ISyncDaemon SyncDaemon { get; set; } |
827 | |
828 | - /// <summary> |
829 | - /// Gets and sets the service caller that is used to do the house keeping when calling a service. |
830 | - /// </summary> |
831 | - public IServiceCaller ServiceCaller { get; set; } |
832 | - |
833 | #endregion |
834 | |
835 | #region Properties |
836 | @@ -171,37 +168,13 @@ |
837 | { |
838 | SharesLocation = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); |
839 | SyncsLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "UbuntuOne"); |
840 | - |
841 | + |
842 | } |
843 | |
844 | #endregion |
845 | |
846 | #region Helper methods |
847 | |
848 | - private void OnChanged(object source, FileSystemEventArgs e) |
849 | - { |
850 | - try |
851 | - { |
852 | - var metaRootDir = Path.Combine(SyncsLocation, ".ubuntuone-sync"); |
853 | - using ( |
854 | - var writer = |
855 | - new StreamWriter(File.Open(Path.Combine(metaRootDir, "modified.data"), FileMode.OpenOrCreate))) |
856 | - { |
857 | - writer.WriteLine(e.FullPath); |
858 | - } |
859 | - } |
860 | - catch(Exception) |
861 | - { |
862 | - // do nothing |
863 | - } |
864 | - } |
865 | - |
866 | - private static void CleanMetadata() |
867 | - { |
868 | - var metaRootDir = Path.Combine(SyncsLocation, ".ubuntuone-sync"); |
869 | - File.Open(Path.Combine(metaRootDir, "modified.data"), FileMode.Create); |
870 | - } |
871 | - |
872 | /// <summary> |
873 | /// Helper method that will ensure that when the state of the sync daemon changes this change |
874 | /// is correctly reflected in the View. |
875 | @@ -247,7 +220,7 @@ |
876 | [DebugLogged] |
877 | private void OnNotificationHandler(object sender, NotificationEventArgs e) |
878 | { |
879 | - NotificationIconView.Notification = e.Message; |
880 | + // TODO: Implement this method |
881 | } |
882 | |
883 | /// <summary> |
884 | @@ -258,25 +231,34 @@ |
885 | [DebugLogged] |
886 | private void OnCredentialsFound(object sender, CredentialsFoundEventArgs args) |
887 | { |
888 | - NotificationIconView.IsManualSyncEnabled = false; |
889 | - NotificationIconView.State = "Syncing"; |
890 | // check if the credentials are for us |
891 | - if (args.ApplicationName != "UbuntuOne") return; |
892 | + if (args.ApplicationName != EventName) return; |
893 | + NotificationIconView.ViewDispatcher.Dispatch( |
894 | + () => |
895 | + { |
896 | + NotificationIconView.IsManualSyncEnabled = false; |
897 | + NotificationIconView.State = "Syncing"; |
898 | + } |
899 | + ); |
900 | + |
901 | Logger.Info("Got the UbuntuOne credentials!"); |
902 | var oneDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), |
903 | "UbuntuOne"); |
904 | // ensure that the path can be handled by the python code |
905 | oneDir = oneDir.Replace("\\", "\\\\"); |
906 | - // call the ISyncService to perform the manual sync |
907 | - |
908 | - var syncServiceChannel = SyncDaemonChannelFactory.CreateChannel(); |
909 | - |
910 | - ServiceCaller.SaveProxyCall( |
911 | - () => syncServiceChannel.ManualSync(oneDir, args.Credentials["Token"], args.Credentials["TokenSecret"],args.Credentials["ConsumerKey"], args.Credentials["ConsumerSecret"]), |
912 | - (ICommunicationObject) syncServiceChannel); |
913 | - |
914 | - NotificationIconView.IsManualSyncEnabled = true; |
915 | - NotificationIconView.State = "Synced"; |
916 | + SyncDaemon.ManualSync( |
917 | + oneDir, |
918 | + args.Credentials["Token"], |
919 | + args.Credentials["TokenSecret"], |
920 | + args.Credentials["ConsumerKey"], |
921 | + args.Credentials["ConsumerSecret"]); |
922 | + NotificationIconView.ViewDispatcher.Dispatch( |
923 | + () => |
924 | + { |
925 | + NotificationIconView.IsManualSyncEnabled = true; |
926 | + NotificationIconView.State = "Synced"; |
927 | + } |
928 | + ); |
929 | } |
930 | |
931 | [DebugLogged] |
932 | @@ -301,9 +283,9 @@ |
933 | /// </summary> |
934 | public void ManualSync() |
935 | { |
936 | - |
937 | + |
938 | // we get the credentials, because we have register an action to the credetials aquired, we do nothing besides this |
939 | - SSOCredentialsProvider.LoginToGetCredentials(); |
940 | + SSOCredentialsProvider.LoginToGetCredentials(EventName, ApplicationName); |
941 | } |
942 | |
943 | /// <summary> |
944 | @@ -327,8 +309,8 @@ |
945 | { |
946 | Logger.WarnFormat("There was an error operning the SharesLocation, {0}", exception); |
947 | // use the view to notify the error |
948 | - NotificationIconView.Notification = String.Format(NotificationResources.ErrorOpeningFolder, |
949 | - Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)); |
950 | + NotificationIconView.ShowNotification(10, "Error", String.Format(NotificationResources.ErrorOpeningFolder, |
951 | + Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))); |
952 | throw; |
953 | } |
954 | } |
955 | |
956 | === modified file 'src/Canonical.UbuntuOne.Client/Preferences/PreferencesDialogPresenter.cs' |
957 | --- src/Canonical.UbuntuOne.Client/Preferences/PreferencesDialogPresenter.cs 2010-10-19 14:28:02 +0000 |
958 | +++ src/Canonical.UbuntuOne.Client/Preferences/PreferencesDialogPresenter.cs 2010-10-19 14:28:04 +0000 |
959 | @@ -36,6 +36,8 @@ |
960 | private ISSOCredentialsProvider _ssoProvider; |
961 | private ILog _logger; |
962 | private readonly object _loggerLock = new object(); |
963 | + private static string EventName = "UbuntuOneAutoManualSync"; |
964 | + private static string ApplicationName = "UbuntuOne"; |
965 | |
966 | #endregion |
967 | |
968 | @@ -119,7 +121,7 @@ |
969 | private void OnCredentialsFound(object sender, CredentialsFoundEventArgs args) |
970 | { |
971 | // check if the credentials are for us |
972 | - if (args.ApplicationName != "UbuntuOne") return; |
973 | + if (args.ApplicationName != EventName) return; |
974 | Logger.Info("Got the UbuntuOne credentials!"); |
975 | var oneDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), |
976 | "UbuntuOne"); |
977 | @@ -167,7 +169,7 @@ |
978 | { |
979 | PreferencesManager.AutoSyncFrequency = PreferencesView.AutoSyncFrequency; |
980 | // we get the credentials, because we have register an action to the credetials aquired, we do nothing besides this |
981 | - SSOCredentialsProvider.LoginToGetCredentials(); |
982 | + SSOCredentialsProvider.LoginToGetCredentials(EventName, ApplicationName); |
983 | } |
984 | else |
985 | { |
986 | @@ -183,7 +185,7 @@ |
987 | { |
988 | if(PreferencesManager.IsAutoSyncEnable) |
989 | // we get the credentials, because we have register an action to the credetials aquired, we do nothing besides this |
990 | - SSOCredentialsProvider.LoginToGetCredentials(); |
991 | + SSOCredentialsProvider.LoginToGetCredentials(EventName, ApplicationName); |
992 | } |
993 | } |
994 | } |
995 | |
996 | === modified file 'src/Canonical.UbuntuOne.Client/objects.xml' |
997 | --- src/Canonical.UbuntuOne.Client/objects.xml 2010-10-19 14:28:02 +0000 |
998 | +++ src/Canonical.UbuntuOne.Client/objects.xml 2010-10-19 14:28:04 +0000 |
999 | @@ -2,8 +2,9 @@ |
1000 | <objects xmlns="http://www.springframework.net"> |
1001 | <!-- Define the different presenters to be used --> |
1002 | <object id="NotificationIconPresenter" |
1003 | - type="Canonical.UbuntuOne.Client.Notification.NotificationIconPresenter, Canonical.UbuntuOne.Client" |
1004 | - autowire="autodetect"/> |
1005 | + type="Canonical.UbuntuOne.Client.Notification.NotificationIconPresenter, Canonical.UbuntuOne.Client" |
1006 | + autowire="autodetect"> |
1007 | + </object> |
1008 | |
1009 | <object id="PreferencesDialogPresenter" |
1010 | type="Canonical.UbuntuOne.Client.Preferences.PreferencesDialogPresenter, Canonical.UbuntuOne.Client" |
1011 | |
1012 | === modified file 'src/Canonical.UbuntuOne.Common/OperationContracts/IEventNotifier.cs' |
1013 | --- src/Canonical.UbuntuOne.Common/OperationContracts/IEventNotifier.cs 2010-08-16 12:46:11 +0000 |
1014 | +++ src/Canonical.UbuntuOne.Common/OperationContracts/IEventNotifier.cs 2010-10-19 14:28:04 +0000 |
1015 | @@ -55,5 +55,6 @@ |
1016 | /// Gets if the notifier is listening. |
1017 | /// </summary> |
1018 | bool IsListening { get; } |
1019 | + |
1020 | } |
1021 | } |
1022 | |
1023 | === modified file 'src/Canonical.UbuntuOne.Common/OperationContracts/ISyncDaemon.cs' |
1024 | --- src/Canonical.UbuntuOne.Common/OperationContracts/ISyncDaemon.cs 2010-10-19 14:28:02 +0000 |
1025 | +++ src/Canonical.UbuntuOne.Common/OperationContracts/ISyncDaemon.cs 2010-10-19 14:28:04 +0000 |
1026 | @@ -29,6 +29,7 @@ |
1027 | [ServiceContract] |
1028 | public interface ISyncDaemon |
1029 | { |
1030 | + |
1031 | /// <summary> |
1032 | /// Allows to perform a manual sync of the root Ubuntu One directory in the provided path using the oauth information |
1033 | /// passed to the service. |
1034 | |
1035 | === modified file 'src/Canonical.UbuntuOne.ProcessDispatcher/Canonical.UbuntuOne.ProcessDispatcher.csproj' |
1036 | --- src/Canonical.UbuntuOne.ProcessDispatcher/Canonical.UbuntuOne.ProcessDispatcher.csproj 2010-10-19 14:28:02 +0000 |
1037 | +++ src/Canonical.UbuntuOne.ProcessDispatcher/Canonical.UbuntuOne.ProcessDispatcher.csproj 2010-10-19 14:28:04 +0000 |
1038 | @@ -6,7 +6,7 @@ |
1039 | <ProductVersion>9.0.21022</ProductVersion> |
1040 | <SchemaVersion>2.0</SchemaVersion> |
1041 | <ProjectGuid>{8D353509-C095-4E72-A693-3CEE97704C7D}</ProjectGuid> |
1042 | - <OutputType>WinExe</OutputType> |
1043 | + <OutputType>Library</OutputType> |
1044 | <RootNamespace>Canonical.UbuntuOne.ProcessDispatcher</RootNamespace> |
1045 | <AssemblyName>Canonical.UbuntuOne.ProcessDispatcher</AssemblyName> |
1046 | <FileUpgradeFlags> |
1047 | @@ -104,9 +104,7 @@ |
1048 | <Compile Include="SyncDaemonWindowsService.cs"> |
1049 | </Compile> |
1050 | <Compile Include="CallerContext.cs" /> |
1051 | - <Compile Include="EventNotifier.cs" /> |
1052 | <Compile Include="ICallerContext.cs" /> |
1053 | - <Compile Include="Program.cs" /> |
1054 | <Compile Include="SyncConfigurationService.cs" /> |
1055 | <Compile Include="SyncDaemonService.cs" /> |
1056 | <Compile Include="SyncFileManagerService.cs" /> |
1057 | @@ -155,6 +153,10 @@ |
1058 | <Reference Include="System.Xml" /> |
1059 | </ItemGroup> |
1060 | <ItemGroup> |
1061 | + <ProjectReference Include="..\Canonical.UbuntuOne.Client\Canonical.UbuntuOne.Client.csproj"> |
1062 | + <Project>{7467483A-D6D5-4362-8DF4-57A7254EB569}</Project> |
1063 | + <Name>Canonical.UbuntuOne.Client</Name> |
1064 | + </ProjectReference> |
1065 | <ProjectReference Include="..\Canonical.UbuntuOne.Common\Canonical.UbuntuOne.Common.csproj"> |
1066 | <Project>{11353FF8-8E5A-488E-9CB1-873DADD232B9}</Project> |
1067 | <Name>Canonical.UbuntuOne.Common</Name> |
1068 | @@ -188,7 +190,9 @@ |
1069 | </BootstrapperPackage> |
1070 | </ItemGroup> |
1071 | <ItemGroup> |
1072 | - <EmbeddedResource Include="objects.xml" /> |
1073 | + <EmbeddedResource Include="objects.xml"> |
1074 | + <SubType>Designer</SubType> |
1075 | + </EmbeddedResource> |
1076 | </ItemGroup> |
1077 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
1078 | <ProjectExtensions> |
1079 | |
1080 | === removed file 'src/Canonical.UbuntuOne.ProcessDispatcher/EventNotifier.cs' |
1081 | --- src/Canonical.UbuntuOne.ProcessDispatcher/EventNotifier.cs 2010-08-24 15:49:01 +0000 |
1082 | +++ src/Canonical.UbuntuOne.ProcessDispatcher/EventNotifier.cs 1970-01-01 00:00:00 +0000 |
1083 | @@ -1,171 +0,0 @@ |
1084 | -/* |
1085 | - * Copyright 2010 Canonical Ltd. |
1086 | - * |
1087 | - * This file is part of UbuntuOne on Windows. |
1088 | - * |
1089 | - * UbuntuOne on Windows is free software: you can redistribute it and/or modify |
1090 | - * it under the terms of the GNU Lesser General Public License version |
1091 | - * as published by the Free Software Foundation. |
1092 | - * |
1093 | - * Ubuntu One on Windows is distributed in the hope that it will be useful, |
1094 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1095 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1096 | - * GNU Lesser General Public License for more details. |
1097 | - * |
1098 | - * You should have received a copy of the GNU Lesser General Public License |
1099 | - * along with UbuntuOne for Windows. If not, see <http://www.gnu.org/licenses/>. |
1100 | - * |
1101 | - * Authors: Manuel de la Peña <manuel.delapena@canonical.com> |
1102 | - */ |
1103 | -using System; |
1104 | -using System.Collections.Generic; |
1105 | -using System.IO; |
1106 | -using System.Net.Sockets; |
1107 | -using Canonical.UbuntuOne.Common; |
1108 | -using Canonical.UbuntuOne.Common.OperationContracts; |
1109 | -using log4net; |
1110 | - |
1111 | -namespace Canonical.UbuntuOne.ProcessDispatcher |
1112 | -{ |
1113 | - /// <summary> |
1114 | - /// Implementation of the IEventNotifier that receives messages from the python code through sockets and |
1115 | - /// broadcasts those messages to the .net clients that have registered to receive them. |
1116 | - /// </summary> |
1117 | - internal class EventNotifier : IEventNotifier |
1118 | - { |
1119 | - #region Helper class |
1120 | - |
1121 | - /// <summary> |
1122 | - /// This class is used to allows to keep the state of the async reading operation of the |
1123 | - /// socket. |
1124 | - /// </summary> |
1125 | - private class StateObject |
1126 | - { |
1127 | - /// <summary> |
1128 | - /// The socket we are working with. |
1129 | - /// </summary> |
1130 | - public Socket WorkSocket; |
1131 | - |
1132 | - /// <summary> |
1133 | - /// The size of the buffer that will be used to read. |
1134 | - /// </summary> |
1135 | - public const int BufferSize = 1024; |
1136 | - |
1137 | - /// <summary> |
1138 | - /// The buffer wich will be used to place the read information. |
1139 | - /// </summary> |
1140 | - public readonly byte[] Buffer = new byte[BufferSize]; |
1141 | - |
1142 | - /// <summary> |
1143 | - /// Stream that is used to concatenated the data that has been processed |
1144 | - /// so far. |
1145 | - /// </summary> |
1146 | - public readonly MemoryStream ResultBuilder = new MemoryStream(); |
1147 | - } |
1148 | - |
1149 | - #endregion |
1150 | - |
1151 | - #region Vars |
1152 | - |
1153 | - private ILog _logger; |
1154 | - private readonly object _loggerLock = new object(); |
1155 | - private readonly object _clientsLock = new object(); |
1156 | - private readonly object _portManagerLock = new object(); |
1157 | - private readonly object _isListeningLock = new object(); |
1158 | - private static readonly HashSet<ISyncDaemonClient> _registeredClients = new HashSet<ISyncDaemonClient>(); |
1159 | - private bool _isListening; |
1160 | - |
1161 | - #endregion |
1162 | - |
1163 | - #region DI properties |
1164 | - |
1165 | - /// <summary> |
1166 | - /// Gets and sets the object that is used to retrieve the information of the object |
1167 | - /// that performs the different WCF calls. |
1168 | - /// </summary> |
1169 | - internal ICallerContext<ISyncDaemonClient> CallerContext { get; set; } |
1170 | - |
1171 | - /// <summary> |
1172 | - /// Gets and sets the logger that is used to log the different activities. |
1173 | - /// </summary> |
1174 | - internal ILog Logger |
1175 | - { |
1176 | - get |
1177 | - { |
1178 | - if(_logger == null) |
1179 | - { |
1180 | - lock (_loggerLock) |
1181 | - { |
1182 | - _logger = LogManager.GetLogger(typeof (EventNotifier)); |
1183 | - } |
1184 | - } |
1185 | - return _logger; |
1186 | - } |
1187 | - set { _logger = value; } |
1188 | - } |
1189 | - |
1190 | - |
1191 | - #endregion |
1192 | - |
1193 | - #region Implementation of IEventNotifier |
1194 | - |
1195 | - /// <summary> |
1196 | - /// Method that allows to register a client that will be reciving notitications |
1197 | - /// from than point until it unregisters |
1198 | - /// </summary> |
1199 | - public void RegisterClient() |
1200 | - { |
1201 | - lock (_clientsLock) |
1202 | - { |
1203 | - // we get the client that will be used for the callbacks |
1204 | - var client = CallerContext.GetCaller(); |
1205 | - if(!_registeredClients.Contains(client)) |
1206 | - { |
1207 | - _registeredClients.Add(client); |
1208 | - } |
1209 | - } |
1210 | - } |
1211 | - |
1212 | - /// <summary> |
1213 | - /// Method that allows to unregister a client from receiving notification. |
1214 | - /// </summary> |
1215 | - public void UnregisterClient() |
1216 | - { |
1217 | - lock (_clientsLock) |
1218 | - { |
1219 | - var client = CallerContext.GetCaller(); |
1220 | - if(_registeredClients.Contains(client)) |
1221 | - { |
1222 | - _registeredClients.Remove(client); |
1223 | - } |
1224 | - } |
1225 | - } |
1226 | - |
1227 | - /// <summary> |
1228 | - /// Method that tells the notifier to start listening for other events using a separate thread. |
1229 | - /// </summary> |
1230 | - public void StartListening() |
1231 | - { |
1232 | - // TODO: Implement when ever a new techinque is used |
1233 | - throw new NotImplementedException(); |
1234 | - } |
1235 | - |
1236 | - /// <summary> |
1237 | - /// Method that tells the notifier to stop listning for events. |
1238 | - /// </summary> |
1239 | - public void StopListening() |
1240 | - { |
1241 | - // TODO: Implement whenever a new techique is used. |
1242 | - } |
1243 | - |
1244 | - /// <summary> |
1245 | - /// Gets if the notifier is listening. |
1246 | - /// </summary> |
1247 | - public bool IsListening |
1248 | - { |
1249 | - get { return _isListening; } |
1250 | - } |
1251 | - |
1252 | - #endregion |
1253 | - } |
1254 | -} |
1255 | |
1256 | === modified file 'src/Canonical.UbuntuOne.ProcessDispatcher/IPipeListener.cs' |
1257 | --- src/Canonical.UbuntuOne.ProcessDispatcher/IPipeListener.cs 2010-10-19 14:28:02 +0000 |
1258 | +++ src/Canonical.UbuntuOne.ProcessDispatcher/IPipeListener.cs 2010-10-19 14:28:04 +0000 |
1259 | @@ -2,7 +2,7 @@ |
1260 | |
1261 | namespace Canonical.UbuntuOne.ProcessDispatcher |
1262 | { |
1263 | - internal interface IPipeListener |
1264 | + public interface IPipeListener |
1265 | { |
1266 | /// <summary> |
1267 | /// Gets if the pipe listener is indeed listening to the pipe. |
1268 | |
1269 | === modified file 'src/Canonical.UbuntuOne.ProcessDispatcher/JsonMessageProcessor.cs' |
1270 | --- src/Canonical.UbuntuOne.ProcessDispatcher/JsonMessageProcessor.cs 2010-10-19 14:28:02 +0000 |
1271 | +++ src/Canonical.UbuntuOne.ProcessDispatcher/JsonMessageProcessor.cs 2010-10-19 14:28:04 +0000 |
1272 | @@ -18,21 +18,37 @@ |
1273 | * Authors: Manuel de la Peña <manuel.delapena@canonical.com> |
1274 | */ |
1275 | using System; |
1276 | +using Canonical.UbuntuOne.Client.Notification; |
1277 | +using Newtonsoft.Json.Linq; |
1278 | |
1279 | namespace Canonical.UbuntuOne.ProcessDispatcher |
1280 | { |
1281 | /// <summary> |
1282 | /// Message processor that works with json messages from python. |
1283 | /// </summary> |
1284 | - internal class JsonMessageProcessor : IMessageProcessor |
1285 | + public class JsonMessageProcessor : IMessageProcessor |
1286 | { |
1287 | + #region DI Properties |
1288 | + |
1289 | + /// <summary> |
1290 | + /// Gets and sets the notification view that will be used to send messages to the user. |
1291 | + /// </summary> |
1292 | + public INotificationIconView NotificationIconView { get; set; } |
1293 | + |
1294 | + #endregion |
1295 | + |
1296 | /// <summary> |
1297 | /// Will process the message sent by the python code and will perform all the possibly required operations. |
1298 | /// </summary> |
1299 | /// <param name="message"></param> |
1300 | public void ProcessMessage(object message) |
1301 | { |
1302 | - throw new NotImplementedException(); |
1303 | + // a message is a string that will be parsed from json and its value interpretated. |
1304 | + var messageObject = (JObject) message; |
1305 | + if(string.Compare((string)messageObject["type"], "notify", StringComparison.CurrentCultureIgnoreCase) == 0) |
1306 | + { |
1307 | + NotificationIconView.ShowNotification(10, (string)messageObject["title"], (string)messageObject["message"]); |
1308 | + } |
1309 | } |
1310 | } |
1311 | } |
1312 | |
1313 | === modified file 'src/Canonical.UbuntuOne.ProcessDispatcher/JsonPipeStreamer.cs' |
1314 | --- src/Canonical.UbuntuOne.ProcessDispatcher/JsonPipeStreamer.cs 2010-10-19 14:28:02 +0000 |
1315 | +++ src/Canonical.UbuntuOne.ProcessDispatcher/JsonPipeStreamer.cs 2010-10-19 14:28:04 +0000 |
1316 | @@ -57,8 +57,9 @@ |
1317 | stream.Read(inBuffer, 0, len); |
1318 | var json = Encoding.GetString(inBuffer); |
1319 | |
1320 | - // we just need to read the string from the python code and parse it as a json string :D |
1321 | - var message = JObject.Parse(json); |
1322 | + // we just need to read the string from the python code and parse it as a json string :D |
1323 | + var correctJson = (json.StartsWith("{")) ? json : json.Substring(2); |
1324 | + var message = JObject.Parse(correctJson); |
1325 | return message; |
1326 | } |
1327 | |
1328 | |
1329 | === modified file 'src/Canonical.UbuntuOne.ProcessDispatcher/JsonPipeStreamerFactory.cs' |
1330 | --- src/Canonical.UbuntuOne.ProcessDispatcher/JsonPipeStreamerFactory.cs 2010-10-19 14:28:02 +0000 |
1331 | +++ src/Canonical.UbuntuOne.ProcessDispatcher/JsonPipeStreamerFactory.cs 2010-10-19 14:28:04 +0000 |
1332 | @@ -22,7 +22,7 @@ |
1333 | /// <summary> |
1334 | /// PipeStreamerFactory that creates streamers that use json for communication. |
1335 | /// </summary> |
1336 | - internal class JsonPipeStreamerFactory : IPipeStreamerFactory |
1337 | + public class JsonPipeStreamerFactory : IPipeStreamerFactory |
1338 | { |
1339 | #region Implementation of IPipeStreamerFactory |
1340 | |
1341 | |
1342 | === modified file 'src/Canonical.UbuntuOne.ProcessDispatcher/PipeListener.cs' |
1343 | --- src/Canonical.UbuntuOne.ProcessDispatcher/PipeListener.cs 2010-10-19 14:28:02 +0000 |
1344 | +++ src/Canonical.UbuntuOne.ProcessDispatcher/PipeListener.cs 2010-10-19 14:28:04 +0000 |
1345 | @@ -30,7 +30,7 @@ |
1346 | /// from the python code and will perform an operation for each messages |
1347 | /// that has been recived. |
1348 | /// </summary> |
1349 | - internal class PipeListener : IPipeListener |
1350 | + public class PipeListener : IPipeListener |
1351 | { |
1352 | #region Helper strcut |
1353 | |
1354 | @@ -190,7 +190,7 @@ |
1355 | // has been disposed |
1356 | if (IsListening) |
1357 | { |
1358 | - ThreadPool.QueueUserWorkItem(Listen, namedPipeState.NamedPipe); |
1359 | + ThreadPool.QueueUserWorkItem(Listen, namedPipeState); |
1360 | } |
1361 | } |
1362 | catch (PlatformNotSupportedException e) |
1363 | @@ -220,6 +220,7 @@ |
1364 | throw new PipeListenerException( |
1365 | "The number of threads to use to listen to the pipe must be at least one."); |
1366 | } |
1367 | + IsListening = true; |
1368 | // we will be using a thread pool that will allow to have the different threads listening to |
1369 | // the messages of the pipes. There could be issues if the devel provided far to many threads |
1370 | // to listen to the pipe since the number of pipe servers is limited. |
1371 | |
1372 | === removed file 'src/Canonical.UbuntuOne.ProcessDispatcher/Program.cs' |
1373 | --- src/Canonical.UbuntuOne.ProcessDispatcher/Program.cs 2010-10-19 14:28:02 +0000 |
1374 | +++ src/Canonical.UbuntuOne.ProcessDispatcher/Program.cs 1970-01-01 00:00:00 +0000 |
1375 | @@ -1,88 +0,0 @@ |
1376 | -/* |
1377 | - * Copyright 2010 Canonical Ltd. |
1378 | - * |
1379 | - * This file is part of UbuntuOne on Windows. |
1380 | - * |
1381 | - * UbuntuOne on Windows is free software: you can redistribute it and/or modify |
1382 | - * it under the terms of the GNU Lesser General Public License version |
1383 | - * as published by the Free Software Foundation. |
1384 | - * |
1385 | - * Ubuntu One on Windows is distributed in the hope that it will be useful, |
1386 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1387 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1388 | - * GNU Lesser General Public License for more details. |
1389 | - * |
1390 | - * You should have received a copy of the GNU Lesser General Public License |
1391 | - * along with UbuntuOne for Windows. If not, see <http://www.gnu.org/licenses/>. |
1392 | - * |
1393 | - * Authors: Manuel de la Peña <manuel.delapena@canonical.com> |
1394 | - */ |
1395 | -using System; |
1396 | -using System.Security.Principal; |
1397 | -using Canonical.UbuntuOne.Common.Container; |
1398 | -using Canonical.UbuntuOne.Common.Utils; |
1399 | -using log4net; |
1400 | - |
1401 | -namespace Canonical.UbuntuOne.ProcessDispatcher |
1402 | -{ |
1403 | - |
1404 | - static class Program |
1405 | - { |
1406 | - private static readonly ILog _logger = LogManager.GetLogger(typeof(Program)); |
1407 | - private static readonly ConfigurationLocator _configLocator = new ConfigurationLocator(); |
1408 | - private static readonly string _listegingPipe = |
1409 | - "PythonMessages"; |
1410 | - |
1411 | - /// <summary> |
1412 | - /// This method starts the service. |
1413 | - /// </summary> |
1414 | - static void Main() |
1415 | - { |
1416 | - // HACK: This technique is quite interesting although it is a hack. The idea is the following, |
1417 | - // due to the fact that we want to run a WCF service per user and not per machine, we have to be able |
1418 | - // to determine at runtime the users pipe names. To do so we would use a config file per user |
1419 | - // but ofcourse we cannot do that at install time becuase we do not know all the user. |
1420 | - // |
1421 | - // Ideally we would not have to do this hack and the ConfiguratonManager would allow to refrest the app |
1422 | - // condifuration, but it is not the case!! On top of that you cannot do so by using reflection :( |
1423 | - // |
1424 | - // The trick is simple, we use the normal app.config to start the program, once the program is started we create |
1425 | - // a new app domain where we will be doing all the work. Because we are the ones starting the app domain, we can |
1426 | - // tell him to use a diff configuration, which means that we poit to a new config for this user that points to |
1427 | - // the correct pipe names :D |
1428 | - // This is not cheap, now we have a dummy app domain, the one that start this program, and a second app domain that |
1429 | - // is used to load the spring context plus all the WCT setting. The SeriesAppDomain is the one that really does |
1430 | - // the job. |
1431 | - _logger.Debug("Redirecting configuration"); |
1432 | - |
1433 | - // Setup information for the new appdomain. |
1434 | - var setup = new AppDomainSetup |
1435 | - { |
1436 | - ConfigurationFile = _configLocator.GetCurrentUserDaemonConfiguration() |
1437 | - }; |
1438 | - |
1439 | - // Create the new appdomain with the new config. |
1440 | - var executionAppDomain = AppDomain.CreateDomain("ServicesAppDomain", AppDomain.CurrentDomain.Evidence, setup); |
1441 | - |
1442 | - // Call the write config method in that appdomain. |
1443 | - executionAppDomain.DoCallBack(() => |
1444 | - { |
1445 | - _logger.Debug("Starting services."); |
1446 | - // use the IoC to get the implementation of the SyncDaemon service, the IoC will take care of |
1447 | - // setting the object correctly. |
1448 | - ObjectsContainer.Initialize(new SpringContainer()); |
1449 | - var syncDaemonWindowsService = ObjectsContainer.GetImplementationOf<SyncDaemonWindowsService>(); |
1450 | - // To run more than one service you have to add them here |
1451 | - syncDaemonWindowsService.Start(); |
1452 | - // we need to start listening to the possible messages sent by the python code, we |
1453 | - // ensure that it is done to a ipe just for the user |
1454 | - var pipeListener = ObjectsContainer.GetImplementationOf<IPipeListener>(); |
1455 | - var userPipe = _listegingPipe + WindowsIdentity.GetCurrent().Name; |
1456 | - _logger.InfoFormat("Listening on {0}", userPipe); |
1457 | - pipeListener.StartListening(userPipe); |
1458 | - while (true) ; |
1459 | - }); |
1460 | - |
1461 | - } |
1462 | - } |
1463 | -} |
1464 | |
1465 | === modified file 'src/Canonical.UbuntuOne.ProcessDispatcher/SyncDaemonService.cs' |
1466 | --- src/Canonical.UbuntuOne.ProcessDispatcher/SyncDaemonService.cs 2010-10-19 14:28:02 +0000 |
1467 | +++ src/Canonical.UbuntuOne.ProcessDispatcher/SyncDaemonService.cs 2010-10-19 14:28:04 +0000 |
1468 | @@ -122,9 +122,8 @@ |
1469 | private Thread _autoManualSyncThread; |
1470 | private bool _isAutoManualSync; |
1471 | private readonly object _isAutoManualSyncLock = new object(); |
1472 | - private Process _u1syncProcess; |
1473 | - private readonly object _u1syncProcessLock = new object(); |
1474 | - private FileSystemWatcher _changesWatcher; |
1475 | + private readonly object _manualSyncIsRunningLock = new object(); |
1476 | + private bool _isManualSyncRunning = false; |
1477 | |
1478 | #endregion |
1479 | |
1480 | @@ -153,6 +152,21 @@ |
1481 | } |
1482 | |
1483 | /// <summary> |
1484 | + /// Allows to get and set the logger that will be used. |
1485 | + /// </summary> |
1486 | + internal bool IsManualSyncRunning |
1487 | + { |
1488 | + get { return _isManualSyncRunning; } |
1489 | + set |
1490 | + { |
1491 | + lock (_manualSyncIsRunningLock) |
1492 | + { |
1493 | + _isManualSyncRunning = value; |
1494 | + } |
1495 | + } |
1496 | + } |
1497 | + |
1498 | + /// <summary> |
1499 | /// Gets and sets the thread that is used to automatically run the manual sync. |
1500 | /// </summary> |
1501 | private Thread AutoManualSyncThread |
1502 | @@ -368,16 +382,18 @@ |
1503 | .IsNotNullOrEmpty(consumerKey, "consumerKey") |
1504 | .IsNotNullOrEmpty(consumerSecret, "consumerSecret") |
1505 | .Check(); |
1506 | - // should always be executed befre the impersonation |
1507 | - var u1SyncPath = ApplicationLocator.GetApplicationPath(Constants.U1SyncAppName); |
1508 | - var tokens = string.Format("{0}:{1}:{2}:{3}", token, tokenSecret, consumerKey, consumerSecret); |
1509 | - if (!Directory.Exists(path)) |
1510 | - { |
1511 | - Directory.CreateDirectory(path); |
1512 | - } |
1513 | - if (!Directory.Exists(Path.Combine(path, ".ubuntuone-sync")) && _u1syncProcess == null) |
1514 | - { |
1515 | - lock (_u1syncProcessLock) |
1516 | + |
1517 | + if (!IsManualSyncRunning) |
1518 | + { |
1519 | + IsManualSyncRunning = true; |
1520 | + // should always be executed befre the impersonation |
1521 | + var u1SyncPath = ApplicationLocator.GetApplicationPath(Constants.U1SyncAppName); |
1522 | + var tokens = string.Format("{0}:{1}:{2}:{3}", token, tokenSecret, consumerKey, consumerSecret); |
1523 | + if (!Directory.Exists(path)) |
1524 | + { |
1525 | + Directory.CreateDirectory(path); |
1526 | + } |
1527 | + if (!Directory.Exists(Path.Combine(path, ".ubuntuone-sync"))) |
1528 | { |
1529 | var initCommand = String.Format("{0} --init \"{1}\" --oauth {2}", |
1530 | Path.Combine(u1SyncPath, "main.exe"), |
1531 | @@ -385,7 +401,7 @@ |
1532 | Logger.DebugFormat("Executing {0} as user.", initCommand); |
1533 | |
1534 | //init the directory |
1535 | - _u1syncProcess = new Process |
1536 | + var init = new Process |
1537 | { |
1538 | StartInfo = |
1539 | { |
1540 | @@ -395,47 +411,37 @@ |
1541 | UseShellExecute = false, |
1542 | RedirectStandardOutput = true, |
1543 | RedirectStandardError = true, |
1544 | - CreateNoWindow = true, |
1545 | - WindowStyle = ProcessWindowStyle.Hidden |
1546 | + CreateNoWindow = false |
1547 | |
1548 | } |
1549 | }; |
1550 | - Logger.InfoFormat("Executing u1sync with args: {0}", _u1syncProcess.StartInfo.Arguments); |
1551 | - _u1syncProcess.Start(); |
1552 | - _u1syncProcess.WaitForExit(); |
1553 | - Logger.InfoFormat("StandarOutput from u1sync is: {0}", _u1syncProcess.StandardOutput.ReadToEnd()); |
1554 | - Logger.ErrorFormat("StandardError from u1sync is: {0}", _u1syncProcess.StandardError.ReadToEnd()); |
1555 | - _u1syncProcess.Close(); |
1556 | - _u1syncProcess = null; |
1557 | + Logger.InfoFormat("Executing u1sync with args: {0}", init.StartInfo.Arguments); |
1558 | + init.Start(); |
1559 | + init.WaitForExit(); |
1560 | + Logger.InfoFormat("StandarOutput from u1sync is: {0}", init.StandardOutput.ReadToEnd()); |
1561 | + Logger.ErrorFormat("StandardError from u1sync is: {0}", init.StandardError.ReadToEnd()); |
1562 | + init.Close(); |
1563 | + |
1564 | } |
1565 | - |
1566 | + var sync = new Process |
1567 | + { |
1568 | + StartInfo = |
1569 | + { |
1570 | + WorkingDirectory = u1SyncPath, |
1571 | + FileName = Path.Combine(u1SyncPath, "main.exe"), |
1572 | + Arguments = String.Format("\"{0}\" --oauth {1}", path, tokens), |
1573 | + UseShellExecute = false, |
1574 | + RedirectStandardOutput = false, |
1575 | + RedirectStandardError = false, |
1576 | + CreateNoWindow = false |
1577 | + } |
1578 | + }; |
1579 | + sync.Start(); |
1580 | + // we wait, we are in a diff thread in a diff process this will not block the user UI |
1581 | + sync.WaitForExit(); |
1582 | + sync.Close(); |
1583 | + IsManualSyncRunning = false; |
1584 | } |
1585 | - if (_u1syncProcess == null) |
1586 | - lock (_u1syncProcessLock) |
1587 | - { |
1588 | - var syncCommand = String.Format("{0} --oauth {1}", Path.Combine(u1SyncPath, "main.exe"), tokens); |
1589 | - _u1syncProcess = new Process |
1590 | - { |
1591 | - StartInfo = |
1592 | - { |
1593 | - WorkingDirectory = u1SyncPath, |
1594 | - FileName = Path.Combine(u1SyncPath, "main.exe"), |
1595 | - Arguments = String.Format("\"{0}\" --oauth {1}", path, tokens), |
1596 | - UseShellExecute = false, |
1597 | - RedirectStandardOutput = true, |
1598 | - RedirectStandardError = true, |
1599 | - CreateNoWindow = true, |
1600 | - WindowStyle = ProcessWindowStyle.Hidden |
1601 | - } |
1602 | - }; |
1603 | - _u1syncProcess.Start(); |
1604 | - // we wait, we are in a diff thread in a diff process this will not block the user UI |
1605 | - _u1syncProcess.WaitForExit(); |
1606 | - var error = _u1syncProcess.StandardError.ReadToEnd(); |
1607 | - Logger.InfoFormat("StandarOutput from u1sync is: {0}", _u1syncProcess.StandardOutput.ReadToEnd()); |
1608 | - Logger.ErrorFormat("StandardError from u1sync is: {0}", _u1syncProcess.StandardError.ReadToEnd()); |
1609 | - _u1syncProcess.Close(); |
1610 | - } |
1611 | } |
1612 | |
1613 | /// <summary> |
1614 | |
1615 | === modified file 'src/Canonical.UbuntuOne.ProcessDispatcher/objects.xml' |
1616 | --- src/Canonical.UbuntuOne.ProcessDispatcher/objects.xml 2010-10-19 14:28:02 +0000 |
1617 | +++ src/Canonical.UbuntuOne.ProcessDispatcher/objects.xml 2010-10-19 14:28:04 +0000 |
1618 | @@ -64,58 +64,6 @@ |
1619 | <object id="SyncSharesService" |
1620 | type="Canonical.UbuntuOne.ProcessDispatcher.SyncSharesService, Canonical.UbuntuOne.ProcessDispatcher" |
1621 | autowire="autodetect"/> |
1622 | - |
1623 | - <!-- hosts --> |
1624 | - |
1625 | - <object id="SyncConfigurationServiceHost" |
1626 | - type="Spring.ServiceModel.Activation.ServiceHostFactoryObject, Spring.Services"> |
1627 | - <property name="TargetName" |
1628 | - value="SyncConfigurationService" /> |
1629 | - </object> |
1630 | - |
1631 | - <object id="SyncDaemonServiceHost" |
1632 | - type="Spring.ServiceModel.Activation.ServiceHostFactoryObject, Spring.Services"> |
1633 | - <property name="TargetName" |
1634 | - value="SyncDaemonService" /> |
1635 | - </object> |
1636 | - |
1637 | - |
1638 | - <object id="SyncFileManagerServiceHost" |
1639 | - type="Spring.ServiceModel.Activation.ServiceHostFactoryObject, Spring.Services"> |
1640 | - <property name="TargetName" |
1641 | - value="SyncFileManagerService" /> |
1642 | - </object> |
1643 | - |
1644 | - <object id="SyncFoldersServiceHost" |
1645 | - type="Spring.ServiceModel.Activation.ServiceHostFactoryObject, Spring.Services"> |
1646 | - <property name="TargetName" |
1647 | - value="SyncFoldersService" /> |
1648 | - </object> |
1649 | - |
1650 | - <object id="SyncSharesServiceHost" |
1651 | - type="Spring.ServiceModel.Activation.ServiceHostFactoryObject, Spring.Services"> |
1652 | - <property name="TargetName" |
1653 | - value="SyncSharesService" /> |
1654 | - </object> |
1655 | - |
1656 | - <!-- ###################################################################################################### --> |
1657 | - <!-- The windows service that ensures that the application can run --> |
1658 | - <!-- ###################################################################################################### --> |
1659 | - |
1660 | - <object id="SyncDaemonWindowsService" |
1661 | - type="Canonical.UbuntuOne.ProcessDispatcher.SyncDaemonWindowsService, Canonical.UbuntuOne.ProcessDispatcher" |
1662 | - autowire="autodetect"> |
1663 | - <property name="SyncConfiguration" |
1664 | - ref="SyncConfigurationServiceHost" /> |
1665 | - <property name="SyncDaemon" |
1666 | - ref="SyncDaemonServiceHost" /> |
1667 | - <property name="SyncFileManager" |
1668 | - ref="SyncFileManagerServiceHost" /> |
1669 | - <property name="SyncFolders" |
1670 | - ref="SyncFoldersServiceHost" /> |
1671 | - <property name="SyncShares" |
1672 | - ref="SyncSharesServiceHost" /> |
1673 | - </object> |
1674 | |
1675 | <!-- ###################################################################################################### --> |
1676 | <!-- The pipe listener that will be used to know what the python code wants to tell us --> |
1677 | |
1678 | === modified file 'src/UbuntuOneClient.Tests/ProgramFixture.cs' |
1679 | --- src/UbuntuOneClient.Tests/ProgramFixture.cs 2010-10-19 14:28:02 +0000 |
1680 | +++ src/UbuntuOneClient.Tests/ProgramFixture.cs 2010-10-19 14:28:04 +0000 |
1681 | @@ -23,6 +23,7 @@ |
1682 | using Canonical.UbuntuOne.Client.Preferences; |
1683 | using Canonical.UbuntuOne.Common.Update; |
1684 | using Canonical.UbuntuOne.Common.Utils; |
1685 | +using Canonical.UbuntuOne.ProcessDispatcher; |
1686 | using NUnit.Framework; |
1687 | using Rhino.Mocks; |
1688 | |
1689 | @@ -42,6 +43,7 @@ |
1690 | private MockRepository _mocks; |
1691 | private Program _program; |
1692 | private IPreferencesDialogPresenter _preferencesDialogPresenter; |
1693 | + private IPipeListener _pipeListener; |
1694 | |
1695 | #endregion |
1696 | |
1697 | @@ -54,6 +56,7 @@ |
1698 | _updater = _mocks.StrictMock<IUpdater>(); |
1699 | _notifyIcon = _mocks.StrictMock<INotificationIconView>(); |
1700 | _app = _mocks.StrictMock<IApplication>(); |
1701 | + _pipeListener = _mocks.DynamicMock<IPipeListener>(); |
1702 | _preferencesDialogPresenter = _mocks.StrictMock<IPreferencesDialogPresenter>(); |
1703 | _program = new Program |
1704 | { |
1705 | @@ -75,88 +78,92 @@ |
1706 | |
1707 | #endregion |
1708 | |
1709 | - [Test] |
1710 | - public void StartApplicationNoUpdates() |
1711 | - { |
1712 | - using (_mocks.Record()) |
1713 | - { |
1714 | - // expect the application shutdown mode to change |
1715 | - _app.ShutdownMode = ShutdownMode.OnExplicitShutdown; |
1716 | - |
1717 | - // expect that we are calling the run with the correct window |
1718 | - Expect.Call(() => _app.Run(_notifyIcon as Window)) |
1719 | - .IgnoreArguments() |
1720 | - .Repeat.Once(); |
1721 | - |
1722 | - // return that the are no update, since we have a strict mock the test will |
1723 | - // fail if we perform the update. |
1724 | - Expect.Call(_updater.UpdatesArePresent()) |
1725 | - .Return(false); |
1726 | - |
1727 | - Expect.Call(() => _preferencesDialogPresenter.LoadPreferences()) |
1728 | - .Repeat.Once(); |
1729 | - } |
1730 | - using (_mocks.Playback()) |
1731 | - { |
1732 | - _program.StartApplication(); |
1733 | - } |
1734 | - } |
1735 | - |
1736 | - [Test] |
1737 | - public void StartApplicationWithUpdates() |
1738 | - { |
1739 | - Assert.Ignore("RhinoMocks does not support multithreaded tests and therefore this test will not be reliable"); |
1740 | - using (_mocks.Record()) |
1741 | - { |
1742 | - _app.ShutdownMode = ShutdownMode.OnExplicitShutdown; |
1743 | - |
1744 | - // expect that we are calling the run with the correct window |
1745 | - Expect.Call(() => _app.Run(_notifyIcon as Window)) |
1746 | - .IgnoreArguments() |
1747 | - .Repeat.Once(); |
1748 | - |
1749 | - // return that the are no update, since we have a strict mock the test will |
1750 | - // fail if we perform the update. |
1751 | - Expect.Call(_updater.UpdatesArePresent()) |
1752 | - .Return(true); |
1753 | - |
1754 | - Expect.Call(() => _preferencesDialogPresenter.LoadPreferences()) |
1755 | - .Repeat.Once(); |
1756 | - |
1757 | - Expect.Call(() => _updater.PerformUpdate()) |
1758 | - .Repeat.Any(); |
1759 | - } |
1760 | - using (_mocks.Playback()) |
1761 | - { |
1762 | - _program.StartApplication(); |
1763 | - } |
1764 | - } |
1765 | - |
1766 | - [Test] |
1767 | - public void StartApplicationWithCheckUpdatesExceptionTest() |
1768 | - { |
1769 | - Assert.Ignore("RhinoMocks does not support multithreaded tests and therefore this test will not be reliable"); |
1770 | - using (_mocks.Record()) |
1771 | - { |
1772 | - _app.ShutdownMode = ShutdownMode.OnExplicitShutdown; |
1773 | - |
1774 | - // expect that we are calling the run with the correct window |
1775 | - Expect.Call(() => _app.Run(_notifyIcon as Window)) |
1776 | - .IgnoreArguments() |
1777 | - .Repeat.Once(); |
1778 | - |
1779 | - // throw an exception and expect it to be caught and continue. |
1780 | - Expect.Call(_updater.UpdatesArePresent()) |
1781 | - .Throw(new SelfUpdateException()); |
1782 | - |
1783 | - Expect.Call(() => _preferencesDialogPresenter.LoadPreferences()) |
1784 | - .Repeat.Once(); |
1785 | - |
1786 | - } |
1787 | - using (_mocks.Playback()) |
1788 | - { |
1789 | - _program.StartApplication(); |
1790 | - } |
1791 | - } |
1792 | + //[Test] |
1793 | + //public void StartApplicationNoUpdates() |
1794 | + //{ |
1795 | + // using (_mocks.Record()) |
1796 | + // { |
1797 | + // // expect the application shutdown mode to change |
1798 | + // _app.ShutdownMode = ShutdownMode.OnExplicitShutdown; |
1799 | + |
1800 | + // // expect that we are calling the run with the correct window |
1801 | + // Expect.Call(() => _app.Run(_notifyIcon as Window)) |
1802 | + // .IgnoreArguments() |
1803 | + // .Repeat.Once(); |
1804 | + |
1805 | + // Expect.Call(() => _pipeListener.StartListening("")) |
1806 | + // .IgnoreArguments() |
1807 | + // .Repeat.Once(); |
1808 | + |
1809 | + // // return that the are no update, since we have a strict mock the test will |
1810 | + // // fail if we perform the update. |
1811 | + // Expect.Call(_updater.UpdatesArePresent()) |
1812 | + // .Return(false); |
1813 | + |
1814 | + // Expect.Call(() => _preferencesDialogPresenter.LoadPreferences()) |
1815 | + // .Repeat.Once(); |
1816 | + // } |
1817 | + // using (_mocks.Playback()) |
1818 | + // { |
1819 | + // _program.StartApplication(); |
1820 | + // } |
1821 | + //} |
1822 | + |
1823 | + //[Test] |
1824 | + //public void StartApplicationWithUpdates() |
1825 | + //{ |
1826 | + // Assert.Ignore("RhinoMocks does not support multithreaded tests and therefore this test will not be reliable"); |
1827 | + // using (_mocks.Record()) |
1828 | + // { |
1829 | + // _app.ShutdownMode = ShutdownMode.OnExplicitShutdown; |
1830 | + |
1831 | + // // expect that we are calling the run with the correct window |
1832 | + // Expect.Call(() => _app.Run(_notifyIcon as Window)) |
1833 | + // .IgnoreArguments() |
1834 | + // .Repeat.Once(); |
1835 | + |
1836 | + // // return that the are no update, since we have a strict mock the test will |
1837 | + // // fail if we perform the update. |
1838 | + // Expect.Call(_updater.UpdatesArePresent()) |
1839 | + // .Return(true); |
1840 | + |
1841 | + // Expect.Call(() => _preferencesDialogPresenter.LoadPreferences()) |
1842 | + // .Repeat.Once(); |
1843 | + |
1844 | + // Expect.Call(() => _updater.PerformUpdate()) |
1845 | + // .Repeat.Any(); |
1846 | + // } |
1847 | + // using (_mocks.Playback()) |
1848 | + // { |
1849 | + // _program.StartApplication(); |
1850 | + // } |
1851 | + //} |
1852 | + |
1853 | + //[Test] |
1854 | + //public void StartApplicationWithCheckUpdatesExceptionTest() |
1855 | + //{ |
1856 | + // Assert.Ignore("RhinoMocks does not support multithreaded tests and therefore this test will not be reliable"); |
1857 | + // using (_mocks.Record()) |
1858 | + // { |
1859 | + // _app.ShutdownMode = ShutdownMode.OnExplicitShutdown; |
1860 | + |
1861 | + // // expect that we are calling the run with the correct window |
1862 | + // Expect.Call(() => _app.Run(_notifyIcon as Window)) |
1863 | + // .IgnoreArguments() |
1864 | + // .Repeat.Once(); |
1865 | + |
1866 | + // // throw an exception and expect it to be caught and continue. |
1867 | + // Expect.Call(_updater.UpdatesArePresent()) |
1868 | + // .Throw(new SelfUpdateException()); |
1869 | + |
1870 | + // Expect.Call(() => _preferencesDialogPresenter.LoadPreferences()) |
1871 | + // .Repeat.Once(); |
1872 | + |
1873 | + // } |
1874 | + // using (_mocks.Playback()) |
1875 | + // { |
1876 | + // _program.StartApplication(); |
1877 | + // } |
1878 | + //} |
1879 | } |
1880 | } |
1881 | |
1882 | === modified file 'src/UbuntuOneClient.Tests/UbuntuOneClient.Tests.csproj' |
1883 | --- src/UbuntuOneClient.Tests/UbuntuOneClient.Tests.csproj 2010-10-19 14:28:02 +0000 |
1884 | +++ src/UbuntuOneClient.Tests/UbuntuOneClient.Tests.csproj 2010-10-19 14:28:04 +0000 |
1885 | @@ -117,6 +117,10 @@ |
1886 | <Project>{11353FF8-8E5A-488E-9CB1-873DADD232B9}</Project> |
1887 | <Name>Canonical.UbuntuOne.Common</Name> |
1888 | </ProjectReference> |
1889 | + <ProjectReference Include="..\Canonical.UbuntuOne.ProcessDispatcher\Canonical.UbuntuOne.ProcessDispatcher.csproj"> |
1890 | + <Project>{8D353509-C095-4E72-A693-3CEE97704C7D}</Project> |
1891 | + <Name>Canonical.UbuntuOne.ProcessDispatcher</Name> |
1892 | + </ProjectReference> |
1893 | <ProjectReference Include="..\UbuntuOneClient\UbuntuOneClient.csproj"> |
1894 | <Project>{E41083CC-B99A-4AEC-93CC-F693F6AA6071}</Project> |
1895 | <Name>UbuntuOneClient</Name> |
1896 | |
1897 | === modified file 'src/UbuntuOneClient/App.config' |
1898 | --- src/UbuntuOneClient/App.config 2010-10-19 14:28:02 +0000 |
1899 | +++ src/UbuntuOneClient/App.config 2010-10-19 14:28:04 +0000 |
1900 | @@ -26,11 +26,6 @@ |
1901 | </factoryAdapter> |
1902 | </logging> |
1903 | </common> |
1904 | - |
1905 | - <system.serviceModel> |
1906 | - <bindings configSource="Config\serviceModel.bindings.config"/> |
1907 | - <client configSource="Config\serviceModel.client.config"/> |
1908 | - </system.serviceModel> |
1909 | |
1910 | <spring> |
1911 | <context> |
1912 | @@ -40,6 +35,7 @@ |
1913 | <resource uri="assembly://Canonical.UbuntuOne.Client/Canonical.UbuntuOne.Client/objects.xml"/> |
1914 | <resource uri="assembly://Canonical.UbuntuOne.Client.Views/Canonical.UbuntuOne.Client.Views/objects.xml"/> |
1915 | <resource uri="assembly://Canonical.UbuntuOne.Common/Canonical.UbuntuOne.Common/objects.xml"/> |
1916 | + <resource uri="assembly://Canonical.UbuntuOne.ProcessDispatcher/Canonical.UbuntuOne.ProcessDispatcher/objects.xml"/> |
1917 | </context> |
1918 | |
1919 | </spring> |
1920 | |
1921 | === removed file 'src/UbuntuOneClient/Config/serviceModel.bindings.config' |
1922 | --- src/UbuntuOneClient/Config/serviceModel.bindings.config 2010-10-19 14:28:02 +0000 |
1923 | +++ src/UbuntuOneClient/Config/serviceModel.bindings.config 1970-01-01 00:00:00 +0000 |
1924 | @@ -1,23 +0,0 @@ |
1925 | -<?xml version="1.0" encoding="utf-8" ?> |
1926 | -<bindings> |
1927 | - <!-- Named pipe binding provided to allow better performance that the wsHttpBinding --> |
1928 | - <netNamedPipeBinding> |
1929 | - <binding name="namedPipeBinding" |
1930 | - closeTimeout="00:01:00" |
1931 | - openTimeout="00:01:00" |
1932 | - receiveTimeout="00:10:00" |
1933 | - sendTimeout="00:01:00" |
1934 | - transactionFlow="false" |
1935 | - transferMode="Buffered" |
1936 | - transactionProtocol="OleTransactions" |
1937 | - hostNameComparisonMode="StrongWildcard" |
1938 | - maxBufferPoolSize="524288" |
1939 | - maxBufferSize="65536" |
1940 | - maxConnections="10" |
1941 | - maxReceivedMessageSize="65536"> |
1942 | - <security mode="Transport"> |
1943 | - <transport protectionLevel="EncryptAndSign" /> |
1944 | - </security> |
1945 | - </binding> |
1946 | - </netNamedPipeBinding> |
1947 | -</bindings> |
1948 | \ No newline at end of file |
1949 | |
1950 | === removed file 'src/UbuntuOneClient/Config/serviceModel.client.config' |
1951 | --- src/UbuntuOneClient/Config/serviceModel.client.config 2010-10-19 14:28:02 +0000 |
1952 | +++ src/UbuntuOneClient/Config/serviceModel.client.config 1970-01-01 00:00:00 +0000 |
1953 | @@ -1,38 +0,0 @@ |
1954 | -<?xml version="1.0" encoding="utf-8" ?> |
1955 | -<client> |
1956 | - <endpoint name="configurationEndpoint" |
1957 | - address="net.pipe://localhost/UbuntuOne/SyncConfigurationService/$username$" |
1958 | - binding="netNamedPipeBinding" |
1959 | - bindingConfiguration="namedPipeBinding" |
1960 | - contract="Canonical.UbuntuOne.Common.ISyncConfiguration"> |
1961 | - </endpoint> |
1962 | - |
1963 | - <endpoint name="syncDaemonEndpoint" |
1964 | - address="net.pipe://localhost/UbuntuOne/SyncDaemonService/$username$" |
1965 | - binding="netNamedPipeBinding" |
1966 | - bindingConfiguration="namedPipeBinding" |
1967 | - contract="Canonical.UbuntuOne.Common.ISyncDaemon"> |
1968 | - </endpoint> |
1969 | - |
1970 | - <endpoint name="fileManagerEndpoint" |
1971 | - address="net.pipe://localhost/UbuntuOne/SyncFileManagerService/$username$" |
1972 | - binding="netNamedPipeBinding" |
1973 | - bindingConfiguration="namedPipeBinding" |
1974 | - contract="Canonical.UbuntuOne.Common.ISyncFileManager"> |
1975 | - </endpoint> |
1976 | - |
1977 | - <endpoint name="syncFoldersEndpoint" |
1978 | - address="net.pipe://localhost/UbuntuOne/SyncFoldersService/$username$" |
1979 | - binding="netNamedPipeBinding" |
1980 | - bindingConfiguration="namedPipeBinding" |
1981 | - contract="Canonical.UbuntuOne.Common.ISyncFolders"> |
1982 | - </endpoint> |
1983 | - |
1984 | - <endpoint name="syncSharesEndpoint" |
1985 | - address="net.pipe://localhost/UbuntuOne/SyncSharesService/$username$" |
1986 | - binding="netNamedPipeBinding" |
1987 | - bindingConfiguration="namedPipeBinding" |
1988 | - contract="Canonical.UbuntuOne.Common.ISyncShares"> |
1989 | - </endpoint> |
1990 | - |
1991 | -</client> |
1992 | \ No newline at end of file |
1993 | |
1994 | === modified file 'src/UbuntuOneClient/Program.cs' |
1995 | --- src/UbuntuOneClient/Program.cs 2010-10-19 14:28:02 +0000 |
1996 | +++ src/UbuntuOneClient/Program.cs 2010-10-19 14:28:04 +0000 |
1997 | @@ -18,6 +18,7 @@ |
1998 | * Authors: Manuel de la Peña <manuel.delapena@canonical.com> |
1999 | */ |
2000 | using System; |
2001 | +using System.Security.Principal; |
2002 | using System.Threading; |
2003 | using System.Windows; |
2004 | using Canonical.UbuntuOne.Client.Notification; |
2005 | @@ -25,6 +26,7 @@ |
2006 | using Canonical.UbuntuOne.Common.Container; |
2007 | using Canonical.UbuntuOne.Common.Update; |
2008 | using Canonical.UbuntuOne.Common.Utils; |
2009 | +using Canonical.UbuntuOne.ProcessDispatcher; |
2010 | using log4net; |
2011 | |
2012 | namespace UbuntuOneClient |
2013 | @@ -53,9 +55,9 @@ |
2014 | { |
2015 | get |
2016 | { |
2017 | - if(_updater == null) |
2018 | + if (_updater == null) |
2019 | { |
2020 | - lock(_updaterLock) |
2021 | + lock (_updaterLock) |
2022 | { |
2023 | _updater = ObjectsContainer.GetImplementationOf<IUpdater>(); |
2024 | } |
2025 | @@ -74,7 +76,7 @@ |
2026 | { |
2027 | get |
2028 | { |
2029 | - if(_notifyIcon == null) |
2030 | + if (_notifyIcon == null) |
2031 | { |
2032 | lock (_notifyIconLock) |
2033 | { |
2034 | @@ -96,6 +98,12 @@ |
2035 | /// Allows to get and set the presenter that knows how to deal with the settings. |
2036 | /// </summary> |
2037 | internal IPreferencesDialogPresenter PreferencesDialogPresenter { get; set; } |
2038 | + |
2039 | + /// <summary> |
2040 | + /// Gets and sets the listener that will be used to listen to messages from the python code. |
2041 | + /// </summary> |
2042 | + internal IPipeListener PipeListener { get; set; } |
2043 | + |
2044 | #endregion |
2045 | |
2046 | #region Helper methods |
2047 | @@ -110,7 +118,8 @@ |
2048 | if (!Updater.UpdatesArePresent()) return; |
2049 | _logger.Info("Updates are available."); |
2050 | Updater.PerformUpdate(); |
2051 | - }catch(SelfUpdateException ex) |
2052 | + } |
2053 | + catch (SelfUpdateException ex) |
2054 | { |
2055 | _logger.WarnFormat("Application could not be update {0}", ex); |
2056 | } |
2057 | @@ -134,8 +143,10 @@ |
2058 | // we are goign to load the current settings |
2059 | // TODO: using the presenter here is very ugly. |
2060 | PreferencesDialogPresenter.LoadPreferences(); |
2061 | + PipeListener.StartListening(string.Format("PythonMessages{0}", WindowsIdentity.GetCurrent().Name)); |
2062 | // we do not worry about looping to allow the other thread to finish, we no that app should take longer |
2063 | Application.Run(NotifyIcon as Window); |
2064 | + |
2065 | } |
2066 | |
2067 | /// <summary> |
2068 | @@ -143,7 +154,7 @@ |
2069 | /// </summary> |
2070 | public void StopUpdaterThread() |
2071 | { |
2072 | - if(_updatesThread != null) |
2073 | + if (_updatesThread != null) |
2074 | { |
2075 | _updatesThread.Join(); |
2076 | } |
2077 | @@ -157,40 +168,15 @@ |
2078 | [STAThread] |
2079 | static void Main() |
2080 | { |
2081 | - // HACK: This technique is quite interesting although it is a hack. The idea is the following, |
2082 | - // due to the fact that we want to run a WCF service per user and not per machine, we have to be able |
2083 | - // to determine at runtime the users pipe names. To do so we would use a config file per user |
2084 | - // but ofcourse we cannot do that at install time becuase we do not know all the user. |
2085 | - // |
2086 | - // Ideally we would not have to do this hack and the ConfiguratonManager would allow to refrest the app |
2087 | - // condifuration, but it is not the case!! On top of that you cannot do so by using reflection :( |
2088 | - // |
2089 | - // The trick is simple, we use the normal app.config to start the program, once the program is started we create |
2090 | - // a new app domain where we will be doing all the work. Because we are the ones starting the app domain, we can |
2091 | - // tell him to use a diff configuration, which means that we poit to a new config for this user that points to |
2092 | - // the correct pipe names :D |
2093 | - // This is not cheap, now we have a dummy app domain, the one that start this program, and a second app domain that |
2094 | - // is used to load the spring context plus all the WCT setting. The SeriesAppDomain is the one that really does |
2095 | - // the job. |
2096 | _logger.Info("Updating config"); |
2097 | // init the objects container |
2098 | // Setup information for the new appdomain. |
2099 | - var setup = new AppDomainSetup |
2100 | - { |
2101 | - ConfigurationFile = _configLocator.GetCurrentUserClientConfiguration() |
2102 | - }; |
2103 | - |
2104 | - // Create the new appdomain with the new config. |
2105 | - var executionAppDomain = AppDomain.CreateDomain("ClientAppDomain", AppDomain.CurrentDomain.Evidence, setup); |
2106 | - |
2107 | - // Call the write config method in that appdomain. |
2108 | - executionAppDomain.DoCallBack(() => |
2109 | - { |
2110 | - ObjectsContainer.Initialize(new SpringContainer()); |
2111 | - var program = ObjectsContainer.GetImplementationOf<Program>(); |
2112 | - program.StartApplication(); |
2113 | - }); |
2114 | - |
2115 | + |
2116 | + ObjectsContainer.Initialize(new SpringContainer()); |
2117 | + var program = ObjectsContainer.GetImplementationOf<Program>(); |
2118 | + program.StartApplication(); |
2119 | + |
2120 | } |
2121 | } |
2122 | + |
2123 | } |
2124 | |
2125 | === modified file 'src/UbuntuOneClient/UbuntuOneClient.csproj' |
2126 | --- src/UbuntuOneClient/UbuntuOneClient.csproj 2010-10-19 14:28:02 +0000 |
2127 | +++ src/UbuntuOneClient/UbuntuOneClient.csproj 2010-10-19 14:28:04 +0000 |
2128 | @@ -115,12 +115,6 @@ |
2129 | <None Include="Config\log4net.config"> |
2130 | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
2131 | </None> |
2132 | - <None Include="Config\serviceModel.bindings.config"> |
2133 | - <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
2134 | - </None> |
2135 | - <None Include="Config\serviceModel.client.config"> |
2136 | - <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
2137 | - </None> |
2138 | <None Include="Properties\Settings.settings"> |
2139 | <Generator>SettingsSingleFileGenerator</Generator> |
2140 | <LastGenOutput>Settings.Designer.cs</LastGenOutput> |
2141 | @@ -148,6 +142,10 @@ |
2142 | <Project>{11353FF8-8E5A-488E-9CB1-873DADD232B9}</Project> |
2143 | <Name>Canonical.UbuntuOne.Common</Name> |
2144 | </ProjectReference> |
2145 | + <ProjectReference Include="..\Canonical.UbuntuOne.ProcessDispatcher\Canonical.UbuntuOne.ProcessDispatcher.csproj"> |
2146 | + <Project>{8D353509-C095-4E72-A693-3CEE97704C7D}</Project> |
2147 | + <Name>Canonical.UbuntuOne.ProcessDispatcher</Name> |
2148 | + </ProjectReference> |
2149 | </ItemGroup> |
2150 | <ItemGroup> |
2151 | <EmbeddedResource Include="objects.xml" /> |
2152 | |
2153 | === modified file 'src/UbuntuOneClient/objects.xml' |
2154 | --- src/UbuntuOneClient/objects.xml 2010-10-19 14:28:02 +0000 |
2155 | +++ src/UbuntuOneClient/objects.xml 2010-10-19 14:28:04 +0000 |
2156 | @@ -57,6 +57,8 @@ |
2157 | ref="Application" /> |
2158 | <property name="PreferencesDialogPresenter" |
2159 | ref="PreferencesDialogPresenter" /> |
2160 | + <property name="PipeListener" |
2161 | + ref="PipeListener" /> |
2162 | </object> |
2163 | |
2164 | <!-- ############################################################### --> |
2165 | @@ -68,38 +70,4 @@ |
2166 | autowire="autodetect" > |
2167 | </object> |
2168 | |
2169 | - |
2170 | - <!-- ############################################################### --> |
2171 | - <!-- WCF services configuration --> |
2172 | - <!-- ############################################################### --> |
2173 | - |
2174 | - <object id="ConfigurationChannelFactory" |
2175 | - type="System.ServiceModel.ChannelFactory<Canonical.UbuntuOne.Common.ISyncConfiguration>, System.ServiceModel"> |
2176 | - <constructor-arg name="endpointConfigurationName" |
2177 | - value="configurationEndpoint" /> |
2178 | - </object> |
2179 | - |
2180 | - <object id="SyncDaemonChannelFactory" |
2181 | - type="System.ServiceModel.ChannelFactory<Canonical.UbuntuOne.Common.ISyncDaemon>, System.ServiceModel"> |
2182 | - <constructor-arg name="endpointConfigurationName" |
2183 | - value="syncDaemonEndpoint" /> |
2184 | - </object> |
2185 | - |
2186 | - <object id="FileManagerChannelFactory" |
2187 | - type="System.ServiceModel.ChannelFactory<Canonical.UbuntuOne.Common.ISyncFileManager>, System.ServiceModel"> |
2188 | - <constructor-arg name="endpointConfigurationName" |
2189 | - value="fileManagerEndpoint" /> |
2190 | - </object> |
2191 | - |
2192 | - <object id="SyncFoldersChannelFactory" |
2193 | - type="System.ServiceModel.ChannelFactory<Canonical.UbuntuOne.Common.ISyncFolders>, System.ServiceModel"> |
2194 | - <constructor-arg name="endpointConfigurationName" |
2195 | - value="syncFoldersEndpoint" /> |
2196 | - </object> |
2197 | - |
2198 | - <object id="SyncSharesChannelFactory" |
2199 | - type="System.ServiceModel.ChannelFactory<Canonical.UbuntuOne.Common.ISyncShares>, System.ServiceModel"> |
2200 | - <constructor-arg name="endpointConfigurationName" |
2201 | - value="syncSharesEndpoint" /> |
2202 | - </object> |
2203 | </objects> |
2204 | \ No newline at end of file |
2205 | |
2206 | === modified file 'src/u1sync/client.py' |
2207 | --- src/u1sync/client.py 2010-10-19 14:28:02 +0000 |
2208 | +++ src/u1sync/client.py 2010-10-19 14:28:04 +0000 |
2209 | @@ -409,7 +409,7 @@ |
2210 | entries = yield self._get_raw_dir_entries(share_uuid, |
2211 | root_uuid, |
2212 | content_hash) |
2213 | - match_name = name.decode('utf-8') |
2214 | + match_name = name |
2215 | match = None |
2216 | for entry in entries: |
2217 | if match_name == entry.name: |
2218 | |
2219 | === modified file 'src/u1sync/main.py' |
2220 | --- src/u1sync/main.py 2010-10-19 14:28:02 +0000 |
2221 | +++ src/u1sync/main.py 2010-10-19 14:28:04 +0000 |
2222 | @@ -43,7 +43,7 @@ |
2223 | from u1sync.merge import ( |
2224 | SyncMerge, ClobberServerMerge, ClobberLocalMerge, merge_trees) |
2225 | from u1sync.sync import download_tree, upload_tree |
2226 | -from u1sync.utils import safe_mkdir, send_bus_error |
2227 | +from u1sync.utils import safe_mkdir, send_bus_error, send_notification |
2228 | from u1sync import metadata |
2229 | from u1sync.constants import METADATA_DIR_NAME |
2230 | from u1sync.ubuntuone_optparse import UbuntuOneOptionsParser |
2231 | @@ -133,6 +133,7 @@ |
2232 | raise DirectoryNotInitializedError(directory) |
2233 | absolute_path = os.path.split(absolute_path)[0] |
2234 | |
2235 | + send_notification("Reading", "Reading mirror metadata.", "info") |
2236 | logging.info("Reading mirror metadata...") |
2237 | info = metadata.read(metadata_dir) |
2238 | |
2239 | @@ -152,10 +153,12 @@ |
2240 | raise ReadOnlyShareError(info.share_uuid) |
2241 | |
2242 | logging.info("Scanning directory...") |
2243 | + send_notification("Scanning", "Scanning directory...", "info") |
2244 | |
2245 | local_tree = scan_directory(absolute_path, quiet=quiet) |
2246 | |
2247 | logging.info("Fetching metadata...") |
2248 | + send_notification("Scanning", "Fetching metadata...", "info") |
2249 | |
2250 | remote_tree = client.build_tree(info.share_uuid, info.root_uuid) |
2251 | if not quiet: |
2252 | @@ -171,6 +174,7 @@ |
2253 | show_tree(merged_tree) |
2254 | |
2255 | logging.info("Syncing content...") |
2256 | + send_notification("Syncing", "Syncing content...", "info") |
2257 | if should_download: |
2258 | info.local_tree = download_tree(merged_tree=merged_tree, |
2259 | local_tree=local_tree, |
2260 | @@ -192,6 +196,7 @@ |
2261 | |
2262 | if not dry_run: |
2263 | logging.info("Updating mirror metadata...") |
2264 | + send_notification("Syncing", "Updating mirror metadata...", "info") |
2265 | metadata.write(metadata_dir, info) |
2266 | |
2267 | logging.info("Done.") |
2268 | @@ -204,8 +209,6 @@ |
2269 | status = " [not accepted]" |
2270 | else: |
2271 | status = "" |
2272 | - name = name.encode("utf-8") |
2273 | - user = user.encode("utf-8") |
2274 | print "%s %s (from %s) [%s]%s" % (id, name, user, access, status) |
2275 | |
2276 | def do_diff(client, share_spec, directory, quiet, subtree_path, |
2277 | @@ -228,7 +231,7 @@ |
2278 | (local_node, remote_node) = nodes |
2279 | # pylint: disable-msg=W0612 |
2280 | (parent_display_path, parent_differs) = partial_parent |
2281 | - display_path = os.path.join(parent_display_path, name.encode("UTF-8")) |
2282 | + display_path = os.path.join(parent_display_path, name) |
2283 | differs = True |
2284 | if local_node is None: |
2285 | logging.info("%s missing from client",display_path) |
2286 | |
2287 | === modified file 'src/u1sync/metadata.py' |
2288 | --- src/u1sync/metadata.py 2010-10-19 14:28:02 +0000 |
2289 | +++ src/u1sync/metadata.py 2010-10-19 14:28:04 +0000 |
2290 | @@ -27,7 +27,7 @@ |
2291 | from contextlib import contextmanager |
2292 | from ubuntuone.storageprotocol.dircontent_pb2 import DIRECTORY |
2293 | from u1sync.merge import MergeNode |
2294 | -from u1sync.utils import safe_unlink |
2295 | +from u1sync.utils import safe_unlink, send_notification |
2296 | import uuid |
2297 | |
2298 | class Metadata(object): |
2299 | @@ -43,6 +43,7 @@ |
2300 | |
2301 | def read(metadata_dir): |
2302 | """Read metadata for a mirror rooted at directory.""" |
2303 | + send_notification("Reading", "Reading metadata.", "info") |
2304 | index_file = os.path.join(metadata_dir, "local-index") |
2305 | share_uuid_file = os.path.join(metadata_dir, "share-uuid") |
2306 | root_uuid_file = os.path.join(metadata_dir, "root-uuid") |
2307 | |
2308 | === modified file 'src/u1sync/scan.py' |
2309 | --- src/u1sync/scan.py 2010-10-19 14:28:02 +0000 |
2310 | +++ src/u1sync/scan.py 2010-10-19 14:28:04 +0000 |
2311 | @@ -32,7 +32,7 @@ |
2312 | from ubuntuone.storageprotocol.dircontent_pb2 import \ |
2313 | DIRECTORY, FILE, SYMLINK |
2314 | from u1sync.genericmerge import MergeNode |
2315 | -from u1sync.utils import should_sync |
2316 | +from u1sync.utils import should_sync, send_notification |
2317 | |
2318 | def scan_directory(path, display_path="", quiet=False): |
2319 | """Scans a local directory and builds an in-memory tree from it.""" |
2320 | |
2321 | === modified file 'src/u1sync/sync.py' |
2322 | --- src/u1sync/sync.py 2010-10-19 14:28:02 +0000 |
2323 | +++ src/u1sync/sync.py 2010-10-19 14:28:04 +0000 |
2324 | @@ -25,8 +25,8 @@ |
2325 | import os |
2326 | |
2327 | EMPTY_HASH = "" |
2328 | -UPLOAD_SYMBOL = u"\u25b2".encode("utf-8") |
2329 | -DOWNLOAD_SYMBOL = u"\u25bc".encode("utf-8") |
2330 | +UPLOAD_SYMBOL = "^" |
2331 | +DOWNLOAD_SYMBOL = "v" |
2332 | CONFLICT_SYMBOL = "!" |
2333 | DELETE_SYMBOL = "X" |
2334 | |
2335 | @@ -35,7 +35,7 @@ |
2336 | DIRECTORY, SYMLINK) |
2337 | from u1sync.genericmerge import ( |
2338 | MergeNode, generic_merge) |
2339 | -from u1sync.utils import safe_mkdir |
2340 | +from u1sync.utils import safe_mkdir, send_notification |
2341 | from u1sync.client import UnsupportedOperationError |
2342 | |
2343 | def get_conflict_path(path, conflict_info): |
2344 | @@ -46,7 +46,7 @@ |
2345 | |
2346 | def name_from_path(path): |
2347 | """Returns unicode name from last path component.""" |
2348 | - return os.path.split(path)[1].decode("UTF-8") |
2349 | + return os.path.split(path)[1] |
2350 | |
2351 | |
2352 | class NodeSyncError(Exception): |
2353 | @@ -75,9 +75,8 @@ |
2354 | (parent_path, parent_display_path, parent_uuid, parent_synced) \ |
2355 | = partial_parent |
2356 | |
2357 | - utf8_name = name |
2358 | - path = os.path.join(parent_path, utf8_name) |
2359 | - display_path = os.path.join(parent_display_path, utf8_name) |
2360 | + path = os.path.join(parent_path, name) |
2361 | + display_path = os.path.join(parent_display_path, name) |
2362 | node_uuid = None |
2363 | |
2364 | synced = False |
2365 | @@ -89,6 +88,11 @@ |
2366 | else: |
2367 | if not quiet: |
2368 | print "%s %s" % (sync_mode.symbol, display_path) |
2369 | + if(sync_mode.symbol == DOWNLOAD_SYMBOL): |
2370 | + send_notification("Downloading", "Downloading file '%s'" % display_path, "info") |
2371 | + elif(sync_mode.symbol == UPLOAD_SYMBOL): |
2372 | + send_notification("Uploading", "Uploading file '%s'" % display_path, "info") |
2373 | + send_notification() |
2374 | try: |
2375 | create_dir = sync_mode.create_directory |
2376 | node_uuid = create_dir(parent_uuid=parent_uuid, |
2377 | @@ -236,6 +240,7 @@ |
2378 | """Creates a directory.""" |
2379 | try: |
2380 | safe_mkdir(path) |
2381 | + send_notification("New dir", "Creating dir %s" % path) |
2382 | except OSError, e: |
2383 | raise NodeCreateError("Error creating local directory %s: %s" % \ |
2384 | (path, e)) |
2385 | |
2386 | === modified file 'src/u1sync/utils.py' |
2387 | --- src/u1sync/utils.py 2010-10-19 14:28:02 +0000 |
2388 | +++ src/u1sync/utils.py 2010-10-19 14:28:04 +0000 |
2389 | @@ -78,10 +78,17 @@ |
2390 | try: |
2391 | data = win32pipe.CallNamedPipe(pipe_name, |
2392 | data_json, len(data_json), 0 ) |
2393 | - except Exception: |
2394 | - print "Error: C# client is not listening!!" |
2395 | + except Exception, e: |
2396 | + print "Error: C# client is not listening!! %s" % e.message |
2397 | |
2398 | def send_bus_error(error_message, exception): |
2399 | message = create_error_message(error_message, exception) |
2400 | send_bus_message(message) |
2401 | + |
2402 | +def send_notification(title, message, type): |
2403 | + message = {'type':'notify', |
2404 | + 'title':title, |
2405 | + 'message':message, |
2406 | + 'notification_type':type} |
2407 | + send_bus_message(message) |
2408 | |
2409 | \ No newline at end of file |
2410 | |
2411 | === added directory 'tools/NUnit' |
2412 | === added file 'tools/NUnit/Logo.ico' |
2413 | Binary files tools/NUnit/Logo.ico 1970-01-01 00:00:00 +0000 and tools/NUnit/Logo.ico 2010-10-19 14:28:04 +0000 differ |
2414 | === added file 'tools/NUnit/NUnitFitTests.html' |
2415 | --- tools/NUnit/NUnitFitTests.html 1970-01-01 00:00:00 +0000 |
2416 | +++ tools/NUnit/NUnitFitTests.html 2010-10-19 14:28:04 +0000 |
2417 | @@ -0,0 +1,277 @@ |
2418 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2419 | +<html> |
2420 | + <body> |
2421 | + <h1>NUnit Acceptance Tests</h1> |
2422 | + <p> |
2423 | + Developers love self-referential programs! Hence, NUnit has always run all it's |
2424 | + own tests, even those that are not really unit tests. |
2425 | + <p>Now, beginning with NUnit 2.4, NUnit has top-level tests using Ward Cunningham's |
2426 | + FIT framework. At this time, the tests are pretty rudimentary, but it's a start |
2427 | + and it's a framework for doing more. |
2428 | + <h2>Running the Tests</h2> |
2429 | + <p>Open a console or shell window and navigate to the NUnit bin directory, which |
2430 | + contains this file. To run the test under Microsoft .Net, enter the command |
2431 | + <pre> runFile NUnitFitTests.html TestResults.html .</pre> |
2432 | + To run it under Mono, enter |
2433 | + <pre> mono runFile.exe NUnitFitTests.html TestResults.html .</pre> |
2434 | + Note the space and dot at the end of each command. The results of your test |
2435 | + will be in TestResults.html in the same directory. |
2436 | + <h2>Platform and CLR Version</h2> |
2437 | + <table BORDER cellSpacing="0" cellPadding="5"> |
2438 | + <tr> |
2439 | + <td colspan="2">NUnit.Fixtures.PlatformInfo</td> |
2440 | + </tr> |
2441 | + </table> |
2442 | + <h2>Verify Unit Tests</h2> |
2443 | + <p> |
2444 | + Load and run the NUnit unit tests, verifying that the results are as expected. |
2445 | + When these tests are run on different platforms, different numbers of tests may |
2446 | + be skipped, so the values for Skipped and Run tests are informational only. |
2447 | + <p> |
2448 | + The number of tests in each assembly should be constant across all platforms - |
2449 | + any discrepancy usually means that one of the test source files was not |
2450 | + compiled on the platform. There should be no failures and no tests ignored. |
2451 | + <p><b>Note:</b> |
2452 | + At the moment, the nunit.extensions.tests assembly is failing because the |
2453 | + fixture doesn't initialize addins in the test domain. |
2454 | + <p> |
2455 | + <table BORDER cellSpacing="0" cellPadding="5"> |
2456 | + <tr> |
2457 | + <td colspan="6">NUnit.Fixtures.AssemblyRunner</td> |
2458 | + </tr> |
2459 | + <tr> |
2460 | + <td>Assembly</td> |
2461 | + <td>Tests()</td> |
2462 | + <td>Run()</td> |
2463 | + <td>Skipped()</td> |
2464 | + <td>Ignored()</td> |
2465 | + <td>Failures()</td> |
2466 | + </tr> |
2467 | + <tr> |
2468 | + <td>nunit.framework.tests.dll</td> |
2469 | + <td>397</td> |
2470 | + <td> </td> |
2471 | + <td> </td> |
2472 | + <td>0</td> |
2473 | + <td>0</td> |
2474 | + </tr> |
2475 | + <tr> |
2476 | + <td>nunit.core.tests.dll</td> |
2477 | + <td>355</td> |
2478 | + <td> </td> |
2479 | + <td> </td> |
2480 | + <td>0</td> |
2481 | + <td>0</td> |
2482 | + </tr> |
2483 | + <tr> |
2484 | + <td>nunit.util.tests.dll</td> |
2485 | + <td>238</td> |
2486 | + <td> </td> |
2487 | + <td> </td> |
2488 | + <td>0</td> |
2489 | + <td>0</td> |
2490 | + </tr> |
2491 | + <tr> |
2492 | + <td>nunit.mocks.tests.dll</td> |
2493 | + <td>43</td> |
2494 | + <td> </td> |
2495 | + <td> </td> |
2496 | + <td>0</td> |
2497 | + <td>0</td> |
2498 | + </tr> |
2499 | + <tr> |
2500 | + <td>nunit.extensions.tests.dll</td> |
2501 | + <td>5</td> |
2502 | + <td> </td> |
2503 | + <td> </td> |
2504 | + <td>0</td> |
2505 | + <td>0</td> |
2506 | + </tr> |
2507 | + <tr> |
2508 | + <td>nunit-console.tests.dll</td> |
2509 | + <td>40</td> |
2510 | + <td> </td> |
2511 | + <td> </td> |
2512 | + <td>0</td> |
2513 | + <td>0</td> |
2514 | + </tr> |
2515 | + <tr> |
2516 | + <td>nunit.uikit.tests.dll</td> |
2517 | + <td>34</td> |
2518 | + <td> </td> |
2519 | + <td> </td> |
2520 | + <td>0</td> |
2521 | + <td>0</td> |
2522 | + </tr> |
2523 | + <tr> |
2524 | + <td>nunit-gui.tests.dll</td> |
2525 | + <td>15</td> |
2526 | + <td> </td> |
2527 | + <td> </td> |
2528 | + <td>0</td> |
2529 | + <td>0</td> |
2530 | + </tr> |
2531 | + <tr> |
2532 | + <td>nunit.fixtures.tests.dll</td> |
2533 | + <td>6</td> |
2534 | + <td> </td> |
2535 | + <td> </td> |
2536 | + <td>0</td> |
2537 | + <td>0</td> |
2538 | + </tr> |
2539 | + </table> |
2540 | + <h2>Code Snippet Tests</h2> |
2541 | + <p> |
2542 | + These tests create a test assembly from a snippet of code and then load and run |
2543 | + the tests that it contains, verifying that the structure of the loaded tests is |
2544 | + as expected and that the number of tests run, skipped, ignored or failed is |
2545 | + correct. |
2546 | + <p> |
2547 | + <table BORDER cellSpacing="0" cellPadding="5"> |
2548 | + <tr> |
2549 | + <td colspan="6">NUnit.Fixtures.SnippetRunner</td> |
2550 | + </tr> |
2551 | + <tr> |
2552 | + <td>Code</td> |
2553 | + <td>Tree()</td> |
2554 | + <td>Run()</td> |
2555 | + <td>Skipped()</td> |
2556 | + <td>Ignored()</td> |
2557 | + <td>Failures()</td> |
2558 | + </tr> |
2559 | + <tr> |
2560 | + <td><pre>public class TestClass |
2561 | +{ |
2562 | +}</pre> |
2563 | + </td> |
2564 | + <td>EMPTY</td> |
2565 | + <td>0</td> |
2566 | + <td>0</td> |
2567 | + <td>0</td> |
2568 | + <td>0</td> |
2569 | + </tr> |
2570 | + <tr> |
2571 | + <td><pre>using NUnit.Framework; |
2572 | + |
2573 | +[TestFixture] |
2574 | +public class TestClass |
2575 | +{ |
2576 | +}</pre> |
2577 | + </td> |
2578 | + <td>TestClass</td> |
2579 | + <td>0</td> |
2580 | + <td>0</td> |
2581 | + <td>0</td> |
2582 | + <td>0</td> |
2583 | + </tr> |
2584 | + <tr> |
2585 | + <td><pre>using NUnit.Framework; |
2586 | + |
2587 | +[TestFixture] |
2588 | +public class TestClass |
2589 | +{ |
2590 | + [Test] |
2591 | + public void T1() { } |
2592 | + [Test] |
2593 | + public void T2() { } |
2594 | + [Test] |
2595 | + public void T3() { } |
2596 | +}</pre> |
2597 | + </td> |
2598 | + <td><pre>TestClass |
2599 | +>T1 |
2600 | +>T2 |
2601 | +>T3</pre> |
2602 | + </td> |
2603 | + <td>3</td> |
2604 | + <td>0</td> |
2605 | + <td>0</td> |
2606 | + <td>0</td> |
2607 | + </tr> |
2608 | + <tr> |
2609 | + <td><pre>using NUnit.Framework; |
2610 | + |
2611 | +[TestFixture] |
2612 | +public class TestClass1 |
2613 | +{ |
2614 | + [Test] |
2615 | + public void T1() { } |
2616 | +} |
2617 | + |
2618 | +[TestFixture] |
2619 | +public class TestClass2 |
2620 | +{ |
2621 | + [Test] |
2622 | + public void T2() { } |
2623 | + [Test] |
2624 | + public void T3() { } |
2625 | +}</pre> |
2626 | + </td> |
2627 | + <td><pre>TestClass1 |
2628 | +>T1 |
2629 | +TestClass2 |
2630 | +>T2 |
2631 | +>T3</pre> |
2632 | + </td> |
2633 | + <td>3</td> |
2634 | + <td>0</td> |
2635 | + <td>0</td> |
2636 | + <td>0</td> |
2637 | + </tr> |
2638 | + <tr> |
2639 | + <td><pre>using NUnit.Framework; |
2640 | + |
2641 | +[TestFixture] |
2642 | +public class TestClass |
2643 | +{ |
2644 | + [Test] |
2645 | + public void T1() { } |
2646 | + [Test, Ignore] |
2647 | + public void T2() { } |
2648 | + [Test] |
2649 | + public void T3() { } |
2650 | +}</pre> |
2651 | + </td> |
2652 | + <td><pre>TestClass |
2653 | +>T1 |
2654 | +>T2 |
2655 | +>T3</pre> |
2656 | + </td> |
2657 | + <td>2</td> |
2658 | + <td>0</td> |
2659 | + <td>1</td> |
2660 | + <td>0</td> |
2661 | + </tr> |
2662 | + <tr> |
2663 | + <td><pre>using NUnit.Framework; |
2664 | + |
2665 | +[TestFixture] |
2666 | +public class TestClass |
2667 | +{ |
2668 | + [Test] |
2669 | + public void T1() { } |
2670 | + [Test, Explicit] |
2671 | + public void T2() { } |
2672 | + [Test] |
2673 | + public void T3() { } |
2674 | +}</pre> |
2675 | + </td> |
2676 | + <td><pre>TestClass |
2677 | +>T1 |
2678 | +>T2 |
2679 | +>T3</pre> |
2680 | + </td> |
2681 | + <td>2</td> |
2682 | + <td>1</td> |
2683 | + <td>0</td> |
2684 | + <td>0</td> |
2685 | + </tr> |
2686 | + </table> |
2687 | + <h2>Summary Information</h2> |
2688 | + <table BORDER cellSpacing="0" cellPadding="5"> |
2689 | + <tr> |
2690 | + <td colspan="2">fit.Summary</td> |
2691 | + </tr> |
2692 | + </table> |
2693 | + </body> |
2694 | +</html> |
2695 | |
2696 | === added file 'tools/NUnit/NUnitTests.config' |
2697 | --- tools/NUnit/NUnitTests.config 1970-01-01 00:00:00 +0000 |
2698 | +++ tools/NUnit/NUnitTests.config 2010-10-19 14:28:04 +0000 |
2699 | @@ -0,0 +1,84 @@ |
2700 | +<?xml version="1.0" encoding="utf-8" ?> |
2701 | +<configuration> |
2702 | +<!-- |
2703 | + This is the configuration file for the NUnitTests.nunit test project. You may |
2704 | + need to create a similar configuration file for your own test project. |
2705 | + --> |
2706 | + |
2707 | +<!-- |
2708 | + The <NUnit> section is only needed if you want to use a non-default value |
2709 | + for any of the settings. It is commented out below. If you are going to use |
2710 | + it, you must deifne the NUnit section group and the sections you need. |
2711 | + |
2712 | + The syntax shown here works for most runtimes. If NUnit fails at startup, you |
2713 | + can try specifying the name of the assembly containing the NameValueSectionHandler: |
2714 | + |
2715 | + <section name="TestCaseBuilder" type="System.Configuration.NameValueSectionHandler, System" /> |
2716 | + |
2717 | + If that fails, try the fully qualified name of the assembly: |
2718 | + |
2719 | + <section name="TestCaseBuilder" type="System.Configuration.NameValueSectionHandler, System, |
2720 | + Version=2.0.50727.832, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> |
2721 | + |
2722 | + Unfortunately, this last approach makes your config file non-portable across runtimes. |
2723 | + --> |
2724 | + |
2725 | +<!-- |
2726 | + <configSections> |
2727 | + <sectionGroup name="NUnit"> |
2728 | + <section name="TestCaseBuilder" type="System.Configuration.NameValueSectionHandler"/> |
2729 | + <section name="TestRunner" type="System.Configuration.NameValueSectionHandler"/> |
2730 | + </sectionGroup> |
2731 | + </configSections> |
2732 | + --> |
2733 | + |
2734 | + <appSettings> |
2735 | + <!-- User application and configured property settings go here.--> |
2736 | + <!-- Example: <add key="settingName" value="settingValue"/> --> |
2737 | + <add key="test.setting" value="54321" /> |
2738 | + </appSettings> |
2739 | + |
2740 | +<!-- Sample NUnit section group showing all default values --> |
2741 | +<!-- |
2742 | + <NUnit> |
2743 | + <TestCaseBuilder> |
2744 | + <add key="OldStyleTestCases" value="false" /> |
2745 | + </TestCaseBuilder> |
2746 | + <TestRunner> |
2747 | + <add key="ApartmentState" value="MTA" /> |
2748 | + <add key="ThreadPriority" value="Normal" /> |
2749 | + </TestRunner> |
2750 | + </NUnit> |
2751 | +--> |
2752 | + |
2753 | + <!-- |
2754 | + The following <runtime> section allows running nunit tests under |
2755 | + .NET 1.0 by redirecting assemblies. The appliesTo attribute |
2756 | + causes the section to be ignored except under .NET 1.0. |
2757 | + --> |
2758 | + <runtime> |
2759 | + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" |
2760 | + appliesTo="v1.0.3705"> |
2761 | + <dependentAssembly> |
2762 | + <assemblyIdentity name="System" publicKeyToken="b77a5c561934e089" culture="" /> |
2763 | + <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0" /> |
2764 | + </dependentAssembly> |
2765 | + <dependentAssembly> |
2766 | + <assemblyIdentity name="System.Data" publicKeyToken="b77a5c561934e089" culture="" /> |
2767 | + <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0" /> |
2768 | + </dependentAssembly> |
2769 | + <dependentAssembly> |
2770 | + <assemblyIdentity name="System.Drawing" publicKeyToken="b03f5f7f11d50a3a" culture="" /> |
2771 | + <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0" /> |
2772 | + </dependentAssembly> |
2773 | + <dependentAssembly> |
2774 | + <assemblyIdentity name="System.Windows.Forms" publicKeyToken="b77a5c561934e089" culture="" /> |
2775 | + <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0" /> |
2776 | + </dependentAssembly> |
2777 | + <dependentAssembly> |
2778 | + <assemblyIdentity name="System.Xml" publicKeyToken="b77a5c561934e089" culture="" /> |
2779 | + <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0" /> |
2780 | + </dependentAssembly> |
2781 | + </assemblyBinding> |
2782 | + </runtime> |
2783 | +</configuration> |
2784 | |
2785 | === added file 'tools/NUnit/NUnitTests.nunit' |
2786 | --- tools/NUnit/NUnitTests.nunit 1970-01-01 00:00:00 +0000 |
2787 | +++ tools/NUnit/NUnitTests.nunit 2010-10-19 14:28:04 +0000 |
2788 | @@ -0,0 +1,14 @@ |
2789 | +<NUnitProject> |
2790 | + <Settings appbase="."/> |
2791 | + <Config name="Default" binpath="lib;tests;framework" runtimeFramework="v2.0"> |
2792 | + <assembly path="tests/nunit.framework.tests.dll" /> |
2793 | + <assembly path="tests/nunit.core.tests.dll" /> |
2794 | + <assembly path="tests/nunit.util.tests.dll" /> |
2795 | + <assembly path="tests/nunit.mocks.tests.dll" /> |
2796 | + <assembly path="tests/nunit-console.tests.dll" /> |
2797 | + <assembly path="tests/nunit.uiexception.tests.dll" /> |
2798 | + <assembly path="tests/nunit.uikit.tests.dll" /> |
2799 | + <assembly path="tests/nunit-gui.tests.dll" /> |
2800 | + <assembly path="tests/nunit.fixtures.tests.dll" /> |
2801 | + </Config> |
2802 | +</NUnitProject> |
2803 | |
2804 | === added file 'tools/NUnit/agent.conf' |
2805 | --- tools/NUnit/agent.conf 1970-01-01 00:00:00 +0000 |
2806 | +++ tools/NUnit/agent.conf 2010-10-19 14:28:04 +0000 |
2807 | @@ -0,0 +1,4 @@ |
2808 | +<AgentConfig> |
2809 | + <Port>8080</Port> |
2810 | + <PathToAssemblies>.</PathToAssemblies> |
2811 | +</AgentConfig> |
2812 | \ No newline at end of file |
2813 | |
2814 | === added file 'tools/NUnit/agent.log.conf' |
2815 | --- tools/NUnit/agent.log.conf 1970-01-01 00:00:00 +0000 |
2816 | +++ tools/NUnit/agent.log.conf 2010-10-19 14:28:04 +0000 |
2817 | @@ -0,0 +1,18 @@ |
2818 | +<log4net> |
2819 | + <!-- A1 is set to be a ConsoleAppender --> |
2820 | + <appender name="A1" type="log4net.Appender.ConsoleAppender"> |
2821 | + |
2822 | + <!-- A1 uses PatternLayout --> |
2823 | + <layout type="log4net.Layout.PatternLayout"> |
2824 | + <!-- Print the date in ISO 8601 format --> |
2825 | + <conversionPattern value="%-5level %logger - %message%newline" /> |
2826 | + </layout> |
2827 | + </appender> |
2828 | + |
2829 | + <!-- Set root logger level to DEBUG and its only appender to A1 --> |
2830 | + <root> |
2831 | + <level value="DEBUG" /> |
2832 | + <appender-ref ref="A1" /> |
2833 | + </root> |
2834 | + |
2835 | +</log4net> |
2836 | |
2837 | === added file 'tools/NUnit/fit-license.txt' |
2838 | --- tools/NUnit/fit-license.txt 1970-01-01 00:00:00 +0000 |
2839 | +++ tools/NUnit/fit-license.txt 2010-10-19 14:28:04 +0000 |
2840 | @@ -0,0 +1,342 @@ |
2841 | + |
2842 | + |
2843 | + GNU GENERAL PUBLIC LICENSE |
2844 | + Version 2, June 1991 |
2845 | + |
2846 | + Copyright (C) 1989, 1991 Free Software Foundation, Inc. |
2847 | + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
2848 | + Everyone is permitted to copy and distribute verbatim copies |
2849 | + of this license document, but changing it is not allowed. |
2850 | + |
2851 | + Preamble |
2852 | + |
2853 | + The licenses for most software are designed to take away your |
2854 | +freedom to share and change it. By contrast, the GNU General Public |
2855 | +License is intended to guarantee your freedom to share and change free |
2856 | +software--to make sure the software is free for all its users. This |
2857 | +General Public License applies to most of the Free Software |
2858 | +Foundation's software and to any other program whose authors commit to |
2859 | +using it. (Some other Free Software Foundation software is covered by |
2860 | +the GNU Library General Public License instead.) You can apply it to |
2861 | +your programs, too. |
2862 | + |
2863 | + When we speak of free software, we are referring to freedom, not |
2864 | +price. Our General Public Licenses are designed to make sure that you |
2865 | +have the freedom to distribute copies of free software (and charge for |
2866 | +this service if you wish), that you receive source code or can get it |
2867 | +if you want it, that you can change the software or use pieces of it |
2868 | +in new free programs; and that you know you can do these things. |
2869 | + |
2870 | + To protect your rights, we need to make restrictions that forbid |
2871 | +anyone to deny you these rights or to ask you to surrender the rights. |
2872 | +These restrictions translate to certain responsibilities for you if you |
2873 | +distribute copies of the software, or if you modify it. |
2874 | + |
2875 | + For example, if you distribute copies of such a program, whether |
2876 | +gratis or for a fee, you must give the recipients all the rights that |
2877 | +you have. You must make sure that they, too, receive or can get the |
2878 | +source code. And you must show them these terms so they know their |
2879 | +rights. |
2880 | + |
2881 | + We protect your rights with two steps: (1) copyright the software, and |
2882 | +(2) offer you this license which gives you legal permission to copy, |
2883 | +distribute and/or modify the software. |
2884 | + |
2885 | + Also, for each author's protection and ours, we want to make certain |
2886 | +that everyone understands that there is no warranty for this free |
2887 | +software. If the software is modified by someone else and passed on, we |
2888 | +want its recipients to know that what they have is not the original, so |
2889 | +that any problems introduced by others will not reflect on the original |
2890 | +authors' reputations. |
2891 | + |
2892 | + Finally, any free program is threatened constantly by software |
2893 | +patents. We wish to avoid the danger that redistributors of a free |
2894 | +program will individually obtain patent licenses, in effect making the |
2895 | +program proprietary. To prevent this, we have made it clear that any |
2896 | +patent must be licensed for everyone's free use or not licensed at all. |
2897 | + |
2898 | + The precise terms and conditions for copying, distribution and |
2899 | +modification follow. |
2900 | + |
2901 | + GNU GENERAL PUBLIC LICENSE |
2902 | + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
2903 | + |
2904 | + 0. This License applies to any program or other work which contains |
2905 | +a notice placed by the copyright holder saying it may be distributed |
2906 | +under the terms of this General Public License. The "Program", below, |
2907 | +refers to any such program or work, and a "work based on the Program" |
2908 | +means either the Program or any derivative work under copyright law: |
2909 | +that is to say, a work containing the Program or a portion of it, |
2910 | +either verbatim or with modifications and/or translated into another |
2911 | +language. (Hereinafter, translation is included without limitation in |
2912 | +the term "modification".) Each licensee is addressed as "you". |
2913 | + |
2914 | +Activities other than copying, distribution and modification are not |
2915 | +covered by this License; they are outside its scope. The act of |
2916 | +running the Program is not restricted, and the output from the Program |
2917 | +is covered only if its contents constitute a work based on the |
2918 | +Program (independent of having been made by running the Program). |
2919 | +Whether that is true depends on what the Program does. |
2920 | + |
2921 | + 1. You may copy and distribute verbatim copies of the Program's |
2922 | +source code as you receive it, in any medium, provided that you |
2923 | +conspicuously and appropriately publish on each copy an appropriate |
2924 | +copyright notice and disclaimer of warranty; keep intact all the |
2925 | +notices that refer to this License and to the absence of any warranty; |
2926 | +and give any other recipients of the Program a copy of this License |
2927 | +along with the Program. |
2928 | + |
2929 | +You may charge a fee for the physical act of transferring a copy, and |
2930 | +you may at your option offer warranty protection in exchange for a fee. |
2931 | + |
2932 | + 2. You may modify your copy or copies of the Program or any portion |
2933 | +of it, thus forming a work based on the Program, and copy and |
2934 | +distribute such modifications or work under the terms of Section 1 |
2935 | +above, provided that you also meet all of these conditions: |
2936 | + |
2937 | + a) You must cause the modified files to carry prominent notices |
2938 | + stating that you changed the files and the date of any change. |
2939 | + |
2940 | + b) You must cause any work that you distribute or publish, that in |
2941 | + whole or in part contains or is derived from the Program or any |
2942 | + part thereof, to be licensed as a whole at no charge to all third |
2943 | + parties under the terms of this License. |
2944 | + |
2945 | + c) If the modified program normally reads commands interactively |
2946 | + when run, you must cause it, when started running for such |
2947 | + interactive use in the most ordinary way, to print or display an |
2948 | + announcement including an appropriate copyright notice and a |
2949 | + notice that there is no warranty (or else, saying that you provide |
2950 | + a warranty) and that users may redistribute the program under |
2951 | + these conditions, and telling the user how to view a copy of this |
2952 | + License. (Exception: if the Program itself is interactive but |
2953 | + does not normally print such an announcement, your work based on |
2954 | + the Program is not required to print an announcement.) |
2955 | + |
2956 | +These requirements apply to the modified work as a whole. If |
2957 | +identifiable sections of that work are not derived from the Program, |
2958 | +and can be reasonably considered independent and separate works in |
2959 | +themselves, then this License, and its terms, do not apply to those |
2960 | +sections when you distribute them as separate works. But when you |
2961 | +distribute the same sections as part of a whole which is a work based |
2962 | +on the Program, the distribution of the whole must be on the terms of |
2963 | +this License, whose permissions for other licensees extend to the |
2964 | +entire whole, and thus to each and every part regardless of who wrote it. |
2965 | + |
2966 | +Thus, it is not the intent of this section to claim rights or contest |
2967 | +your rights to work written entirely by you; rather, the intent is to |
2968 | +exercise the right to control the distribution of derivative or |
2969 | +collective works based on the Program. |
2970 | + |
2971 | +In addition, mere aggregation of another work not based on the Program |
2972 | +with the Program (or with a work based on the Program) on a volume of |
2973 | +a storage or distribution medium does not bring the other work under |
2974 | +the scope of this License. |
2975 | + |
2976 | + 3. You may copy and distribute the Program (or a work based on it, |
2977 | +under Section 2) in object code or executable form under the terms of |
2978 | +Sections 1 and 2 above provided that you also do one of the following: |
2979 | + |
2980 | + a) Accompany it with the complete corresponding machine-readable |
2981 | + source code, which must be distributed under the terms of Sections |
2982 | + 1 and 2 above on a medium customarily used for software interchange; or, |
2983 | + |
2984 | + b) Accompany it with a written offer, valid for at least three |
2985 | + years, to give any third party, for a charge no more than your |
2986 | + cost of physically performing source distribution, a complete |
2987 | + machine-readable copy of the corresponding source code, to be |
2988 | + distributed under the terms of Sections 1 and 2 above on a medium |
2989 | + customarily used for software interchange; or, |
2990 | + |
2991 | + c) Accompany it with the information you received as to the offer |
2992 | + to distribute corresponding source code. (This alternative is |
2993 | + allowed only for noncommercial distribution and only if you |
2994 | + received the program in object code or executable form with such |
2995 | + an offer, in accord with Subsection b above.) |
2996 | + |
2997 | +The source code for a work means the preferred form of the work for |
2998 | +making modifications to it. For an executable work, complete source |
2999 | +code means all the source code for all modules it contains, plus any |
3000 | +associated interface definition files, plus the scripts used to |
3001 | +control compilation and installation of the executable. However, as a |
3002 | +special exception, the source code distributed need not include |
3003 | +anything that is normally distributed (in either source or binary |
3004 | +form) with the major components (compiler, kernel, and so on) of the |
3005 | +operating system on which the executable runs, unless that component |
3006 | +itself accompanies the executable. |
3007 | + |
3008 | +If distribution of executable or object code is made by offering |
3009 | +access to copy from a designated place, then offering equivalent |
3010 | +access to copy the source code from the same place counts as |
3011 | +distribution of the source code, even though third parties are not |
3012 | +compelled to copy the source along with the object code. |
3013 | + |
3014 | + 4. You may not copy, modify, sublicense, or distribute the Program |
3015 | +except as expressly provided under this License. Any attempt |
3016 | +otherwise to copy, modify, sublicense or distribute the Program is |
3017 | +void, and will automatically terminate your rights under this License. |
3018 | +However, parties who have received copies, or rights, from you under |
3019 | +this License will not have their licenses terminated so long as such |
3020 | +parties remain in full compliance. |
3021 | + |
3022 | + 5. You are not required to accept this License, since you have not |
3023 | +signed it. However, nothing else grants you permission to modify or |
3024 | +distribute the Program or its derivative works. These actions are |
3025 | +prohibited by law if you do not accept this License. Therefore, by |
3026 | +modifying or distributing the Program (or any work based on the |
3027 | +Program), you indicate your acceptance of this License to do so, and |
3028 | +all its terms and conditions for copying, distributing or modifying |
3029 | +the Program or works based on it. |
3030 | + |
3031 | + 6. Each time you redistribute the Program (or any work based on the |
3032 | +Program), the recipient automatically receives a license from the |
3033 | +original licensor to copy, distribute or modify the Program subject to |
3034 | +these terms and conditions. You may not impose any further |
3035 | +restrictions on the recipients' exercise of the rights granted herein. |
3036 | +You are not responsible for enforcing compliance by third parties to |
3037 | +this License. |
3038 | + |
3039 | + 7. If, as a consequence of a court judgment or allegation of patent |
3040 | +infringement or for any other reason (not limited to patent issues), |
3041 | +conditions are imposed on you (whether by court order, agreement or |
3042 | +otherwise) that contradict the conditions of this License, they do not |
3043 | +excuse you from the conditions of this License. If you cannot |
3044 | +distribute so as to satisfy simultaneously your obligations under this |
3045 | +License and any other pertinent obligations, then as a consequence you |
3046 | +may not distribute the Program at all. For example, if a patent |
3047 | +license would not permit royalty-free redistribution of the Program by |
3048 | +all those who receive copies directly or indirectly through you, then |
3049 | +the only way you could satisfy both it and this License would be to |
3050 | +refrain entirely from distribution of the Program. |
3051 | + |
3052 | +If any portion of this section is held invalid or unenforceable under |
3053 | +any particular circumstance, the balance of the section is intended to |
3054 | +apply and the section as a whole is intended to apply in other |
3055 | +circumstances. |
3056 | + |
3057 | +It is not the purpose of this section to induce you to infringe any |
3058 | +patents or other property right claims or to contest validity of any |
3059 | +such claims; this section has the sole purpose of protecting the |
3060 | +integrity of the free software distribution system, which is |
3061 | +implemented by public license practices. Many people have made |
3062 | +generous contributions to the wide range of software distributed |
3063 | +through that system in reliance on consistent application of that |
3064 | +system; it is up to the author/donor to decide if he or she is willing |
3065 | +to distribute software through any other system and a licensee cannot |
3066 | +impose that choice. |
3067 | + |
3068 | +This section is intended to make thoroughly clear what is believed to |
3069 | +be a consequence of the rest of this License. |
3070 | + |
3071 | + 8. If the distribution and/or use of the Program is restricted in |
3072 | +certain countries either by patents or by copyrighted interfaces, the |
3073 | +original copyright holder who places the Program under this License |
3074 | +may add an explicit geographical distribution limitation excluding |
3075 | +those countries, so that distribution is permitted only in or among |
3076 | +countries not thus excluded. In such case, this License incorporates |
3077 | +the limitation as if written in the body of this License. |
3078 | + |
3079 | + 9. The Free Software Foundation may publish revised and/or new versions |
3080 | +of the General Public License from time to time. Such new versions will |
3081 | +be similar in spirit to the present version, but may differ in detail to |
3082 | +address new problems or concerns. |
3083 | + |
3084 | +Each version is given a distinguishing version number. If the Program |
3085 | +specifies a version number of this License which applies to it and "any |
3086 | +later version", you have the option of following the terms and conditions |
3087 | +either of that version or of any later version published by the Free |
3088 | +Software Foundation. If the Program does not specify a version number of |
3089 | +this License, you may choose any version ever published by the Free Software |
3090 | +Foundation. |
3091 | + |
3092 | + 10. If you wish to incorporate parts of the Program into other free |
3093 | +programs whose distribution conditions are different, write to the author |
3094 | +to ask for permission. For software which is copyrighted by the Free |
3095 | +Software Foundation, write to the Free Software Foundation; we sometimes |
3096 | +make exceptions for this. Our decision will be guided by the two goals |
3097 | +of preserving the free status of all derivatives of our free software and |
3098 | +of promoting the sharing and reuse of software generally. |
3099 | + |
3100 | + NO WARRANTY |
3101 | + |
3102 | + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
3103 | +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
3104 | +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES |
3105 | +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED |
3106 | +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
3107 | +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS |
3108 | +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE |
3109 | +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, |
3110 | +REPAIR OR CORRECTION. |
3111 | + |
3112 | + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
3113 | +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR |
3114 | +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, |
3115 | +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING |
3116 | +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED |
3117 | +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY |
3118 | +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER |
3119 | +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE |
3120 | +POSSIBILITY OF SUCH DAMAGES. |
3121 | + |
3122 | + END OF TERMS AND CONDITIONS |
3123 | + |
3124 | + How to Apply These Terms to Your New Programs |
3125 | + |
3126 | + If you develop a new program, and you want it to be of the greatest |
3127 | +possible use to the public, the best way to achieve this is to make it |
3128 | +free software which everyone can redistribute and change under these terms. |
3129 | + |
3130 | + To do so, attach the following notices to the program. It is safest |
3131 | +to attach them to the start of each source file to most effectively |
3132 | +convey the exclusion of warranty; and each file should have at least |
3133 | +the "copyright" line and a pointer to where the full notice is found. |
3134 | + |
3135 | + <one line to give the program's name and a brief idea of what it does.> |
3136 | + Copyright (C) <year> <name of author> |
3137 | + |
3138 | + This program is free software; you can redistribute it and/or modify |
3139 | + it under the terms of the GNU General Public License as published by |
3140 | + the Free Software Foundation; either version 2 of the License, or |
3141 | + (at your option) any later version. |
3142 | + |
3143 | + This program is distributed in the hope that it will be useful, |
3144 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
3145 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3146 | + GNU General Public License for more details. |
3147 | + |
3148 | + You should have received a copy of the GNU General Public License |
3149 | + along with this program; if not, write to the Free Software |
3150 | + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
3151 | + |
3152 | + |
3153 | +Also add information on how to contact you by electronic and paper mail. |
3154 | + |
3155 | +If the program is interactive, make it output a short notice like this |
3156 | +when it starts in an interactive mode: |
3157 | + |
3158 | + Gnomovision version 69, Copyright (C) year name of author |
3159 | + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
3160 | + This is free software, and you are welcome to redistribute it |
3161 | + under certain conditions; type `show c' for details. |
3162 | + |
3163 | +The hypothetical commands `show w' and `show c' should show the appropriate |
3164 | +parts of the General Public License. Of course, the commands you use may |
3165 | +be called something other than `show w' and `show c'; they could even be |
3166 | +mouse-clicks or menu items--whatever suits your program. |
3167 | + |
3168 | +You should also get your employer (if you work as a programmer) or your |
3169 | +school, if any, to sign a "copyright disclaimer" for the program, if |
3170 | +necessary. Here is a sample; alter the names: |
3171 | + |
3172 | + Yoyodyne, Inc., hereby disclaims all copyright interest in the program |
3173 | + `Gnomovision' (which makes passes at compilers) written by James Hacker. |
3174 | + |
3175 | + <signature of Ty Coon>, 1 April 1989 |
3176 | + Ty Coon, President of Vice |
3177 | + |
3178 | +This General Public License does not permit incorporating your program into |
3179 | +proprietary programs. If your program is a subroutine library, you may |
3180 | +consider it more useful to permit linking proprietary applications with the |
3181 | +library. If this is what you want to do, use the GNU Library General |
3182 | +Public License instead of this License. |
3183 | \ No newline at end of file |
3184 | |
3185 | === added directory 'tools/NUnit/framework' |
3186 | === added file 'tools/NUnit/framework/nunit.framework.dll' |
3187 | Binary files tools/NUnit/framework/nunit.framework.dll 1970-01-01 00:00:00 +0000 and tools/NUnit/framework/nunit.framework.dll 2010-10-19 14:28:04 +0000 differ |
3188 | === added file 'tools/NUnit/framework/nunit.framework.xml' |
3189 | --- tools/NUnit/framework/nunit.framework.xml 1970-01-01 00:00:00 +0000 |
3190 | +++ tools/NUnit/framework/nunit.framework.xml 2010-10-19 14:28:04 +0000 |
3191 | @@ -0,0 +1,10228 @@ |
3192 | +<?xml version="1.0"?> |
3193 | +<doc> |
3194 | + <assembly> |
3195 | + <name>nunit.framework</name> |
3196 | + </assembly> |
3197 | + <members> |
3198 | + <member name="T:NUnit.Framework.Constraints.BinaryConstraint"> |
3199 | + <summary> |
3200 | + BinaryConstraint is the abstract base of all constraints |
3201 | + that combine two other constraints in some fashion. |
3202 | + </summary> |
3203 | + </member> |
3204 | + <member name="T:NUnit.Framework.Constraints.Constraint"> |
3205 | + <summary> |
3206 | + The Constraint class is the base of all built-in constraints |
3207 | + within NUnit. It provides the operator overloads used to combine |
3208 | + constraints. |
3209 | + </summary> |
3210 | + </member> |
3211 | + <member name="T:NUnit.Framework.Constraints.IResolveConstraint"> |
3212 | + <summary> |
3213 | + The IConstraintExpression interface is implemented by all |
3214 | + complete and resolvable constraints and expressions. |
3215 | + </summary> |
3216 | + </member> |
3217 | + <member name="M:NUnit.Framework.Constraints.IResolveConstraint.Resolve"> |
3218 | + <summary> |
3219 | + Return the top-level constraint for this expression |
3220 | + </summary> |
3221 | + <returns></returns> |
3222 | + </member> |
3223 | + <member name="F:NUnit.Framework.Constraints.Constraint.UNSET"> |
3224 | + <summary> |
3225 | + Static UnsetObject used to detect derived constraints |
3226 | + failing to set the actual value. |
3227 | + </summary> |
3228 | + </member> |
3229 | + <member name="F:NUnit.Framework.Constraints.Constraint.actual"> |
3230 | + <summary> |
3231 | + The actual value being tested against a constraint |
3232 | + </summary> |
3233 | + </member> |
3234 | + <member name="F:NUnit.Framework.Constraints.Constraint.displayName"> |
3235 | + <summary> |
3236 | + The display name of this Constraint for use by ToString() |
3237 | + </summary> |
3238 | + </member> |
3239 | + <member name="F:NUnit.Framework.Constraints.Constraint.argcnt"> |
3240 | + <summary> |
3241 | + Argument fields used by ToString(); |
3242 | + </summary> |
3243 | + </member> |
3244 | + <member name="F:NUnit.Framework.Constraints.Constraint.builder"> |
3245 | + <summary> |
3246 | + The builder holding this constraint |
3247 | + </summary> |
3248 | + </member> |
3249 | + <member name="M:NUnit.Framework.Constraints.Constraint.#ctor"> |
3250 | + <summary> |
3251 | + Construct a constraint with no arguments |
3252 | + </summary> |
3253 | + </member> |
3254 | + <member name="M:NUnit.Framework.Constraints.Constraint.#ctor(System.Object)"> |
3255 | + <summary> |
3256 | + Construct a constraint with one argument |
3257 | + </summary> |
3258 | + </member> |
3259 | + <member name="M:NUnit.Framework.Constraints.Constraint.#ctor(System.Object,System.Object)"> |
3260 | + <summary> |
3261 | + Construct a constraint with two arguments |
3262 | + </summary> |
3263 | + </member> |
3264 | + <member name="M:NUnit.Framework.Constraints.Constraint.SetBuilder(NUnit.Framework.Constraints.ConstraintBuilder)"> |
3265 | + <summary> |
3266 | + Sets the ConstraintBuilder holding this constraint |
3267 | + </summary> |
3268 | + </member> |
3269 | + <member name="M:NUnit.Framework.Constraints.Constraint.WriteMessageTo(NUnit.Framework.Constraints.MessageWriter)"> |
3270 | + <summary> |
3271 | + Write the failure message to the MessageWriter provided |
3272 | + as an argument. The default implementation simply passes |
3273 | + the constraint and the actual value to the writer, which |
3274 | + then displays the constraint description and the value. |
3275 | + |
3276 | + Constraints that need to provide additional details, |
3277 | + such as where the error occured can override this. |
3278 | + </summary> |
3279 | + <param name="writer">The MessageWriter on which to display the message</param> |
3280 | + </member> |
3281 | + <member name="M:NUnit.Framework.Constraints.Constraint.Matches(System.Object)"> |
3282 | + <summary> |
3283 | + Test whether the constraint is satisfied by a given value |
3284 | + </summary> |
3285 | + <param name="actual">The value to be tested</param> |
3286 | + <returns>True for success, false for failure</returns> |
3287 | + </member> |
3288 | + <member name="M:NUnit.Framework.Constraints.Constraint.Matches(NUnit.Framework.Constraints.ActualValueDelegate)"> |
3289 | + <summary> |
3290 | + Test whether the constraint is satisfied by an |
3291 | + ActualValueDelegate that returns the value to be tested. |
3292 | + The default implementation simply evaluates the delegate |
3293 | + but derived classes may override it to provide for delayed |
3294 | + processing. |
3295 | + </summary> |
3296 | + <param name="del">An ActualValueDelegate</param> |
3297 | + <returns>True for success, false for failure</returns> |
3298 | + </member> |
3299 | + <member name="M:NUnit.Framework.Constraints.Constraint.Matches``1(``0@)"> |
3300 | + <summary> |
3301 | + Test whether the constraint is satisfied by a given reference. |
3302 | + The default implementation simply dereferences the value but |
3303 | + derived classes may override it to provide for delayed processing. |
3304 | + </summary> |
3305 | + <param name="actual">A reference to the value to be tested</param> |
3306 | + <returns>True for success, false for failure</returns> |
3307 | + </member> |
3308 | + <member name="M:NUnit.Framework.Constraints.Constraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
3309 | + <summary> |
3310 | + Write the constraint description to a MessageWriter |
3311 | + </summary> |
3312 | + <param name="writer">The writer on which the description is displayed</param> |
3313 | + </member> |
3314 | + <member name="M:NUnit.Framework.Constraints.Constraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> |
3315 | + <summary> |
3316 | + Write the actual value for a failing constraint test to a |
3317 | + MessageWriter. The default implementation simply writes |
3318 | + the raw value of actual, leaving it to the writer to |
3319 | + perform any formatting. |
3320 | + </summary> |
3321 | + <param name="writer">The writer on which the actual value is displayed</param> |
3322 | + </member> |
3323 | + <member name="M:NUnit.Framework.Constraints.Constraint.ToString"> |
3324 | + <summary> |
3325 | + Default override of ToString returns the constraint DisplayName |
3326 | + followed by any arguments within angle brackets. |
3327 | + </summary> |
3328 | + <returns></returns> |
3329 | + </member> |
3330 | + <member name="M:NUnit.Framework.Constraints.Constraint.GetStringRepresentation"> |
3331 | + <summary> |
3332 | + Returns the string representation of this constraint |
3333 | + </summary> |
3334 | + </member> |
3335 | + <member name="M:NUnit.Framework.Constraints.Constraint.op_BitwiseAnd(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> |
3336 | + <summary> |
3337 | + This operator creates a constraint that is satisfied only if both |
3338 | + argument constraints are satisfied. |
3339 | + </summary> |
3340 | + </member> |
3341 | + <member name="M:NUnit.Framework.Constraints.Constraint.op_BitwiseOr(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> |
3342 | + <summary> |
3343 | + This operator creates a constraint that is satisfied if either |
3344 | + of the argument constraints is satisfied. |
3345 | + </summary> |
3346 | + </member> |
3347 | + <member name="M:NUnit.Framework.Constraints.Constraint.op_LogicalNot(NUnit.Framework.Constraints.Constraint)"> |
3348 | + <summary> |
3349 | + This operator creates a constraint that is satisfied if the |
3350 | + argument constraint is not satisfied. |
3351 | + </summary> |
3352 | + </member> |
3353 | + <member name="M:NUnit.Framework.Constraints.Constraint.After(System.Int32)"> |
3354 | + <summary> |
3355 | + Returns a DelayedConstraint with the specified delay time. |
3356 | + </summary> |
3357 | + <param name="delayInMilliseconds">The delay in milliseconds.</param> |
3358 | + <returns></returns> |
3359 | + </member> |
3360 | + <member name="M:NUnit.Framework.Constraints.Constraint.After(System.Int32,System.Int32)"> |
3361 | + <summary> |
3362 | + Returns a DelayedConstraint with the specified delay time |
3363 | + and polling interval. |
3364 | + </summary> |
3365 | + <param name="delayInMilliseconds">The delay in milliseconds.</param> |
3366 | + <param name="pollingInterval">The interval at which to test the constraint.</param> |
3367 | + <returns></returns> |
3368 | + </member> |
3369 | + <member name="P:NUnit.Framework.Constraints.Constraint.DisplayName"> |
3370 | + <summary> |
3371 | + The display name of this Constraint for use by ToString(). |
3372 | + The default value is the name of the constraint with |
3373 | + trailing "Constraint" removed. Derived classes may set |
3374 | + this to another name in their constructors. |
3375 | + </summary> |
3376 | + </member> |
3377 | + <member name="P:NUnit.Framework.Constraints.Constraint.And"> |
3378 | + <summary> |
3379 | + Returns a ConstraintExpression by appending And |
3380 | + to the current constraint. |
3381 | + </summary> |
3382 | + </member> |
3383 | + <member name="P:NUnit.Framework.Constraints.Constraint.With"> |
3384 | + <summary> |
3385 | + Returns a ConstraintExpression by appending And |
3386 | + to the current constraint. |
3387 | + </summary> |
3388 | + </member> |
3389 | + <member name="P:NUnit.Framework.Constraints.Constraint.Or"> |
3390 | + <summary> |
3391 | + Returns a ConstraintExpression by appending Or |
3392 | + to the current constraint. |
3393 | + </summary> |
3394 | + </member> |
3395 | + <member name="T:NUnit.Framework.Constraints.Constraint.UnsetObject"> |
3396 | + <summary> |
3397 | + Class used to detect any derived constraints |
3398 | + that fail to set the actual value in their |
3399 | + Matches override. |
3400 | + </summary> |
3401 | + </member> |
3402 | + <member name="F:NUnit.Framework.Constraints.BinaryConstraint.left"> |
3403 | + <summary> |
3404 | + The first constraint being combined |
3405 | + </summary> |
3406 | + </member> |
3407 | + <member name="F:NUnit.Framework.Constraints.BinaryConstraint.right"> |
3408 | + <summary> |
3409 | + The second constraint being combined |
3410 | + </summary> |
3411 | + </member> |
3412 | + <member name="M:NUnit.Framework.Constraints.BinaryConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> |
3413 | + <summary> |
3414 | + Construct a BinaryConstraint from two other constraints |
3415 | + </summary> |
3416 | + <param name="left">The first constraint</param> |
3417 | + <param name="right">The second constraint</param> |
3418 | + </member> |
3419 | + <member name="T:NUnit.Framework.Constraints.AndConstraint"> |
3420 | + <summary> |
3421 | + AndConstraint succeeds only if both members succeed. |
3422 | + </summary> |
3423 | + </member> |
3424 | + <member name="M:NUnit.Framework.Constraints.AndConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> |
3425 | + <summary> |
3426 | + Create an AndConstraint from two other constraints |
3427 | + </summary> |
3428 | + <param name="left">The first constraint</param> |
3429 | + <param name="right">The second constraint</param> |
3430 | + </member> |
3431 | + <member name="M:NUnit.Framework.Constraints.AndConstraint.Matches(System.Object)"> |
3432 | + <summary> |
3433 | + Apply both member constraints to an actual value, succeeding |
3434 | + succeeding only if both of them succeed. |
3435 | + </summary> |
3436 | + <param name="actual">The actual value</param> |
3437 | + <returns>True if the constraints both succeeded</returns> |
3438 | + </member> |
3439 | + <member name="M:NUnit.Framework.Constraints.AndConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
3440 | + <summary> |
3441 | + Write a description for this contraint to a MessageWriter |
3442 | + </summary> |
3443 | + <param name="writer">The MessageWriter to receive the description</param> |
3444 | + </member> |
3445 | + <member name="M:NUnit.Framework.Constraints.AndConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> |
3446 | + <summary> |
3447 | + Write the actual value for a failing constraint test to a |
3448 | + MessageWriter. The default implementation simply writes |
3449 | + the raw value of actual, leaving it to the writer to |
3450 | + perform any formatting. |
3451 | + </summary> |
3452 | + <param name="writer">The writer on which the actual value is displayed</param> |
3453 | + </member> |
3454 | + <member name="T:NUnit.Framework.Constraints.OrConstraint"> |
3455 | + <summary> |
3456 | + OrConstraint succeeds if either member succeeds |
3457 | + </summary> |
3458 | + </member> |
3459 | + <member name="M:NUnit.Framework.Constraints.OrConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> |
3460 | + <summary> |
3461 | + Create an OrConstraint from two other constraints |
3462 | + </summary> |
3463 | + <param name="left">The first constraint</param> |
3464 | + <param name="right">The second constraint</param> |
3465 | + </member> |
3466 | + <member name="M:NUnit.Framework.Constraints.OrConstraint.Matches(System.Object)"> |
3467 | + <summary> |
3468 | + Apply the member constraints to an actual value, succeeding |
3469 | + succeeding as soon as one of them succeeds. |
3470 | + </summary> |
3471 | + <param name="actual">The actual value</param> |
3472 | + <returns>True if either constraint succeeded</returns> |
3473 | + </member> |
3474 | + <member name="M:NUnit.Framework.Constraints.OrConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
3475 | + <summary> |
3476 | + Write a description for this contraint to a MessageWriter |
3477 | + </summary> |
3478 | + <param name="writer">The MessageWriter to receive the description</param> |
3479 | + </member> |
3480 | + <member name="T:NUnit.Framework.Constraints.CollectionConstraint"> |
3481 | + <summary> |
3482 | + CollectionConstraint is the abstract base class for |
3483 | + constraints that operate on collections. |
3484 | + </summary> |
3485 | + </member> |
3486 | + <member name="M:NUnit.Framework.Constraints.CollectionConstraint.#ctor"> |
3487 | + <summary> |
3488 | + Construct an empty CollectionConstraint |
3489 | + </summary> |
3490 | + </member> |
3491 | + <member name="M:NUnit.Framework.Constraints.CollectionConstraint.#ctor(System.Object)"> |
3492 | + <summary> |
3493 | + Construct a CollectionConstraint |
3494 | + </summary> |
3495 | + <param name="arg"></param> |
3496 | + </member> |
3497 | + <member name="M:NUnit.Framework.Constraints.CollectionConstraint.IsEmpty(System.Collections.IEnumerable)"> |
3498 | + <summary> |
3499 | + Determines whether the specified enumerable is empty. |
3500 | + </summary> |
3501 | + <param name="enumerable">The enumerable.</param> |
3502 | + <returns> |
3503 | + <c>true</c> if the specified enumerable is empty; otherwise, <c>false</c>. |
3504 | + </returns> |
3505 | + </member> |
3506 | + <member name="M:NUnit.Framework.Constraints.CollectionConstraint.Matches(System.Object)"> |
3507 | + <summary> |
3508 | + Test whether the constraint is satisfied by a given value |
3509 | + </summary> |
3510 | + <param name="actual">The value to be tested</param> |
3511 | + <returns>True for success, false for failure</returns> |
3512 | + </member> |
3513 | + <member name="M:NUnit.Framework.Constraints.CollectionConstraint.doMatch(System.Collections.IEnumerable)"> |
3514 | + <summary> |
3515 | + Protected method to be implemented by derived classes |
3516 | + </summary> |
3517 | + <param name="collection"></param> |
3518 | + <returns></returns> |
3519 | + </member> |
3520 | + <member name="T:NUnit.Framework.Constraints.CollectionItemsEqualConstraint"> |
3521 | + <summary> |
3522 | + CollectionItemsEqualConstraint is the abstract base class for all |
3523 | + collection constraints that apply some notion of item equality |
3524 | + as a part of their operation. |
3525 | + </summary> |
3526 | + </member> |
3527 | + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.#ctor"> |
3528 | + <summary> |
3529 | + Construct an empty CollectionConstraint |
3530 | + </summary> |
3531 | + </member> |
3532 | + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.#ctor(System.Object)"> |
3533 | + <summary> |
3534 | + Construct a CollectionConstraint |
3535 | + </summary> |
3536 | + <param name="arg"></param> |
3537 | + </member> |
3538 | + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using(System.Collections.IComparer)"> |
3539 | + <summary> |
3540 | + Flag the constraint to use the supplied IComparer object. |
3541 | + </summary> |
3542 | + <param name="comparer">The IComparer object to use.</param> |
3543 | + <returns>Self.</returns> |
3544 | + </member> |
3545 | + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using``1(System.Collections.Generic.IComparer{``0})"> |
3546 | + <summary> |
3547 | + Flag the constraint to use the supplied IComparer object. |
3548 | + </summary> |
3549 | + <param name="comparer">The IComparer object to use.</param> |
3550 | + <returns>Self.</returns> |
3551 | + </member> |
3552 | + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using``1(System.Comparison{``0})"> |
3553 | + <summary> |
3554 | + Flag the constraint to use the supplied Comparison object. |
3555 | + </summary> |
3556 | + <param name="comparer">The IComparer object to use.</param> |
3557 | + <returns>Self.</returns> |
3558 | + </member> |
3559 | + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using(System.Collections.IEqualityComparer)"> |
3560 | + <summary> |
3561 | + Flag the constraint to use the supplied IEqualityComparer object. |
3562 | + </summary> |
3563 | + <param name="comparer">The IComparer object to use.</param> |
3564 | + <returns>Self.</returns> |
3565 | + </member> |
3566 | + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using``1(System.Collections.Generic.IEqualityComparer{``0})"> |
3567 | + <summary> |
3568 | + Flag the constraint to use the supplied IEqualityComparer object. |
3569 | + </summary> |
3570 | + <param name="comparer">The IComparer object to use.</param> |
3571 | + <returns>Self.</returns> |
3572 | + </member> |
3573 | + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.ItemsEqual(System.Object,System.Object)"> |
3574 | + <summary> |
3575 | + Compares two collection members for equality |
3576 | + </summary> |
3577 | + </member> |
3578 | + <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Tally(System.Collections.IEnumerable)"> |
3579 | + <summary> |
3580 | + Return a new CollectionTally for use in making tests |
3581 | + </summary> |
3582 | + <param name="c">The collection to be included in the tally</param> |
3583 | + </member> |
3584 | + <member name="P:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.IgnoreCase"> |
3585 | + <summary> |
3586 | + Flag the constraint to ignore case and return self. |
3587 | + </summary> |
3588 | + </member> |
3589 | + <member name="T:NUnit.Framework.Constraints.EmptyCollectionConstraint"> |
3590 | + <summary> |
3591 | + EmptyCollectionConstraint tests whether a collection is empty. |
3592 | + </summary> |
3593 | + </member> |
3594 | + <member name="M:NUnit.Framework.Constraints.EmptyCollectionConstraint.doMatch(System.Collections.IEnumerable)"> |
3595 | + <summary> |
3596 | + Check that the collection is empty |
3597 | + </summary> |
3598 | + <param name="collection"></param> |
3599 | + <returns></returns> |
3600 | + </member> |
3601 | + <member name="M:NUnit.Framework.Constraints.EmptyCollectionConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
3602 | + <summary> |
3603 | + Write the constraint description to a MessageWriter |
3604 | + </summary> |
3605 | + <param name="writer"></param> |
3606 | + </member> |
3607 | + <member name="T:NUnit.Framework.Constraints.UniqueItemsConstraint"> |
3608 | + <summary> |
3609 | + UniqueItemsConstraint tests whether all the items in a |
3610 | + collection are unique. |
3611 | + </summary> |
3612 | + </member> |
3613 | + <member name="M:NUnit.Framework.Constraints.UniqueItemsConstraint.doMatch(System.Collections.IEnumerable)"> |
3614 | + <summary> |
3615 | + Check that all items are unique. |
3616 | + </summary> |
3617 | + <param name="actual"></param> |
3618 | + <returns></returns> |
3619 | + </member> |
3620 | + <member name="M:NUnit.Framework.Constraints.UniqueItemsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
3621 | + <summary> |
3622 | + Write a description of this constraint to a MessageWriter |
3623 | + </summary> |
3624 | + <param name="writer"></param> |
3625 | + </member> |
3626 | + <member name="T:NUnit.Framework.Constraints.CollectionContainsConstraint"> |
3627 | + <summary> |
3628 | + CollectionContainsConstraint is used to test whether a collection |
3629 | + contains an expected object as a member. |
3630 | + </summary> |
3631 | + </member> |
3632 | + <member name="M:NUnit.Framework.Constraints.CollectionContainsConstraint.#ctor(System.Object)"> |
3633 | + <summary> |
3634 | + Construct a CollectionContainsConstraint |
3635 | + </summary> |
3636 | + <param name="expected"></param> |
3637 | + </member> |
3638 | + <member name="M:NUnit.Framework.Constraints.CollectionContainsConstraint.doMatch(System.Collections.IEnumerable)"> |
3639 | + <summary> |
3640 | + Test whether the expected item is contained in the collection |
3641 | + </summary> |
3642 | + <param name="actual"></param> |
3643 | + <returns></returns> |
3644 | + </member> |
3645 | + <member name="M:NUnit.Framework.Constraints.CollectionContainsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
3646 | + <summary> |
3647 | + Write a descripton of the constraint to a MessageWriter |
3648 | + </summary> |
3649 | + <param name="writer"></param> |
3650 | + </member> |
3651 | + <member name="T:NUnit.Framework.Constraints.CollectionEquivalentConstraint"> |
3652 | + <summary> |
3653 | + CollectionEquivalentCOnstraint is used to determine whether two |
3654 | + collections are equivalent. |
3655 | + </summary> |
3656 | + </member> |
3657 | + <member name="M:NUnit.Framework.Constraints.CollectionEquivalentConstraint.#ctor(System.Collections.IEnumerable)"> |
3658 | + <summary> |
3659 | + Construct a CollectionEquivalentConstraint |
3660 | + </summary> |
3661 | + <param name="expected"></param> |
3662 | + </member> |
3663 | + <member name="M:NUnit.Framework.Constraints.CollectionEquivalentConstraint.doMatch(System.Collections.IEnumerable)"> |
3664 | + <summary> |
3665 | + Test whether two collections are equivalent |
3666 | + </summary> |
3667 | + <param name="actual"></param> |
3668 | + <returns></returns> |
3669 | + </member> |
3670 | + <member name="M:NUnit.Framework.Constraints.CollectionEquivalentConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
3671 | + <summary> |
3672 | + Write a description of this constraint to a MessageWriter |
3673 | + </summary> |
3674 | + <param name="writer"></param> |
3675 | + </member> |
3676 | + <member name="T:NUnit.Framework.Constraints.CollectionSubsetConstraint"> |
3677 | + <summary> |
3678 | + CollectionSubsetConstraint is used to determine whether |
3679 | + one collection is a subset of another |
3680 | + </summary> |
3681 | + </member> |
3682 | + <member name="M:NUnit.Framework.Constraints.CollectionSubsetConstraint.#ctor(System.Collections.IEnumerable)"> |
3683 | + <summary> |
3684 | + Construct a CollectionSubsetConstraint |
3685 | + </summary> |
3686 | + <param name="expected">The collection that the actual value is expected to be a subset of</param> |
3687 | + </member> |
3688 | + <member name="M:NUnit.Framework.Constraints.CollectionSubsetConstraint.doMatch(System.Collections.IEnumerable)"> |
3689 | + <summary> |
3690 | + Test whether the actual collection is a subset of |
3691 | + the expected collection provided. |
3692 | + </summary> |
3693 | + <param name="actual"></param> |
3694 | + <returns></returns> |
3695 | + </member> |
3696 | + <member name="M:NUnit.Framework.Constraints.CollectionSubsetConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
3697 | + <summary> |
3698 | + Write a description of this constraint to a MessageWriter |
3699 | + </summary> |
3700 | + <param name="writer"></param> |
3701 | + </member> |
3702 | + <member name="T:NUnit.Framework.Constraints.CollectionOrderedConstraint"> |
3703 | + <summary> |
3704 | + CollectionOrderedConstraint is used to test whether a collection is ordered. |
3705 | + </summary> |
3706 | + </member> |
3707 | + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.#ctor"> |
3708 | + <summary> |
3709 | + Construct a CollectionOrderedConstraint |
3710 | + </summary> |
3711 | + </member> |
3712 | + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.Using(System.Collections.IComparer)"> |
3713 | + <summary> |
3714 | + Modifies the constraint to use an IComparer and returns self. |
3715 | + </summary> |
3716 | + </member> |
3717 | + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.Using``1(System.Collections.Generic.IComparer{``0})"> |
3718 | + <summary> |
3719 | + Modifies the constraint to use an IComparer<T> and returns self. |
3720 | + </summary> |
3721 | + </member> |
3722 | + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.Using``1(System.Comparison{``0})"> |
3723 | + <summary> |
3724 | + Modifies the constraint to use a Comparison<T> and returns self. |
3725 | + </summary> |
3726 | + </member> |
3727 | + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.By(System.String)"> |
3728 | + <summary> |
3729 | + Modifies the constraint to test ordering by the value of |
3730 | + a specified property and returns self. |
3731 | + </summary> |
3732 | + </member> |
3733 | + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.doMatch(System.Collections.IEnumerable)"> |
3734 | + <summary> |
3735 | + Test whether the collection is ordered |
3736 | + </summary> |
3737 | + <param name="actual"></param> |
3738 | + <returns></returns> |
3739 | + </member> |
3740 | + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
3741 | + <summary> |
3742 | + Write a description of the constraint to a MessageWriter |
3743 | + </summary> |
3744 | + <param name="writer"></param> |
3745 | + </member> |
3746 | + <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.GetStringRepresentation"> |
3747 | + <summary> |
3748 | + Returns the string representation of the constraint. |
3749 | + </summary> |
3750 | + <returns></returns> |
3751 | + </member> |
3752 | + <member name="P:NUnit.Framework.Constraints.CollectionOrderedConstraint.Descending"> |
3753 | + <summary> |
3754 | + If used performs a reverse comparison |
3755 | + </summary> |
3756 | + </member> |
3757 | + <member name="T:NUnit.Framework.Constraints.ComparisonConstraint"> |
3758 | + <summary> |
3759 | + Abstract base class for constraints that compare values to |
3760 | + determine if one is greater than, equal to or less than |
3761 | + the other. |
3762 | + </summary> |
3763 | + </member> |
3764 | + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.expected"> |
3765 | + <summary> |
3766 | + The value against which a comparison is to be made |
3767 | + </summary> |
3768 | + </member> |
3769 | + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.ltOK"> |
3770 | + <summary> |
3771 | + If true, less than returns success |
3772 | + </summary> |
3773 | + </member> |
3774 | + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.eqOK"> |
3775 | + <summary> |
3776 | + if true, equal returns success |
3777 | + </summary> |
3778 | + </member> |
3779 | + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.gtOK"> |
3780 | + <summary> |
3781 | + if true, greater than returns success |
3782 | + </summary> |
3783 | + </member> |
3784 | + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.predicate"> |
3785 | + <summary> |
3786 | + The predicate used as a part of the description |
3787 | + </summary> |
3788 | + </member> |
3789 | + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.comparer"> |
3790 | + <summary> |
3791 | + ComparisonAdapter to be used in making the comparison |
3792 | + </summary> |
3793 | + </member> |
3794 | + <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.#ctor(System.Object,System.Boolean,System.Boolean,System.Boolean,System.String)"> |
3795 | + <summary> |
3796 | + Initializes a new instance of the <see cref="T:ComparisonConstraint"/> class. |
3797 | + </summary> |
3798 | + <param name="value">The value against which to make a comparison.</param> |
3799 | + <param name="ltOK">if set to <c>true</c> less succeeds.</param> |
3800 | + <param name="eqOK">if set to <c>true</c> equal succeeds.</param> |
3801 | + <param name="gtOK">if set to <c>true</c> greater succeeds.</param> |
3802 | + <param name="predicate">String used in describing the constraint.</param> |
3803 | + </member> |
3804 | + <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.Matches(System.Object)"> |
3805 | + <summary> |
3806 | + Test whether the constraint is satisfied by a given value |
3807 | + </summary> |
3808 | + <param name="actual">The value to be tested</param> |
3809 | + <returns>True for success, false for failure</returns> |
3810 | + </member> |
3811 | + <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
3812 | + <summary> |
3813 | + Write the constraint description to a MessageWriter |
3814 | + </summary> |
3815 | + <param name="writer">The writer on which the description is displayed</param> |
3816 | + </member> |
3817 | + <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.Using(System.Collections.IComparer)"> |
3818 | + <summary> |
3819 | + Modifies the constraint to use an IComparer and returns self |
3820 | + </summary> |
3821 | + </member> |
3822 | + <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.Using``1(System.Collections.Generic.IComparer{``0})"> |
3823 | + <summary> |
3824 | + Modifies the constraint to use an IComparer<T> and returns self |
3825 | + </summary> |
3826 | + </member> |
3827 | + <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.Using``1(System.Comparison{``0})"> |
3828 | + <summary> |
3829 | + Modifies the constraint to use a Comparison<T> and returns self |
3830 | + </summary> |
3831 | + </member> |
3832 | + <member name="T:NUnit.Framework.Constraints.GreaterThanConstraint"> |
3833 | + <summary> |
3834 | + Tests whether a value is greater than the value supplied to its constructor |
3835 | + </summary> |
3836 | + </member> |
3837 | + <member name="M:NUnit.Framework.Constraints.GreaterThanConstraint.#ctor(System.Object)"> |
3838 | + <summary> |
3839 | + Initializes a new instance of the <see cref="T:GreaterThanConstraint"/> class. |
3840 | + </summary> |
3841 | + <param name="expected">The expected value.</param> |
3842 | + </member> |
3843 | + <member name="T:NUnit.Framework.Constraints.GreaterThanOrEqualConstraint"> |
3844 | + <summary> |
3845 | + Tests whether a value is greater than or equal to the value supplied to its constructor |
3846 | + </summary> |
3847 | + </member> |
3848 | + <member name="M:NUnit.Framework.Constraints.GreaterThanOrEqualConstraint.#ctor(System.Object)"> |
3849 | + <summary> |
3850 | + Initializes a new instance of the <see cref="T:GreaterThanOrEqualConstraint"/> class. |
3851 | + </summary> |
3852 | + <param name="expected">The expected value.</param> |
3853 | + </member> |
3854 | + <member name="T:NUnit.Framework.Constraints.LessThanConstraint"> |
3855 | + <summary> |
3856 | + Tests whether a value is less than the value supplied to its constructor |
3857 | + </summary> |
3858 | + </member> |
3859 | + <member name="M:NUnit.Framework.Constraints.LessThanConstraint.#ctor(System.Object)"> |
3860 | + <summary> |
3861 | + Initializes a new instance of the <see cref="T:LessThanConstraint"/> class. |
3862 | + </summary> |
3863 | + <param name="expected">The expected value.</param> |
3864 | + </member> |
3865 | + <member name="T:NUnit.Framework.Constraints.LessThanOrEqualConstraint"> |
3866 | + <summary> |
3867 | + Tests whether a value is less than or equal to the value supplied to its constructor |
3868 | + </summary> |
3869 | + </member> |
3870 | + <member name="M:NUnit.Framework.Constraints.LessThanOrEqualConstraint.#ctor(System.Object)"> |
3871 | + <summary> |
3872 | + Initializes a new instance of the <see cref="T:LessThanOrEqualConstraint"/> class. |
3873 | + </summary> |
3874 | + <param name="expected">The expected value.</param> |
3875 | + </member> |
3876 | + <member name="T:NUnit.Framework.Constraints.ActualValueDelegate"> |
3877 | + <summary> |
3878 | + Delegate used to delay evaluation of the actual value |
3879 | + to be used in evaluating a constraint |
3880 | + </summary> |
3881 | + </member> |
3882 | + <member name="T:NUnit.Framework.Constraints.ConstraintBuilder"> |
3883 | + <summary> |
3884 | + ConstraintBuilder maintains the stacks that are used in |
3885 | + processing a ConstraintExpression. An OperatorStack |
3886 | + is used to hold operators that are waiting for their |
3887 | + operands to be reognized. a ConstraintStack holds |
3888 | + input constraints as well as the results of each |
3889 | + operator applied. |
3890 | + </summary> |
3891 | + </member> |
3892 | + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.#ctor"> |
3893 | + <summary> |
3894 | + Initializes a new instance of the <see cref="T:ConstraintBuilder"/> class. |
3895 | + </summary> |
3896 | + </member> |
3897 | + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Append(NUnit.Framework.Constraints.ConstraintOperator)"> |
3898 | + <summary> |
3899 | + Appends the specified operator to the expression by first |
3900 | + reducing the operator stack and then pushing the new |
3901 | + operator on the stack. |
3902 | + </summary> |
3903 | + <param name="op">The operator to push.</param> |
3904 | + </member> |
3905 | + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Append(NUnit.Framework.Constraints.Constraint)"> |
3906 | + <summary> |
3907 | + Appends the specified constraint to the expresson by pushing |
3908 | + it on the constraint stack. |
3909 | + </summary> |
3910 | + <param name="constraint">The constraint to push.</param> |
3911 | + </member> |
3912 | + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.SetTopOperatorRightContext(System.Object)"> |
3913 | + <summary> |
3914 | + Sets the top operator right context. |
3915 | + </summary> |
3916 | + <param name="rightContext">The right context.</param> |
3917 | + </member> |
3918 | + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.ReduceOperatorStack(System.Int32)"> |
3919 | + <summary> |
3920 | + Reduces the operator stack until the topmost item |
3921 | + precedence is greater than or equal to the target precedence. |
3922 | + </summary> |
3923 | + <param name="targetPrecedence">The target precedence.</param> |
3924 | + </member> |
3925 | + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Resolve"> |
3926 | + <summary> |
3927 | + Resolves this instance, returning a Constraint. If the builder |
3928 | + is not currently in a resolvable state, an exception is thrown. |
3929 | + </summary> |
3930 | + <returns>The resolved constraint</returns> |
3931 | + </member> |
3932 | + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.IsResolvable"> |
3933 | + <summary> |
3934 | + Gets a value indicating whether this instance is resolvable. |
3935 | + </summary> |
3936 | + <value> |
3937 | + <c>true</c> if this instance is resolvable; otherwise, <c>false</c>. |
3938 | + </value> |
3939 | + </member> |
3940 | + <member name="T:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack"> |
3941 | + <summary> |
3942 | + OperatorStack is a type-safe stack for holding ConstraintOperators |
3943 | + </summary> |
3944 | + </member> |
3945 | + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.#ctor(NUnit.Framework.Constraints.ConstraintBuilder)"> |
3946 | + <summary> |
3947 | + Initializes a new instance of the <see cref="T:OperatorStack"/> class. |
3948 | + </summary> |
3949 | + <param name="builder">The builder.</param> |
3950 | + </member> |
3951 | + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.Push(NUnit.Framework.Constraints.ConstraintOperator)"> |
3952 | + <summary> |
3953 | + Pushes the specified operator onto the stack. |
3954 | + </summary> |
3955 | + <param name="op">The op.</param> |
3956 | + </member> |
3957 | + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.Pop"> |
3958 | + <summary> |
3959 | + Pops the topmost operator from the stack. |
3960 | + </summary> |
3961 | + <returns></returns> |
3962 | + </member> |
3963 | + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.Empty"> |
3964 | + <summary> |
3965 | + Gets a value indicating whether this <see cref="T:OpStack"/> is empty. |
3966 | + </summary> |
3967 | + <value><c>true</c> if empty; otherwise, <c>false</c>.</value> |
3968 | + </member> |
3969 | + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.Top"> |
3970 | + <summary> |
3971 | + Gets the topmost operator without modifying the stack. |
3972 | + </summary> |
3973 | + <value>The top.</value> |
3974 | + </member> |
3975 | + <member name="T:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack"> |
3976 | + <summary> |
3977 | + ConstraintStack is a type-safe stack for holding Constraints |
3978 | + </summary> |
3979 | + </member> |
3980 | + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.#ctor(NUnit.Framework.Constraints.ConstraintBuilder)"> |
3981 | + <summary> |
3982 | + Initializes a new instance of the <see cref="T:ConstraintStack"/> class. |
3983 | + </summary> |
3984 | + <param name="builder">The builder.</param> |
3985 | + </member> |
3986 | + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.Push(NUnit.Framework.Constraints.Constraint)"> |
3987 | + <summary> |
3988 | + Pushes the specified constraint. As a side effect, |
3989 | + the constraint's builder field is set to the |
3990 | + ConstraintBuilder owning this stack. |
3991 | + </summary> |
3992 | + <param name="constraint">The constraint.</param> |
3993 | + </member> |
3994 | + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.Pop"> |
3995 | + <summary> |
3996 | + Pops this topmost constrait from the stack. |
3997 | + As a side effect, the constraint's builder |
3998 | + field is set to null. |
3999 | + </summary> |
4000 | + <returns></returns> |
4001 | + </member> |
4002 | + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.Empty"> |
4003 | + <summary> |
4004 | + Gets a value indicating whether this <see cref="T:ConstraintStack"/> is empty. |
4005 | + </summary> |
4006 | + <value><c>true</c> if empty; otherwise, <c>false</c>.</value> |
4007 | + </member> |
4008 | + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.Top"> |
4009 | + <summary> |
4010 | + Gets the topmost constraint without modifying the stack. |
4011 | + </summary> |
4012 | + <value>The topmost constraint</value> |
4013 | + </member> |
4014 | + <member name="T:NUnit.Framework.Constraints.EmptyConstraint"> |
4015 | + <summary> |
4016 | + EmptyConstraint tests a whether a string or collection is empty, |
4017 | + postponing the decision about which test is applied until the |
4018 | + type of the actual argument is known. |
4019 | + </summary> |
4020 | + </member> |
4021 | + <member name="M:NUnit.Framework.Constraints.EmptyConstraint.Matches(System.Object)"> |
4022 | + <summary> |
4023 | + Test whether the constraint is satisfied by a given value |
4024 | + </summary> |
4025 | + <param name="actual">The value to be tested</param> |
4026 | + <returns>True for success, false for failure</returns> |
4027 | + </member> |
4028 | + <member name="M:NUnit.Framework.Constraints.EmptyConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4029 | + <summary> |
4030 | + Write the constraint description to a MessageWriter |
4031 | + </summary> |
4032 | + <param name="writer">The writer on which the description is displayed</param> |
4033 | + </member> |
4034 | + <member name="T:NUnit.Framework.Constraints.EqualConstraint"> |
4035 | + <summary> |
4036 | + EqualConstraint is able to compare an actual value with the |
4037 | + expected value provided in its constructor. Two objects are |
4038 | + considered equal if both are null, or if both have the same |
4039 | + value. NUnit has special semantics for some object types. |
4040 | + </summary> |
4041 | + </member> |
4042 | + <member name="F:NUnit.Framework.Constraints.EqualConstraint.clipStrings"> |
4043 | + <summary> |
4044 | + If true, strings in error messages will be clipped |
4045 | + </summary> |
4046 | + </member> |
4047 | + <member name="F:NUnit.Framework.Constraints.EqualConstraint.comparer"> |
4048 | + <summary> |
4049 | + NUnitEqualityComparer used to test equality. |
4050 | + </summary> |
4051 | + </member> |
4052 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.#ctor(System.Object)"> |
4053 | + <summary> |
4054 | + Initializes a new instance of the <see cref="T:NUnit.Framework.Constraints.EqualConstraint"/> class. |
4055 | + </summary> |
4056 | + <param name="expected">The expected value.</param> |
4057 | + </member> |
4058 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.Within(System.Object)"> |
4059 | + <summary> |
4060 | + Flag the constraint to use a tolerance when determining equality. |
4061 | + </summary> |
4062 | + <param name="amount">Tolerance value to be used</param> |
4063 | + <returns>Self.</returns> |
4064 | + </member> |
4065 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.Comparer(System.Collections.IComparer)"> |
4066 | + <summary> |
4067 | + Flag the constraint to use the supplied IComparer object. |
4068 | + </summary> |
4069 | + <param name="comparer">The IComparer object to use.</param> |
4070 | + <returns>Self.</returns> |
4071 | + </member> |
4072 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.Using(System.Collections.IComparer)"> |
4073 | + <summary> |
4074 | + Flag the constraint to use the supplied IComparer object. |
4075 | + </summary> |
4076 | + <param name="comparer">The IComparer object to use.</param> |
4077 | + <returns>Self.</returns> |
4078 | + </member> |
4079 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.Using``1(System.Collections.Generic.IComparer{``0})"> |
4080 | + <summary> |
4081 | + Flag the constraint to use the supplied IComparer object. |
4082 | + </summary> |
4083 | + <param name="comparer">The IComparer object to use.</param> |
4084 | + <returns>Self.</returns> |
4085 | + </member> |
4086 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.Using``1(System.Comparison{``0})"> |
4087 | + <summary> |
4088 | + Flag the constraint to use the supplied Comparison object. |
4089 | + </summary> |
4090 | + <param name="comparer">The IComparer object to use.</param> |
4091 | + <returns>Self.</returns> |
4092 | + </member> |
4093 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.Using(System.Collections.IEqualityComparer)"> |
4094 | + <summary> |
4095 | + Flag the constraint to use the supplied IEqualityComparer object. |
4096 | + </summary> |
4097 | + <param name="comparer">The IComparer object to use.</param> |
4098 | + <returns>Self.</returns> |
4099 | + </member> |
4100 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.Using``1(System.Collections.Generic.IEqualityComparer{``0})"> |
4101 | + <summary> |
4102 | + Flag the constraint to use the supplied IEqualityComparer object. |
4103 | + </summary> |
4104 | + <param name="comparer">The IComparer object to use.</param> |
4105 | + <returns>Self.</returns> |
4106 | + </member> |
4107 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.Matches(System.Object)"> |
4108 | + <summary> |
4109 | + Test whether the constraint is satisfied by a given value |
4110 | + </summary> |
4111 | + <param name="actual">The value to be tested</param> |
4112 | + <returns>True for success, false for failure</returns> |
4113 | + </member> |
4114 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.WriteMessageTo(NUnit.Framework.Constraints.MessageWriter)"> |
4115 | + <summary> |
4116 | + Write a failure message. Overridden to provide custom |
4117 | + failure messages for EqualConstraint. |
4118 | + </summary> |
4119 | + <param name="writer">The MessageWriter to write to</param> |
4120 | + </member> |
4121 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4122 | + <summary> |
4123 | + Write description of this constraint |
4124 | + </summary> |
4125 | + <param name="writer">The MessageWriter to write to</param> |
4126 | + </member> |
4127 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.DisplayCollectionDifferences(NUnit.Framework.Constraints.MessageWriter,System.Collections.ICollection,System.Collections.ICollection,System.Int32)"> |
4128 | + <summary> |
4129 | + Display the failure information for two collections that did not match. |
4130 | + </summary> |
4131 | + <param name="writer">The MessageWriter on which to display</param> |
4132 | + <param name="expected">The expected collection.</param> |
4133 | + <param name="actual">The actual collection</param> |
4134 | + <param name="depth">The depth of this failure in a set of nested collections</param> |
4135 | + </member> |
4136 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.DisplayCollectionTypesAndSizes(NUnit.Framework.Constraints.MessageWriter,System.Collections.ICollection,System.Collections.ICollection,System.Int32)"> |
4137 | + <summary> |
4138 | + Displays a single line showing the types and sizes of the expected |
4139 | + and actual collections or arrays. If both are identical, the value is |
4140 | + only shown once. |
4141 | + </summary> |
4142 | + <param name="writer">The MessageWriter on which to display</param> |
4143 | + <param name="expected">The expected collection or array</param> |
4144 | + <param name="actual">The actual collection or array</param> |
4145 | + <param name="indent">The indentation level for the message line</param> |
4146 | + </member> |
4147 | + <member name="M:NUnit.Framework.Constraints.EqualConstraint.DisplayFailurePoint(NUnit.Framework.Constraints.MessageWriter,System.Collections.ICollection,System.Collections.ICollection,System.Int32,System.Int32)"> |
4148 | + <summary> |
4149 | + Displays a single line showing the point in the expected and actual |
4150 | + arrays at which the comparison failed. If the arrays have different |
4151 | + structures or dimensions, both values are shown. |
4152 | + </summary> |
4153 | + <param name="writer">The MessageWriter on which to display</param> |
4154 | + <param name="expected">The expected array</param> |
4155 | + <param name="actual">The actual array</param> |
4156 | + <param name="failurePoint">Index of the failure point in the underlying collections</param> |
4157 | + <param name="indent">The indentation level for the message line</param> |
4158 | + </member> |
4159 | + <member name="P:NUnit.Framework.Constraints.EqualConstraint.IgnoreCase"> |
4160 | + <summary> |
4161 | + Flag the constraint to ignore case and return self. |
4162 | + </summary> |
4163 | + </member> |
4164 | + <member name="P:NUnit.Framework.Constraints.EqualConstraint.NoClip"> |
4165 | + <summary> |
4166 | + Flag the constraint to suppress string clipping |
4167 | + and return self. |
4168 | + </summary> |
4169 | + </member> |
4170 | + <member name="P:NUnit.Framework.Constraints.EqualConstraint.AsCollection"> |
4171 | + <summary> |
4172 | + Flag the constraint to compare arrays as collections |
4173 | + and return self. |
4174 | + </summary> |
4175 | + </member> |
4176 | + <member name="P:NUnit.Framework.Constraints.EqualConstraint.Ulps"> |
4177 | + <summary> |
4178 | + Switches the .Within() modifier to interpret its tolerance as |
4179 | + a distance in representable values (see remarks). |
4180 | + </summary> |
4181 | + <returns>Self.</returns> |
4182 | + <remarks> |
4183 | + Ulp stands for "unit in the last place" and describes the minimum |
4184 | + amount a given value can change. For any integers, an ulp is 1 whole |
4185 | + digit. For floating point values, the accuracy of which is better |
4186 | + for smaller numbers and worse for larger numbers, an ulp depends |
4187 | + on the size of the number. Using ulps for comparison of floating |
4188 | + point results instead of fixed tolerances is safer because it will |
4189 | + automatically compensate for the added inaccuracy of larger numbers. |
4190 | + </remarks> |
4191 | + </member> |
4192 | + <member name="P:NUnit.Framework.Constraints.EqualConstraint.Percent"> |
4193 | + <summary> |
4194 | + Switches the .Within() modifier to interpret its tolerance as |
4195 | + a percentage that the actual values is allowed to deviate from |
4196 | + the expected value. |
4197 | + </summary> |
4198 | + <returns>Self</returns> |
4199 | + </member> |
4200 | + <member name="P:NUnit.Framework.Constraints.EqualConstraint.Days"> |
4201 | + <summary> |
4202 | + Causes the tolerance to be interpreted as a TimeSpan in days. |
4203 | + </summary> |
4204 | + <returns>Self</returns> |
4205 | + </member> |
4206 | + <member name="P:NUnit.Framework.Constraints.EqualConstraint.Hours"> |
4207 | + <summary> |
4208 | + Causes the tolerance to be interpreted as a TimeSpan in hours. |
4209 | + </summary> |
4210 | + <returns>Self</returns> |
4211 | + </member> |
4212 | + <member name="P:NUnit.Framework.Constraints.EqualConstraint.Minutes"> |
4213 | + <summary> |
4214 | + Causes the tolerance to be interpreted as a TimeSpan in minutes. |
4215 | + </summary> |
4216 | + <returns>Self</returns> |
4217 | + </member> |
4218 | + <member name="P:NUnit.Framework.Constraints.EqualConstraint.Seconds"> |
4219 | + <summary> |
4220 | + Causes the tolerance to be interpreted as a TimeSpan in seconds. |
4221 | + </summary> |
4222 | + <returns>Self</returns> |
4223 | + </member> |
4224 | + <member name="P:NUnit.Framework.Constraints.EqualConstraint.Milliseconds"> |
4225 | + <summary> |
4226 | + Causes the tolerance to be interpreted as a TimeSpan in milliseconds. |
4227 | + </summary> |
4228 | + <returns>Self</returns> |
4229 | + </member> |
4230 | + <member name="P:NUnit.Framework.Constraints.EqualConstraint.Ticks"> |
4231 | + <summary> |
4232 | + Causes the tolerance to be interpreted as a TimeSpan in clock ticks. |
4233 | + </summary> |
4234 | + <returns>Self</returns> |
4235 | + </member> |
4236 | + <member name="T:NUnit.Framework.Constraints.SameAsConstraint"> |
4237 | + <summary> |
4238 | + SameAsConstraint tests whether an object is identical to |
4239 | + the object passed to its constructor |
4240 | + </summary> |
4241 | + </member> |
4242 | + <member name="M:NUnit.Framework.Constraints.SameAsConstraint.#ctor(System.Object)"> |
4243 | + <summary> |
4244 | + Initializes a new instance of the <see cref="T:SameAsConstraint"/> class. |
4245 | + </summary> |
4246 | + <param name="expected">The expected object.</param> |
4247 | + </member> |
4248 | + <member name="M:NUnit.Framework.Constraints.SameAsConstraint.Matches(System.Object)"> |
4249 | + <summary> |
4250 | + Test whether the constraint is satisfied by a given value |
4251 | + </summary> |
4252 | + <param name="actual">The value to be tested</param> |
4253 | + <returns>True for success, false for failure</returns> |
4254 | + </member> |
4255 | + <member name="M:NUnit.Framework.Constraints.SameAsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4256 | + <summary> |
4257 | + Write the constraint description to a MessageWriter |
4258 | + </summary> |
4259 | + <param name="writer">The writer on which the description is displayed</param> |
4260 | + </member> |
4261 | + <member name="T:NUnit.Framework.Constraints.StringConstraint"> |
4262 | + <summary> |
4263 | + StringConstraint is the abstract base for constraints |
4264 | + that operate on strings. It supports the IgnoreCase |
4265 | + modifier for string operations. |
4266 | + </summary> |
4267 | + </member> |
4268 | + <member name="F:NUnit.Framework.Constraints.StringConstraint.expected"> |
4269 | + <summary> |
4270 | + The expected value |
4271 | + </summary> |
4272 | + </member> |
4273 | + <member name="F:NUnit.Framework.Constraints.StringConstraint.caseInsensitive"> |
4274 | + <summary> |
4275 | + Indicates whether tests should be case-insensitive |
4276 | + </summary> |
4277 | + </member> |
4278 | + <member name="M:NUnit.Framework.Constraints.StringConstraint.#ctor(System.String)"> |
4279 | + <summary> |
4280 | + Constructs a StringConstraint given an expected value |
4281 | + </summary> |
4282 | + <param name="expected">The expected value</param> |
4283 | + </member> |
4284 | + <member name="P:NUnit.Framework.Constraints.StringConstraint.IgnoreCase"> |
4285 | + <summary> |
4286 | + Modify the constraint to ignore case in matching. |
4287 | + </summary> |
4288 | + </member> |
4289 | + <member name="T:NUnit.Framework.Constraints.EmptyStringConstraint"> |
4290 | + <summary> |
4291 | + EmptyStringConstraint tests whether a string is empty. |
4292 | + </summary> |
4293 | + </member> |
4294 | + <member name="M:NUnit.Framework.Constraints.EmptyStringConstraint.Matches(System.Object)"> |
4295 | + <summary> |
4296 | + Test whether the constraint is satisfied by a given value |
4297 | + </summary> |
4298 | + <param name="actual">The value to be tested</param> |
4299 | + <returns>True for success, false for failure</returns> |
4300 | + </member> |
4301 | + <member name="M:NUnit.Framework.Constraints.EmptyStringConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4302 | + <summary> |
4303 | + Write the constraint description to a MessageWriter |
4304 | + </summary> |
4305 | + <param name="writer">The writer on which the description is displayed</param> |
4306 | + </member> |
4307 | + <member name="T:NUnit.Framework.Constraints.NullOrEmptyStringConstraint"> |
4308 | + <summary> |
4309 | + NullEmptyStringConstraint tests whether a string is either null or empty. |
4310 | + </summary> |
4311 | + </member> |
4312 | + <member name="M:NUnit.Framework.Constraints.NullOrEmptyStringConstraint.#ctor"> |
4313 | + <summary> |
4314 | + Constructs a new NullOrEmptyStringConstraint |
4315 | + </summary> |
4316 | + </member> |
4317 | + <member name="M:NUnit.Framework.Constraints.NullOrEmptyStringConstraint.Matches(System.Object)"> |
4318 | + <summary> |
4319 | + Test whether the constraint is satisfied by a given value |
4320 | + </summary> |
4321 | + <param name="actual">The value to be tested</param> |
4322 | + <returns>True for success, false for failure</returns> |
4323 | + </member> |
4324 | + <member name="M:NUnit.Framework.Constraints.NullOrEmptyStringConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4325 | + <summary> |
4326 | + Write the constraint description to a MessageWriter |
4327 | + </summary> |
4328 | + <param name="writer">The writer on which the description is displayed</param> |
4329 | + </member> |
4330 | + <member name="T:NUnit.Framework.Constraints.SubstringConstraint"> |
4331 | + <summary> |
4332 | + SubstringConstraint can test whether a string contains |
4333 | + the expected substring. |
4334 | + </summary> |
4335 | + </member> |
4336 | + <member name="M:NUnit.Framework.Constraints.SubstringConstraint.#ctor(System.String)"> |
4337 | + <summary> |
4338 | + Initializes a new instance of the <see cref="T:SubstringConstraint"/> class. |
4339 | + </summary> |
4340 | + <param name="expected">The expected.</param> |
4341 | + </member> |
4342 | + <member name="M:NUnit.Framework.Constraints.SubstringConstraint.Matches(System.Object)"> |
4343 | + <summary> |
4344 | + Test whether the constraint is satisfied by a given value |
4345 | + </summary> |
4346 | + <param name="actual">The value to be tested</param> |
4347 | + <returns>True for success, false for failure</returns> |
4348 | + </member> |
4349 | + <member name="M:NUnit.Framework.Constraints.SubstringConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4350 | + <summary> |
4351 | + Write the constraint description to a MessageWriter |
4352 | + </summary> |
4353 | + <param name="writer">The writer on which the description is displayed</param> |
4354 | + </member> |
4355 | + <member name="T:NUnit.Framework.Constraints.StartsWithConstraint"> |
4356 | + <summary> |
4357 | + StartsWithConstraint can test whether a string starts |
4358 | + with an expected substring. |
4359 | + </summary> |
4360 | + </member> |
4361 | + <member name="M:NUnit.Framework.Constraints.StartsWithConstraint.#ctor(System.String)"> |
4362 | + <summary> |
4363 | + Initializes a new instance of the <see cref="T:StartsWithConstraint"/> class. |
4364 | + </summary> |
4365 | + <param name="expected">The expected string</param> |
4366 | + </member> |
4367 | + <member name="M:NUnit.Framework.Constraints.StartsWithConstraint.Matches(System.Object)"> |
4368 | + <summary> |
4369 | + Test whether the constraint is matched by the actual value. |
4370 | + This is a template method, which calls the IsMatch method |
4371 | + of the derived class. |
4372 | + </summary> |
4373 | + <param name="actual"></param> |
4374 | + <returns></returns> |
4375 | + </member> |
4376 | + <member name="M:NUnit.Framework.Constraints.StartsWithConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4377 | + <summary> |
4378 | + Write the constraint description to a MessageWriter |
4379 | + </summary> |
4380 | + <param name="writer">The writer on which the description is displayed</param> |
4381 | + </member> |
4382 | + <member name="T:NUnit.Framework.Constraints.EndsWithConstraint"> |
4383 | + <summary> |
4384 | + EndsWithConstraint can test whether a string ends |
4385 | + with an expected substring. |
4386 | + </summary> |
4387 | + </member> |
4388 | + <member name="M:NUnit.Framework.Constraints.EndsWithConstraint.#ctor(System.String)"> |
4389 | + <summary> |
4390 | + Initializes a new instance of the <see cref="T:EndsWithConstraint"/> class. |
4391 | + </summary> |
4392 | + <param name="expected">The expected string</param> |
4393 | + </member> |
4394 | + <member name="M:NUnit.Framework.Constraints.EndsWithConstraint.Matches(System.Object)"> |
4395 | + <summary> |
4396 | + Test whether the constraint is matched by the actual value. |
4397 | + This is a template method, which calls the IsMatch method |
4398 | + of the derived class. |
4399 | + </summary> |
4400 | + <param name="actual"></param> |
4401 | + <returns></returns> |
4402 | + </member> |
4403 | + <member name="M:NUnit.Framework.Constraints.EndsWithConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4404 | + <summary> |
4405 | + Write the constraint description to a MessageWriter |
4406 | + </summary> |
4407 | + <param name="writer">The writer on which the description is displayed</param> |
4408 | + </member> |
4409 | + <member name="T:NUnit.Framework.Constraints.RegexConstraint"> |
4410 | + <summary> |
4411 | + RegexConstraint can test whether a string matches |
4412 | + the pattern provided. |
4413 | + </summary> |
4414 | + </member> |
4415 | + <member name="M:NUnit.Framework.Constraints.RegexConstraint.#ctor(System.String)"> |
4416 | + <summary> |
4417 | + Initializes a new instance of the <see cref="T:RegexConstraint"/> class. |
4418 | + </summary> |
4419 | + <param name="pattern">The pattern.</param> |
4420 | + </member> |
4421 | + <member name="M:NUnit.Framework.Constraints.RegexConstraint.Matches(System.Object)"> |
4422 | + <summary> |
4423 | + Test whether the constraint is satisfied by a given value |
4424 | + </summary> |
4425 | + <param name="actual">The value to be tested</param> |
4426 | + <returns>True for success, false for failure</returns> |
4427 | + </member> |
4428 | + <member name="M:NUnit.Framework.Constraints.RegexConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4429 | + <summary> |
4430 | + Write the constraint description to a MessageWriter |
4431 | + </summary> |
4432 | + <param name="writer">The writer on which the description is displayed</param> |
4433 | + </member> |
4434 | + <member name="T:NUnit.Framework.Constraints.TypeConstraint"> |
4435 | + <summary> |
4436 | + TypeConstraint is the abstract base for constraints |
4437 | + that take a Type as their expected value. |
4438 | + </summary> |
4439 | + </member> |
4440 | + <member name="F:NUnit.Framework.Constraints.TypeConstraint.expectedType"> |
4441 | + <summary> |
4442 | + The expected Type used by the constraint |
4443 | + </summary> |
4444 | + </member> |
4445 | + <member name="M:NUnit.Framework.Constraints.TypeConstraint.#ctor(System.Type)"> |
4446 | + <summary> |
4447 | + Construct a TypeConstraint for a given Type |
4448 | + </summary> |
4449 | + <param name="type"></param> |
4450 | + </member> |
4451 | + <member name="M:NUnit.Framework.Constraints.TypeConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> |
4452 | + <summary> |
4453 | + Write the actual value for a failing constraint test to a |
4454 | + MessageWriter. TypeConstraints override this method to write |
4455 | + the name of the type. |
4456 | + </summary> |
4457 | + <param name="writer">The writer on which the actual value is displayed</param> |
4458 | + </member> |
4459 | + <member name="T:NUnit.Framework.Constraints.ExactTypeConstraint"> |
4460 | + <summary> |
4461 | + ExactTypeConstraint is used to test that an object |
4462 | + is of the exact type provided in the constructor |
4463 | + </summary> |
4464 | + </member> |
4465 | + <member name="M:NUnit.Framework.Constraints.ExactTypeConstraint.#ctor(System.Type)"> |
4466 | + <summary> |
4467 | + Construct an ExactTypeConstraint for a given Type |
4468 | + </summary> |
4469 | + <param name="type">The expected Type.</param> |
4470 | + </member> |
4471 | + <member name="M:NUnit.Framework.Constraints.ExactTypeConstraint.Matches(System.Object)"> |
4472 | + <summary> |
4473 | + Test that an object is of the exact type specified |
4474 | + </summary> |
4475 | + <param name="actual">The actual value.</param> |
4476 | + <returns>True if the tested object is of the exact type provided, otherwise false.</returns> |
4477 | + </member> |
4478 | + <member name="M:NUnit.Framework.Constraints.ExactTypeConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4479 | + <summary> |
4480 | + Write the description of this constraint to a MessageWriter |
4481 | + </summary> |
4482 | + <param name="writer">The MessageWriter to use</param> |
4483 | + </member> |
4484 | + <member name="T:NUnit.Framework.Constraints.InstanceOfTypeConstraint"> |
4485 | + <summary> |
4486 | + InstanceOfTypeConstraint is used to test that an object |
4487 | + is of the same type provided or derived from it. |
4488 | + </summary> |
4489 | + </member> |
4490 | + <member name="M:NUnit.Framework.Constraints.InstanceOfTypeConstraint.#ctor(System.Type)"> |
4491 | + <summary> |
4492 | + Construct an InstanceOfTypeConstraint for the type provided |
4493 | + </summary> |
4494 | + <param name="type">The expected Type</param> |
4495 | + </member> |
4496 | + <member name="M:NUnit.Framework.Constraints.InstanceOfTypeConstraint.Matches(System.Object)"> |
4497 | + <summary> |
4498 | + Test whether an object is of the specified type or a derived type |
4499 | + </summary> |
4500 | + <param name="actual">The object to be tested</param> |
4501 | + <returns>True if the object is of the provided type or derives from it, otherwise false.</returns> |
4502 | + </member> |
4503 | + <member name="M:NUnit.Framework.Constraints.InstanceOfTypeConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4504 | + <summary> |
4505 | + Write a description of this constraint to a MessageWriter |
4506 | + </summary> |
4507 | + <param name="writer">The MessageWriter to use</param> |
4508 | + </member> |
4509 | + <member name="T:NUnit.Framework.Constraints.AssignableFromConstraint"> |
4510 | + <summary> |
4511 | + AssignableFromConstraint is used to test that an object |
4512 | + can be assigned from a given Type. |
4513 | + </summary> |
4514 | + </member> |
4515 | + <member name="M:NUnit.Framework.Constraints.AssignableFromConstraint.#ctor(System.Type)"> |
4516 | + <summary> |
4517 | + Construct an AssignableFromConstraint for the type provided |
4518 | + </summary> |
4519 | + <param name="type"></param> |
4520 | + </member> |
4521 | + <member name="M:NUnit.Framework.Constraints.AssignableFromConstraint.Matches(System.Object)"> |
4522 | + <summary> |
4523 | + Test whether an object can be assigned from the specified type |
4524 | + </summary> |
4525 | + <param name="actual">The object to be tested</param> |
4526 | + <returns>True if the object can be assigned a value of the expected Type, otherwise false.</returns> |
4527 | + </member> |
4528 | + <member name="M:NUnit.Framework.Constraints.AssignableFromConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4529 | + <summary> |
4530 | + Write a description of this constraint to a MessageWriter |
4531 | + </summary> |
4532 | + <param name="writer">The MessageWriter to use</param> |
4533 | + </member> |
4534 | + <member name="T:NUnit.Framework.Constraints.AssignableToConstraint"> |
4535 | + <summary> |
4536 | + AssignableToConstraint is used to test that an object |
4537 | + can be assigned to a given Type. |
4538 | + </summary> |
4539 | + </member> |
4540 | + <member name="M:NUnit.Framework.Constraints.AssignableToConstraint.#ctor(System.Type)"> |
4541 | + <summary> |
4542 | + Construct an AssignableToConstraint for the type provided |
4543 | + </summary> |
4544 | + <param name="type"></param> |
4545 | + </member> |
4546 | + <member name="M:NUnit.Framework.Constraints.AssignableToConstraint.Matches(System.Object)"> |
4547 | + <summary> |
4548 | + Test whether an object can be assigned to the specified type |
4549 | + </summary> |
4550 | + <param name="actual">The object to be tested</param> |
4551 | + <returns>True if the object can be assigned a value of the expected Type, otherwise false.</returns> |
4552 | + </member> |
4553 | + <member name="M:NUnit.Framework.Constraints.AssignableToConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4554 | + <summary> |
4555 | + Write a description of this constraint to a MessageWriter |
4556 | + </summary> |
4557 | + <param name="writer">The MessageWriter to use</param> |
4558 | + </member> |
4559 | + <member name="T:NUnit.Framework.Constraints.ContainsConstraint"> |
4560 | + <summary> |
4561 | + ContainsConstraint tests a whether a string contains a substring |
4562 | + or a collection contains an object. It postpones the decision of |
4563 | + which test to use until the type of the actual argument is known. |
4564 | + This allows testing whether a string is contained in a collection |
4565 | + or as a substring of another string using the same syntax. |
4566 | + </summary> |
4567 | + </member> |
4568 | + <member name="M:NUnit.Framework.Constraints.ContainsConstraint.#ctor(System.Object)"> |
4569 | + <summary> |
4570 | + Initializes a new instance of the <see cref="T:ContainsConstraint"/> class. |
4571 | + </summary> |
4572 | + <param name="expected">The expected.</param> |
4573 | + </member> |
4574 | + <member name="M:NUnit.Framework.Constraints.ContainsConstraint.Matches(System.Object)"> |
4575 | + <summary> |
4576 | + Test whether the constraint is satisfied by a given value |
4577 | + </summary> |
4578 | + <param name="actual">The value to be tested</param> |
4579 | + <returns>True for success, false for failure</returns> |
4580 | + </member> |
4581 | + <member name="M:NUnit.Framework.Constraints.ContainsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4582 | + <summary> |
4583 | + Write the constraint description to a MessageWriter |
4584 | + </summary> |
4585 | + <param name="writer">The writer on which the description is displayed</param> |
4586 | + </member> |
4587 | + <member name="P:NUnit.Framework.Constraints.ContainsConstraint.IgnoreCase"> |
4588 | + <summary> |
4589 | + Flag the constraint to ignore case and return self. |
4590 | + </summary> |
4591 | + </member> |
4592 | + <member name="T:NUnit.Framework.Constraints.PropertyExistsConstraint"> |
4593 | + <summary> |
4594 | + PropertyExistsConstraint tests that a named property |
4595 | + exists on the object provided through Match. |
4596 | + |
4597 | + Originally, PropertyConstraint provided this feature |
4598 | + in addition to making optional tests on the vaue |
4599 | + of the property. The two constraints are now separate. |
4600 | + </summary> |
4601 | + </member> |
4602 | + <member name="M:NUnit.Framework.Constraints.PropertyExistsConstraint.#ctor(System.String)"> |
4603 | + <summary> |
4604 | + Initializes a new instance of the <see cref="T:PropertyExistConstraint"/> class. |
4605 | + </summary> |
4606 | + <param name="name">The name of the property.</param> |
4607 | + </member> |
4608 | + <member name="M:NUnit.Framework.Constraints.PropertyExistsConstraint.Matches(System.Object)"> |
4609 | + <summary> |
4610 | + Test whether the property exists for a given object |
4611 | + </summary> |
4612 | + <param name="actual">The object to be tested</param> |
4613 | + <returns>True for success, false for failure</returns> |
4614 | + </member> |
4615 | + <member name="M:NUnit.Framework.Constraints.PropertyExistsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4616 | + <summary> |
4617 | + Write the constraint description to a MessageWriter |
4618 | + </summary> |
4619 | + <param name="writer">The writer on which the description is displayed</param> |
4620 | + </member> |
4621 | + <member name="M:NUnit.Framework.Constraints.PropertyExistsConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> |
4622 | + <summary> |
4623 | + Write the actual value for a failing constraint test to a |
4624 | + MessageWriter. |
4625 | + </summary> |
4626 | + <param name="writer">The writer on which the actual value is displayed</param> |
4627 | + </member> |
4628 | + <member name="M:NUnit.Framework.Constraints.PropertyExistsConstraint.GetStringRepresentation"> |
4629 | + <summary> |
4630 | + Returns the string representation of the constraint. |
4631 | + </summary> |
4632 | + <returns></returns> |
4633 | + </member> |
4634 | + <member name="T:NUnit.Framework.Constraints.PropertyConstraint"> |
4635 | + <summary> |
4636 | + PropertyConstraint extracts a named property and uses |
4637 | + its value as the actual value for a chained constraint. |
4638 | + </summary> |
4639 | + </member> |
4640 | + <member name="T:NUnit.Framework.Constraints.PrefixConstraint"> |
4641 | + <summary> |
4642 | + Abstract base class used for prefixes |
4643 | + </summary> |
4644 | + </member> |
4645 | + <member name="F:NUnit.Framework.Constraints.PrefixConstraint.baseConstraint"> |
4646 | + <summary> |
4647 | + The base constraint |
4648 | + </summary> |
4649 | + </member> |
4650 | + <member name="M:NUnit.Framework.Constraints.PrefixConstraint.#ctor(NUnit.Framework.Constraints.IResolveConstraint)"> |
4651 | + <summary> |
4652 | + Construct given a base constraint |
4653 | + </summary> |
4654 | + <param name="resolvable"></param> |
4655 | + </member> |
4656 | + <member name="M:NUnit.Framework.Constraints.PropertyConstraint.#ctor(System.String,NUnit.Framework.Constraints.Constraint)"> |
4657 | + <summary> |
4658 | + Initializes a new instance of the <see cref="T:PropertyConstraint"/> class. |
4659 | + </summary> |
4660 | + <param name="name">The name.</param> |
4661 | + <param name="baseConstraint">The constraint to apply to the property.</param> |
4662 | + </member> |
4663 | + <member name="M:NUnit.Framework.Constraints.PropertyConstraint.Matches(System.Object)"> |
4664 | + <summary> |
4665 | + Test whether the constraint is satisfied by a given value |
4666 | + </summary> |
4667 | + <param name="actual">The value to be tested</param> |
4668 | + <returns>True for success, false for failure</returns> |
4669 | + </member> |
4670 | + <member name="M:NUnit.Framework.Constraints.PropertyConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4671 | + <summary> |
4672 | + Write the constraint description to a MessageWriter |
4673 | + </summary> |
4674 | + <param name="writer">The writer on which the description is displayed</param> |
4675 | + </member> |
4676 | + <member name="M:NUnit.Framework.Constraints.PropertyConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> |
4677 | + <summary> |
4678 | + Write the actual value for a failing constraint test to a |
4679 | + MessageWriter. The default implementation simply writes |
4680 | + the raw value of actual, leaving it to the writer to |
4681 | + perform any formatting. |
4682 | + </summary> |
4683 | + <param name="writer">The writer on which the actual value is displayed</param> |
4684 | + </member> |
4685 | + <member name="M:NUnit.Framework.Constraints.PropertyConstraint.GetStringRepresentation"> |
4686 | + <summary> |
4687 | + Returns the string representation of the constraint. |
4688 | + </summary> |
4689 | + <returns></returns> |
4690 | + </member> |
4691 | + <member name="T:NUnit.Framework.Constraints.NotConstraint"> |
4692 | + <summary> |
4693 | + NotConstraint negates the effect of some other constraint |
4694 | + </summary> |
4695 | + </member> |
4696 | + <member name="M:NUnit.Framework.Constraints.NotConstraint.#ctor(NUnit.Framework.Constraints.Constraint)"> |
4697 | + <summary> |
4698 | + Initializes a new instance of the <see cref="T:NotConstraint"/> class. |
4699 | + </summary> |
4700 | + <param name="baseConstraint">The base constraint to be negated.</param> |
4701 | + </member> |
4702 | + <member name="M:NUnit.Framework.Constraints.NotConstraint.Matches(System.Object)"> |
4703 | + <summary> |
4704 | + Test whether the constraint is satisfied by a given value |
4705 | + </summary> |
4706 | + <param name="actual">The value to be tested</param> |
4707 | + <returns>True for if the base constraint fails, false if it succeeds</returns> |
4708 | + </member> |
4709 | + <member name="M:NUnit.Framework.Constraints.NotConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4710 | + <summary> |
4711 | + Write the constraint description to a MessageWriter |
4712 | + </summary> |
4713 | + <param name="writer">The writer on which the description is displayed</param> |
4714 | + </member> |
4715 | + <member name="M:NUnit.Framework.Constraints.NotConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> |
4716 | + <summary> |
4717 | + Write the actual value for a failing constraint test to a MessageWriter. |
4718 | + </summary> |
4719 | + <param name="writer">The writer on which the actual value is displayed</param> |
4720 | + </member> |
4721 | + <member name="T:NUnit.Framework.Constraints.AllItemsConstraint"> |
4722 | + <summary> |
4723 | + AllItemsConstraint applies another constraint to each |
4724 | + item in a collection, succeeding if they all succeed. |
4725 | + </summary> |
4726 | + </member> |
4727 | + <member name="M:NUnit.Framework.Constraints.AllItemsConstraint.#ctor(NUnit.Framework.Constraints.Constraint)"> |
4728 | + <summary> |
4729 | + Construct an AllItemsConstraint on top of an existing constraint |
4730 | + </summary> |
4731 | + <param name="itemConstraint"></param> |
4732 | + </member> |
4733 | + <member name="M:NUnit.Framework.Constraints.AllItemsConstraint.Matches(System.Object)"> |
4734 | + <summary> |
4735 | + Apply the item constraint to each item in the collection, |
4736 | + failing if any item fails. |
4737 | + </summary> |
4738 | + <param name="actual"></param> |
4739 | + <returns></returns> |
4740 | + </member> |
4741 | + <member name="M:NUnit.Framework.Constraints.AllItemsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4742 | + <summary> |
4743 | + Write a description of this constraint to a MessageWriter |
4744 | + </summary> |
4745 | + <param name="writer"></param> |
4746 | + </member> |
4747 | + <member name="T:NUnit.Framework.Constraints.SomeItemsConstraint"> |
4748 | + <summary> |
4749 | + SomeItemsConstraint applies another constraint to each |
4750 | + item in a collection, succeeding if any of them succeeds. |
4751 | + </summary> |
4752 | + </member> |
4753 | + <member name="M:NUnit.Framework.Constraints.SomeItemsConstraint.#ctor(NUnit.Framework.Constraints.Constraint)"> |
4754 | + <summary> |
4755 | + Construct a SomeItemsConstraint on top of an existing constraint |
4756 | + </summary> |
4757 | + <param name="itemConstraint"></param> |
4758 | + </member> |
4759 | + <member name="M:NUnit.Framework.Constraints.SomeItemsConstraint.Matches(System.Object)"> |
4760 | + <summary> |
4761 | + Apply the item constraint to each item in the collection, |
4762 | + succeeding if any item succeeds. |
4763 | + </summary> |
4764 | + <param name="actual"></param> |
4765 | + <returns></returns> |
4766 | + </member> |
4767 | + <member name="M:NUnit.Framework.Constraints.SomeItemsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4768 | + <summary> |
4769 | + Write a description of this constraint to a MessageWriter |
4770 | + </summary> |
4771 | + <param name="writer"></param> |
4772 | + </member> |
4773 | + <member name="T:NUnit.Framework.Constraints.NoItemConstraint"> |
4774 | + <summary> |
4775 | + NoItemConstraint applies another constraint to each |
4776 | + item in a collection, failing if any of them succeeds. |
4777 | + </summary> |
4778 | + </member> |
4779 | + <member name="M:NUnit.Framework.Constraints.NoItemConstraint.#ctor(NUnit.Framework.Constraints.Constraint)"> |
4780 | + <summary> |
4781 | + Construct a SomeItemsConstraint on top of an existing constraint |
4782 | + </summary> |
4783 | + <param name="itemConstraint"></param> |
4784 | + </member> |
4785 | + <member name="M:NUnit.Framework.Constraints.NoItemConstraint.Matches(System.Object)"> |
4786 | + <summary> |
4787 | + Apply the item constraint to each item in the collection, |
4788 | + failing if any item fails. |
4789 | + </summary> |
4790 | + <param name="actual"></param> |
4791 | + <returns></returns> |
4792 | + </member> |
4793 | + <member name="M:NUnit.Framework.Constraints.NoItemConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> |
4794 | + <summary> |
4795 | + Write a description of this constraint to a MessageWriter |
4796 | + </summary> |
4797 | + <param name="writer"></param> |
4798 | + </member> |
4799 | + <member name="T:NUnit.Framework.Constraints.Numerics"> |
4800 | + <summary> |
4801 | + The Numerics class contains common operations on numeric values. |
4802 | + </summary> |
4803 | + </member> |
4804 | + <member name="M:NUnit.Framework.Constraints.Numerics.IsNumericType(System.Object)"> |
4805 | + <summary> |
4806 | + Checks the type of the object, returning true if |
4807 | + the object is a numeric type. |
4808 | + </summary> |
4809 | + <param name="obj">The object to check</param> |
4810 | + <returns>true if the object is a numeric type</returns> |
4811 | + </member> |
4812 | + <member name="M:NUnit.Framework.Constraints.Numerics.IsFloatingPointNumeric(System.Object)"> |
4813 | + <summary> |
4814 | + Checks the type of the object, returning true if |
4815 | + the object is a floating point numeric type. |
4816 | + </summary> |
4817 | + <param name="obj">The object to check</param> |
4818 | + <returns>true if the object is a floating point numeric type</returns> |
4819 | + </member> |
4820 | + <member name="M:NUnit.Framework.Constraints.Numerics.IsFixedPointNumeric(System.Object)"> |
4821 | + <summary> |
4822 | + Checks the type of the object, returning true if |
4823 | + the object is a fixed point numeric type. |
4824 | + </summary> |
4825 | + <param name="obj">The object to check</param> |
4826 | + <returns>true if the object is a fixed point numeric type</returns> |
4827 | + </member> |
4828 | + <member name="M:NUnit.Framework.Constraints.Numerics.AreEqual(System.Object,System.Object,NUnit.Framework.Constraints.Tolerance@)"> |
4829 | + <summary> |
4830 | + Test two numeric values for equality, performing the usual numeric |
4831 | + conversions and using a provided or default tolerance. If the tolerance |
4832 | + provided is Empty, this method may set it to a default tolerance. |
4833 | + </summary> |
4834 | + <param name="expected">The expected value</param> |
4835 | + <param name="actual">The actual value</param> |
4836 | + <param name="tolerance">A reference to the tolerance in effect</param> |
4837 | + <returns>True if the values are equal</returns> |
4838 | + </member> |
4839 | + <member name="M:NUnit.Framework.Constraints.Numerics.Compare(System.Object,System.Object)"> |
4840 | + <summary> |
4841 | + Compare two numeric values, performing the usual numeric conversions. |
4842 | + </summary> |
4843 | + <param name="expected">The expected value</param> |
4844 | + <param name="actual">The actual value</param> |
4845 | + <returns>The relationship of the values to each other</returns> |
4846 | + </member> |
4847 | + <member name="T:NUnit.Framework.Constraints.MessageWriter"> |
4848 | + <summary> |
4849 | + MessageWriter is the abstract base for classes that write |
4850 | + constraint descriptions and messages in some form. The |
4851 | + class has separate methods for writing various components |
4852 | + of a message, allowing implementations to tailor the |
4853 | + presentation as needed. |
4854 | + </summary> |
4855 | + </member> |
4856 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.#ctor"> |
4857 | + <summary> |
4858 | + Construct a MessageWriter given a culture |
4859 | + </summary> |
4860 | + </member> |
4861 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteMessageLine(System.String,System.Object[])"> |
4862 | + <summary> |
4863 | + Method to write single line message with optional args, usually |
4864 | + written to precede the general failure message. |
4865 | + </summary> |
4866 | + <param name="message">The message to be written</param> |
4867 | + <param name="args">Any arguments used in formatting the message</param> |
4868 | + </member> |
4869 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteMessageLine(System.Int32,System.String,System.Object[])"> |
4870 | + <summary> |
4871 | + Method to write single line message with optional args, usually |
4872 | + written to precede the general failure message, at a givel |
4873 | + indentation level. |
4874 | + </summary> |
4875 | + <param name="level">The indentation level of the message</param> |
4876 | + <param name="message">The message to be written</param> |
4877 | + <param name="args">Any arguments used in formatting the message</param> |
4878 | + </member> |
4879 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.DisplayDifferences(NUnit.Framework.Constraints.Constraint)"> |
4880 | + <summary> |
4881 | + Display Expected and Actual lines for a constraint. This |
4882 | + is called by MessageWriter's default implementation of |
4883 | + WriteMessageTo and provides the generic two-line display. |
4884 | + </summary> |
4885 | + <param name="constraint">The constraint that failed</param> |
4886 | + </member> |
4887 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.DisplayDifferences(System.Object,System.Object)"> |
4888 | + <summary> |
4889 | + Display Expected and Actual lines for given values. This |
4890 | + method may be called by constraints that need more control over |
4891 | + the display of actual and expected values than is provided |
4892 | + by the default implementation. |
4893 | + </summary> |
4894 | + <param name="expected">The expected value</param> |
4895 | + <param name="actual">The actual value causing the failure</param> |
4896 | + </member> |
4897 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.DisplayDifferences(System.Object,System.Object,NUnit.Framework.Constraints.Tolerance)"> |
4898 | + <summary> |
4899 | + Display Expected and Actual lines for given values, including |
4900 | + a tolerance value on the Expected line. |
4901 | + </summary> |
4902 | + <param name="expected">The expected value</param> |
4903 | + <param name="actual">The actual value causing the failure</param> |
4904 | + <param name="tolerance">The tolerance within which the test was made</param> |
4905 | + </member> |
4906 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.DisplayStringDifferences(System.String,System.String,System.Int32,System.Boolean,System.Boolean)"> |
4907 | + <summary> |
4908 | + Display the expected and actual string values on separate lines. |
4909 | + If the mismatch parameter is >=0, an additional line is displayed |
4910 | + line containing a caret that points to the mismatch point. |
4911 | + </summary> |
4912 | + <param name="expected">The expected string value</param> |
4913 | + <param name="actual">The actual string value</param> |
4914 | + <param name="mismatch">The point at which the strings don't match or -1</param> |
4915 | + <param name="ignoreCase">If true, case is ignored in locating the point where the strings differ</param> |
4916 | + <param name="clipping">If true, the strings should be clipped to fit the line</param> |
4917 | + </member> |
4918 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteConnector(System.String)"> |
4919 | + <summary> |
4920 | + Writes the text for a connector. |
4921 | + </summary> |
4922 | + <param name="connector">The connector.</param> |
4923 | + </member> |
4924 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.WritePredicate(System.String)"> |
4925 | + <summary> |
4926 | + Writes the text for a predicate. |
4927 | + </summary> |
4928 | + <param name="predicate">The predicate.</param> |
4929 | + </member> |
4930 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteExpectedValue(System.Object)"> |
4931 | + <summary> |
4932 | + Writes the text for an expected value. |
4933 | + </summary> |
4934 | + <param name="expected">The expected value.</param> |
4935 | + </member> |
4936 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteModifier(System.String)"> |
4937 | + <summary> |
4938 | + Writes the text for a modifier |
4939 | + </summary> |
4940 | + <param name="modifier">The modifier.</param> |
4941 | + </member> |
4942 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteActualValue(System.Object)"> |
4943 | + <summary> |
4944 | + Writes the text for an actual value. |
4945 | + </summary> |
4946 | + <param name="actual">The actual value.</param> |
4947 | + </member> |
4948 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteValue(System.Object)"> |
4949 | + <summary> |
4950 | + Writes the text for a generalized value. |
4951 | + </summary> |
4952 | + <param name="val">The value.</param> |
4953 | + </member> |
4954 | + <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteCollectionElements(System.Collections.ICollection,System.Int32,System.Int32)"> |
4955 | + <summary> |
4956 | + Writes the text for a collection value, |
4957 | + starting at a particular point, to a max length |
4958 | + </summary> |
4959 | + <param name="collection">The collection containing elements to write.</param> |
4960 | + <param name="start">The starting point of the elements to write</param> |
4961 | + <param name="max">The maximum number of elements to write</param> |
4962 | + </member> |
4963 | + <member name="P:NUnit.Framework.Constraints.MessageWriter.MaxLineLength"> |
4964 | + <summary> |
4965 | + Abstract method to get the max line length |
4966 | + </summary> |
4967 | + </member> |
4968 | + <member name="T:NUnit.Framework.Constraints.MsgUtils"> |
4969 | + <summary> |
4970 | + Static methods used in creating messages |
4971 | + </summary> |
4972 | + </member> |
4973 | + <member name="F:NUnit.Framework.Constraints.MsgUtils.ELLIPSIS"> |
4974 | + <summary> |
4975 | + Static string used when strings are clipped |
4976 | + </summary> |
4977 | + </member> |
4978 | + <member name="M:NUnit.Framework.Constraints.MsgUtils.GetTypeRepresentation(System.Object)"> |
4979 | + <summary> |
4980 | + Returns the representation of a type as used in NUnitLite. |
4981 | + This is the same as Type.ToString() except for arrays, |
4982 | + which are displayed with their declared sizes. |
4983 | + </summary> |
4984 | + <param name="obj"></param> |
4985 | + <returns></returns> |
4986 | + </member> |
4987 | + <member name="M:NUnit.Framework.Constraints.MsgUtils.EscapeControlChars(System.String)"> |
4988 | + <summary> |
4989 | + Converts any control characters in a string |
4990 | + to their escaped representation. |
4991 | + </summary> |
4992 | + <param name="s">The string to be converted</param> |
4993 | + <returns>The converted string</returns> |
4994 | + </member> |
4995 | + <member name="M:NUnit.Framework.Constraints.MsgUtils.GetArrayIndicesAsString(System.Int32[])"> |
4996 | + <summary> |
4997 | + Return the a string representation for a set of indices into an array |
4998 | + </summary> |
4999 | + <param name="indices">Array of indices for which a string is needed</param> |
5000 | + </member> |
The diff has been truncated for viewing.