Mercurial > silverbladetech
comparison SilverlightExampleApp/SilverlightExampleApp.Interfaces/Services/ClientDataService.cs @ 59:3591c26bd63e
MVVMLight added
author | Steven Hollidge <stevenhollidge@hotmail.com> |
---|---|
date | Sat, 21 Apr 2012 19:20:28 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
58:241e2f22ed3c | 59:3591c26bd63e |
---|---|
1 //------------------------------------------------------------------------------ | |
2 // <auto-generated> | |
3 // This code was generated by a tool. | |
4 // Runtime Version:4.0.30319.17379 | |
5 // | |
6 // Changes to this file may cause incorrect behavior and will be lost if | |
7 // the code is regenerated. | |
8 // </auto-generated> | |
9 //------------------------------------------------------------------------------ | |
10 | |
11 // | |
12 // This code was auto-generated by SlSvcUtil, version 5.0.61118.0 | |
13 // | |
14 | |
15 | |
16 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] | |
17 [System.ServiceModel.ServiceContractAttribute(Namespace="", ConfigurationName="ClientDataService")] | |
18 public interface ClientDataService | |
19 { | |
20 | |
21 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:ClientDataService/Get", ReplyAction="urn:ClientDataService/GetResponse")] | |
22 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<object>))] | |
23 System.IAsyncResult BeginGet(int id, System.AsyncCallback callback, object asyncState); | |
24 | |
25 object EndGet(System.IAsyncResult result); | |
26 | |
27 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:ClientDataService/GetAll", ReplyAction="urn:ClientDataService/GetAllResponse")] | |
28 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<object>))] | |
29 System.IAsyncResult BeginGetAll(System.AsyncCallback callback, object asyncState); | |
30 | |
31 System.Collections.ObjectModel.ObservableCollection<object> EndGetAll(System.IAsyncResult result); | |
32 | |
33 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:ClientDataService/Insert", ReplyAction="urn:ClientDataService/InsertResponse")] | |
34 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<object>))] | |
35 System.IAsyncResult BeginInsert(object item, System.AsyncCallback callback, object asyncState); | |
36 | |
37 void EndInsert(System.IAsyncResult result); | |
38 | |
39 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:ClientDataService/Update", ReplyAction="urn:ClientDataService/UpdateResponse")] | |
40 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<object>))] | |
41 System.IAsyncResult BeginUpdate(object item, System.AsyncCallback callback, object asyncState); | |
42 | |
43 void EndUpdate(System.IAsyncResult result); | |
44 | |
45 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:ClientDataService/Delete", ReplyAction="urn:ClientDataService/DeleteResponse")] | |
46 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<object>))] | |
47 System.IAsyncResult BeginDelete(object item, System.AsyncCallback callback, object asyncState); | |
48 | |
49 void EndDelete(System.IAsyncResult result); | |
50 } | |
51 | |
52 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] | |
53 public interface ClientDataServiceChannel : ClientDataService, System.ServiceModel.IClientChannel | |
54 { | |
55 } | |
56 | |
57 [System.Diagnostics.DebuggerStepThroughAttribute()] | |
58 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] | |
59 public partial class GetCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs | |
60 { | |
61 | |
62 private object[] results; | |
63 | |
64 public GetCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : | |
65 base(exception, cancelled, userState) | |
66 { | |
67 this.results = results; | |
68 } | |
69 | |
70 public object Result | |
71 { | |
72 get | |
73 { | |
74 base.RaiseExceptionIfNecessary(); | |
75 return ((object)(this.results[0])); | |
76 } | |
77 } | |
78 } | |
79 | |
80 [System.Diagnostics.DebuggerStepThroughAttribute()] | |
81 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] | |
82 public partial class GetAllCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs | |
83 { | |
84 | |
85 private object[] results; | |
86 | |
87 public GetAllCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : | |
88 base(exception, cancelled, userState) | |
89 { | |
90 this.results = results; | |
91 } | |
92 | |
93 public System.Collections.ObjectModel.ObservableCollection<object> Result | |
94 { | |
95 get | |
96 { | |
97 base.RaiseExceptionIfNecessary(); | |
98 return ((System.Collections.ObjectModel.ObservableCollection<object>)(this.results[0])); | |
99 } | |
100 } | |
101 } | |
102 | |
103 [System.Diagnostics.DebuggerStepThroughAttribute()] | |
104 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] | |
105 public partial class ClientDataServiceClient : System.ServiceModel.ClientBase<ClientDataService>, ClientDataService, IClientDataServiceClient | |
106 { | |
107 | |
108 private BeginOperationDelegate onBeginGetDelegate; | |
109 | |
110 private EndOperationDelegate onEndGetDelegate; | |
111 | |
112 private System.Threading.SendOrPostCallback onGetCompletedDelegate; | |
113 | |
114 private BeginOperationDelegate onBeginGetAllDelegate; | |
115 | |
116 private EndOperationDelegate onEndGetAllDelegate; | |
117 | |
118 private System.Threading.SendOrPostCallback onGetAllCompletedDelegate; | |
119 | |
120 private BeginOperationDelegate onBeginInsertDelegate; | |
121 | |
122 private EndOperationDelegate onEndInsertDelegate; | |
123 | |
124 private System.Threading.SendOrPostCallback onInsertCompletedDelegate; | |
125 | |
126 private BeginOperationDelegate onBeginUpdateDelegate; | |
127 | |
128 private EndOperationDelegate onEndUpdateDelegate; | |
129 | |
130 private System.Threading.SendOrPostCallback onUpdateCompletedDelegate; | |
131 | |
132 private BeginOperationDelegate onBeginDeleteDelegate; | |
133 | |
134 private EndOperationDelegate onEndDeleteDelegate; | |
135 | |
136 private System.Threading.SendOrPostCallback onDeleteCompletedDelegate; | |
137 | |
138 private BeginOperationDelegate onBeginOpenDelegate; | |
139 | |
140 private EndOperationDelegate onEndOpenDelegate; | |
141 | |
142 private System.Threading.SendOrPostCallback onOpenCompletedDelegate; | |
143 | |
144 private BeginOperationDelegate onBeginCloseDelegate; | |
145 | |
146 private EndOperationDelegate onEndCloseDelegate; | |
147 | |
148 private System.Threading.SendOrPostCallback onCloseCompletedDelegate; | |
149 | |
150 public ClientDataServiceClient() | |
151 { | |
152 } | |
153 | |
154 public ClientDataServiceClient(string endpointConfigurationName) : | |
155 base(endpointConfigurationName) | |
156 { | |
157 } | |
158 | |
159 public ClientDataServiceClient(string endpointConfigurationName, string remoteAddress) : | |
160 base(endpointConfigurationName, remoteAddress) | |
161 { | |
162 } | |
163 | |
164 public ClientDataServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : | |
165 base(endpointConfigurationName, remoteAddress) | |
166 { | |
167 } | |
168 | |
169 public ClientDataServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : | |
170 base(binding, remoteAddress) | |
171 { | |
172 } | |
173 | |
174 public System.Net.CookieContainer CookieContainer | |
175 { | |
176 get | |
177 { | |
178 System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>(); | |
179 if ((httpCookieContainerManager != null)) | |
180 { | |
181 return httpCookieContainerManager.CookieContainer; | |
182 } | |
183 else | |
184 { | |
185 return null; | |
186 } | |
187 } | |
188 set | |
189 { | |
190 System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>(); | |
191 if ((httpCookieContainerManager != null)) | |
192 { | |
193 httpCookieContainerManager.CookieContainer = value; | |
194 } | |
195 else | |
196 { | |
197 throw new System.InvalidOperationException("Unable to set the CookieContainer. Please make sure the binding contains an HttpC" + | |
198 "ookieContainerBindingElement."); | |
199 } | |
200 } | |
201 } | |
202 | |
203 public event System.EventHandler<GetCompletedEventArgs> GetCompleted; | |
204 | |
205 public event System.EventHandler<GetAllCompletedEventArgs> GetAllCompleted; | |
206 | |
207 public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> InsertCompleted; | |
208 | |
209 public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> UpdateCompleted; | |
210 | |
211 public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> DeleteCompleted; | |
212 | |
213 public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> OpenCompleted; | |
214 | |
215 public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> CloseCompleted; | |
216 | |
217 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] | |
218 System.IAsyncResult ClientDataService.BeginGet(int id, System.AsyncCallback callback, object asyncState) | |
219 { | |
220 return base.Channel.BeginGet(id, callback, asyncState); | |
221 } | |
222 | |
223 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] | |
224 object ClientDataService.EndGet(System.IAsyncResult result) | |
225 { | |
226 return base.Channel.EndGet(result); | |
227 } | |
228 | |
229 private System.IAsyncResult OnBeginGet(object[] inValues, System.AsyncCallback callback, object asyncState) | |
230 { | |
231 int id = ((int)(inValues[0])); | |
232 return ((ClientDataService)(this)).BeginGet(id, callback, asyncState); | |
233 } | |
234 | |
235 private object[] OnEndGet(System.IAsyncResult result) | |
236 { | |
237 object retVal = ((ClientDataService)(this)).EndGet(result); | |
238 return new object[] { | |
239 retVal}; | |
240 } | |
241 | |
242 private void OnGetCompleted(object state) | |
243 { | |
244 if ((this.GetCompleted != null)) | |
245 { | |
246 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); | |
247 this.GetCompleted(this, new GetCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState)); | |
248 } | |
249 } | |
250 | |
251 public void GetAsync(int id) | |
252 { | |
253 this.GetAsync(id, null); | |
254 } | |
255 | |
256 public void GetAsync(int id, object userState) | |
257 { | |
258 if ((this.onBeginGetDelegate == null)) | |
259 { | |
260 this.onBeginGetDelegate = new BeginOperationDelegate(this.OnBeginGet); | |
261 } | |
262 if ((this.onEndGetDelegate == null)) | |
263 { | |
264 this.onEndGetDelegate = new EndOperationDelegate(this.OnEndGet); | |
265 } | |
266 if ((this.onGetCompletedDelegate == null)) | |
267 { | |
268 this.onGetCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetCompleted); | |
269 } | |
270 base.InvokeAsync(this.onBeginGetDelegate, new object[] { | |
271 id}, this.onEndGetDelegate, this.onGetCompletedDelegate, userState); | |
272 } | |
273 | |
274 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] | |
275 System.IAsyncResult ClientDataService.BeginGetAll(System.AsyncCallback callback, object asyncState) | |
276 { | |
277 return base.Channel.BeginGetAll(callback, asyncState); | |
278 } | |
279 | |
280 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] | |
281 System.Collections.ObjectModel.ObservableCollection<object> ClientDataService.EndGetAll(System.IAsyncResult result) | |
282 { | |
283 return base.Channel.EndGetAll(result); | |
284 } | |
285 | |
286 private System.IAsyncResult OnBeginGetAll(object[] inValues, System.AsyncCallback callback, object asyncState) | |
287 { | |
288 return ((ClientDataService)(this)).BeginGetAll(callback, asyncState); | |
289 } | |
290 | |
291 private object[] OnEndGetAll(System.IAsyncResult result) | |
292 { | |
293 System.Collections.ObjectModel.ObservableCollection<object> retVal = ((ClientDataService)(this)).EndGetAll(result); | |
294 return new object[] { | |
295 retVal}; | |
296 } | |
297 | |
298 private void OnGetAllCompleted(object state) | |
299 { | |
300 if ((this.GetAllCompleted != null)) | |
301 { | |
302 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); | |
303 this.GetAllCompleted(this, new GetAllCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState)); | |
304 } | |
305 } | |
306 | |
307 public void GetAllAsync() | |
308 { | |
309 this.GetAllAsync(null); | |
310 } | |
311 | |
312 public void GetAllAsync(object userState) | |
313 { | |
314 if ((this.onBeginGetAllDelegate == null)) | |
315 { | |
316 this.onBeginGetAllDelegate = new BeginOperationDelegate(this.OnBeginGetAll); | |
317 } | |
318 if ((this.onEndGetAllDelegate == null)) | |
319 { | |
320 this.onEndGetAllDelegate = new EndOperationDelegate(this.OnEndGetAll); | |
321 } | |
322 if ((this.onGetAllCompletedDelegate == null)) | |
323 { | |
324 this.onGetAllCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetAllCompleted); | |
325 } | |
326 base.InvokeAsync(this.onBeginGetAllDelegate, null, this.onEndGetAllDelegate, this.onGetAllCompletedDelegate, userState); | |
327 } | |
328 | |
329 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] | |
330 System.IAsyncResult ClientDataService.BeginInsert(object item, System.AsyncCallback callback, object asyncState) | |
331 { | |
332 return base.Channel.BeginInsert(item, callback, asyncState); | |
333 } | |
334 | |
335 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] | |
336 void ClientDataService.EndInsert(System.IAsyncResult result) | |
337 { | |
338 base.Channel.EndInsert(result); | |
339 } | |
340 | |
341 private System.IAsyncResult OnBeginInsert(object[] inValues, System.AsyncCallback callback, object asyncState) | |
342 { | |
343 object item = ((object)(inValues[0])); | |
344 return ((ClientDataService)(this)).BeginInsert(item, callback, asyncState); | |
345 } | |
346 | |
347 private object[] OnEndInsert(System.IAsyncResult result) | |
348 { | |
349 ((ClientDataService)(this)).EndInsert(result); | |
350 return null; | |
351 } | |
352 | |
353 private void OnInsertCompleted(object state) | |
354 { | |
355 if ((this.InsertCompleted != null)) | |
356 { | |
357 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); | |
358 this.InsertCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState)); | |
359 } | |
360 } | |
361 | |
362 public void InsertAsync(object item) | |
363 { | |
364 this.InsertAsync(item, null); | |
365 } | |
366 | |
367 public void InsertAsync(object item, object userState) | |
368 { | |
369 if ((this.onBeginInsertDelegate == null)) | |
370 { | |
371 this.onBeginInsertDelegate = new BeginOperationDelegate(this.OnBeginInsert); | |
372 } | |
373 if ((this.onEndInsertDelegate == null)) | |
374 { | |
375 this.onEndInsertDelegate = new EndOperationDelegate(this.OnEndInsert); | |
376 } | |
377 if ((this.onInsertCompletedDelegate == null)) | |
378 { | |
379 this.onInsertCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnInsertCompleted); | |
380 } | |
381 base.InvokeAsync(this.onBeginInsertDelegate, new object[] { | |
382 item}, this.onEndInsertDelegate, this.onInsertCompletedDelegate, userState); | |
383 } | |
384 | |
385 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] | |
386 System.IAsyncResult ClientDataService.BeginUpdate(object item, System.AsyncCallback callback, object asyncState) | |
387 { | |
388 return base.Channel.BeginUpdate(item, callback, asyncState); | |
389 } | |
390 | |
391 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] | |
392 void ClientDataService.EndUpdate(System.IAsyncResult result) | |
393 { | |
394 base.Channel.EndUpdate(result); | |
395 } | |
396 | |
397 private System.IAsyncResult OnBeginUpdate(object[] inValues, System.AsyncCallback callback, object asyncState) | |
398 { | |
399 object item = ((object)(inValues[0])); | |
400 return ((ClientDataService)(this)).BeginUpdate(item, callback, asyncState); | |
401 } | |
402 | |
403 private object[] OnEndUpdate(System.IAsyncResult result) | |
404 { | |
405 ((ClientDataService)(this)).EndUpdate(result); | |
406 return null; | |
407 } | |
408 | |
409 private void OnUpdateCompleted(object state) | |
410 { | |
411 if ((this.UpdateCompleted != null)) | |
412 { | |
413 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); | |
414 this.UpdateCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState)); | |
415 } | |
416 } | |
417 | |
418 public void UpdateAsync(object item) | |
419 { | |
420 this.UpdateAsync(item, null); | |
421 } | |
422 | |
423 public void UpdateAsync(object item, object userState) | |
424 { | |
425 if ((this.onBeginUpdateDelegate == null)) | |
426 { | |
427 this.onBeginUpdateDelegate = new BeginOperationDelegate(this.OnBeginUpdate); | |
428 } | |
429 if ((this.onEndUpdateDelegate == null)) | |
430 { | |
431 this.onEndUpdateDelegate = new EndOperationDelegate(this.OnEndUpdate); | |
432 } | |
433 if ((this.onUpdateCompletedDelegate == null)) | |
434 { | |
435 this.onUpdateCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnUpdateCompleted); | |
436 } | |
437 base.InvokeAsync(this.onBeginUpdateDelegate, new object[] { | |
438 item}, this.onEndUpdateDelegate, this.onUpdateCompletedDelegate, userState); | |
439 } | |
440 | |
441 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] | |
442 System.IAsyncResult ClientDataService.BeginDelete(object item, System.AsyncCallback callback, object asyncState) | |
443 { | |
444 return base.Channel.BeginDelete(item, callback, asyncState); | |
445 } | |
446 | |
447 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] | |
448 void ClientDataService.EndDelete(System.IAsyncResult result) | |
449 { | |
450 base.Channel.EndDelete(result); | |
451 } | |
452 | |
453 private System.IAsyncResult OnBeginDelete(object[] inValues, System.AsyncCallback callback, object asyncState) | |
454 { | |
455 object item = ((object)(inValues[0])); | |
456 return ((ClientDataService)(this)).BeginDelete(item, callback, asyncState); | |
457 } | |
458 | |
459 private object[] OnEndDelete(System.IAsyncResult result) | |
460 { | |
461 ((ClientDataService)(this)).EndDelete(result); | |
462 return null; | |
463 } | |
464 | |
465 private void OnDeleteCompleted(object state) | |
466 { | |
467 if ((this.DeleteCompleted != null)) | |
468 { | |
469 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); | |
470 this.DeleteCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState)); | |
471 } | |
472 } | |
473 | |
474 public void DeleteAsync(object item) | |
475 { | |
476 this.DeleteAsync(item, null); | |
477 } | |
478 | |
479 public void DeleteAsync(object item, object userState) | |
480 { | |
481 if ((this.onBeginDeleteDelegate == null)) | |
482 { | |
483 this.onBeginDeleteDelegate = new BeginOperationDelegate(this.OnBeginDelete); | |
484 } | |
485 if ((this.onEndDeleteDelegate == null)) | |
486 { | |
487 this.onEndDeleteDelegate = new EndOperationDelegate(this.OnEndDelete); | |
488 } | |
489 if ((this.onDeleteCompletedDelegate == null)) | |
490 { | |
491 this.onDeleteCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnDeleteCompleted); | |
492 } | |
493 base.InvokeAsync(this.onBeginDeleteDelegate, new object[] { | |
494 item}, this.onEndDeleteDelegate, this.onDeleteCompletedDelegate, userState); | |
495 } | |
496 | |
497 private System.IAsyncResult OnBeginOpen(object[] inValues, System.AsyncCallback callback, object asyncState) | |
498 { | |
499 return ((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(callback, asyncState); | |
500 } | |
501 | |
502 private object[] OnEndOpen(System.IAsyncResult result) | |
503 { | |
504 ((System.ServiceModel.ICommunicationObject)(this)).EndOpen(result); | |
505 return null; | |
506 } | |
507 | |
508 private void OnOpenCompleted(object state) | |
509 { | |
510 if ((this.OpenCompleted != null)) | |
511 { | |
512 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); | |
513 this.OpenCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState)); | |
514 } | |
515 } | |
516 | |
517 public void OpenAsync() | |
518 { | |
519 this.OpenAsync(null); | |
520 } | |
521 | |
522 public void OpenAsync(object userState) | |
523 { | |
524 if ((this.onBeginOpenDelegate == null)) | |
525 { | |
526 this.onBeginOpenDelegate = new BeginOperationDelegate(this.OnBeginOpen); | |
527 } | |
528 if ((this.onEndOpenDelegate == null)) | |
529 { | |
530 this.onEndOpenDelegate = new EndOperationDelegate(this.OnEndOpen); | |
531 } | |
532 if ((this.onOpenCompletedDelegate == null)) | |
533 { | |
534 this.onOpenCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnOpenCompleted); | |
535 } | |
536 base.InvokeAsync(this.onBeginOpenDelegate, null, this.onEndOpenDelegate, this.onOpenCompletedDelegate, userState); | |
537 } | |
538 | |
539 private System.IAsyncResult OnBeginClose(object[] inValues, System.AsyncCallback callback, object asyncState) | |
540 { | |
541 return ((System.ServiceModel.ICommunicationObject)(this)).BeginClose(callback, asyncState); | |
542 } | |
543 | |
544 private object[] OnEndClose(System.IAsyncResult result) | |
545 { | |
546 ((System.ServiceModel.ICommunicationObject)(this)).EndClose(result); | |
547 return null; | |
548 } | |
549 | |
550 private void OnCloseCompleted(object state) | |
551 { | |
552 if ((this.CloseCompleted != null)) | |
553 { | |
554 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); | |
555 this.CloseCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState)); | |
556 } | |
557 } | |
558 | |
559 public void CloseAsync() | |
560 { | |
561 this.CloseAsync(null); | |
562 } | |
563 | |
564 public void CloseAsync(object userState) | |
565 { | |
566 if ((this.onBeginCloseDelegate == null)) | |
567 { | |
568 this.onBeginCloseDelegate = new BeginOperationDelegate(this.OnBeginClose); | |
569 } | |
570 if ((this.onEndCloseDelegate == null)) | |
571 { | |
572 this.onEndCloseDelegate = new EndOperationDelegate(this.OnEndClose); | |
573 } | |
574 if ((this.onCloseCompletedDelegate == null)) | |
575 { | |
576 this.onCloseCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnCloseCompleted); | |
577 } | |
578 base.InvokeAsync(this.onBeginCloseDelegate, null, this.onEndCloseDelegate, this.onCloseCompletedDelegate, userState); | |
579 } | |
580 | |
581 protected override ClientDataService CreateChannel() | |
582 { | |
583 return new ClientDataServiceClientChannel(this); | |
584 } | |
585 | |
586 private class ClientDataServiceClientChannel : ChannelBase<ClientDataService>, ClientDataService | |
587 { | |
588 | |
589 public ClientDataServiceClientChannel(System.ServiceModel.ClientBase<ClientDataService> client) : | |
590 base(client) | |
591 { | |
592 } | |
593 | |
594 public System.IAsyncResult BeginGet(int id, System.AsyncCallback callback, object asyncState) | |
595 { | |
596 object[] _args = new object[1]; | |
597 _args[0] = id; | |
598 System.IAsyncResult _result = base.BeginInvoke("Get", _args, callback, asyncState); | |
599 return _result; | |
600 } | |
601 | |
602 public object EndGet(System.IAsyncResult result) | |
603 { | |
604 object[] _args = new object[0]; | |
605 object _result = ((object)(base.EndInvoke("Get", _args, result))); | |
606 return _result; | |
607 } | |
608 | |
609 public System.IAsyncResult BeginGetAll(System.AsyncCallback callback, object asyncState) | |
610 { | |
611 object[] _args = new object[0]; | |
612 System.IAsyncResult _result = base.BeginInvoke("GetAll", _args, callback, asyncState); | |
613 return _result; | |
614 } | |
615 | |
616 public System.Collections.ObjectModel.ObservableCollection<object> EndGetAll(System.IAsyncResult result) | |
617 { | |
618 object[] _args = new object[0]; | |
619 System.Collections.ObjectModel.ObservableCollection<object> _result = ((System.Collections.ObjectModel.ObservableCollection<object>)(base.EndInvoke("GetAll", _args, result))); | |
620 return _result; | |
621 } | |
622 | |
623 public System.IAsyncResult BeginInsert(object item, System.AsyncCallback callback, object asyncState) | |
624 { | |
625 object[] _args = new object[1]; | |
626 _args[0] = item; | |
627 System.IAsyncResult _result = base.BeginInvoke("Insert", _args, callback, asyncState); | |
628 return _result; | |
629 } | |
630 | |
631 public void EndInsert(System.IAsyncResult result) | |
632 { | |
633 object[] _args = new object[0]; | |
634 base.EndInvoke("Insert", _args, result); | |
635 } | |
636 | |
637 public System.IAsyncResult BeginUpdate(object item, System.AsyncCallback callback, object asyncState) | |
638 { | |
639 object[] _args = new object[1]; | |
640 _args[0] = item; | |
641 System.IAsyncResult _result = base.BeginInvoke("Update", _args, callback, asyncState); | |
642 return _result; | |
643 } | |
644 | |
645 public void EndUpdate(System.IAsyncResult result) | |
646 { | |
647 object[] _args = new object[0]; | |
648 base.EndInvoke("Update", _args, result); | |
649 } | |
650 | |
651 public System.IAsyncResult BeginDelete(object item, System.AsyncCallback callback, object asyncState) | |
652 { | |
653 object[] _args = new object[1]; | |
654 _args[0] = item; | |
655 System.IAsyncResult _result = base.BeginInvoke("Delete", _args, callback, asyncState); | |
656 return _result; | |
657 } | |
658 | |
659 public void EndDelete(System.IAsyncResult result) | |
660 { | |
661 object[] _args = new object[0]; | |
662 base.EndInvoke("Delete", _args, result); | |
663 } | |
664 } | |
665 } |