Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Hive.Client.Console/ServerProxy.cs @ 1314

Last change on this file since 1314 was 953, checked in by whackl, 16 years ago

added client service (#397)

File size: 23.2 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6namespace HeuristicLab.Hive.Client.Console {
7  [System.Diagnostics.DebuggerStepThroughAttribute()]
8  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
9  [System.Runtime.Serialization.DataContractAttribute(Name = "StatusCommons", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Client.Core.ClientConso" +
10      "leService")]
11  public partial class StatusCommons : object, System.Runtime.Serialization.IExtensibleDataObject {
12
13    private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
14
15    private System.Guid ClientGuidk__BackingFieldField;
16
17    private System.DateTime ConnectedSincek__BackingFieldField;
18
19    private int JobsAbortedk__BackingFieldField;
20
21    private int JobsDonek__BackingFieldField;
22
23    private int JobsFetchedk__BackingFieldField;
24
25    private HeuristicLab.Hive.Client.Core.ClientConsoleService.JobStatus[] Jobsk__BackingFieldField;
26
27    private HeuristicLab.Hive.Client.Common.NetworkEnumWcfConnState Statusk__BackingFieldField;
28
29    public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
30      get {
31        return this.extensionDataField;
32      }
33      set {
34        this.extensionDataField = value;
35      }
36    }
37
38    [System.Runtime.Serialization.DataMemberAttribute(Name = "<ClientGuid>k__BackingField", IsRequired = true)]
39    public System.Guid ClientGuidk__BackingField {
40      get {
41        return this.ClientGuidk__BackingFieldField;
42      }
43      set {
44        this.ClientGuidk__BackingFieldField = value;
45      }
46    }
47
48    [System.Runtime.Serialization.DataMemberAttribute(Name = "<ConnectedSince>k__BackingField", IsRequired = true)]
49    public System.DateTime ConnectedSincek__BackingField {
50      get {
51        return this.ConnectedSincek__BackingFieldField;
52      }
53      set {
54        this.ConnectedSincek__BackingFieldField = value;
55      }
56    }
57
58    [System.Runtime.Serialization.DataMemberAttribute(Name = "<JobsAborted>k__BackingField", IsRequired = true)]
59    public int JobsAbortedk__BackingField {
60      get {
61        return this.JobsAbortedk__BackingFieldField;
62      }
63      set {
64        this.JobsAbortedk__BackingFieldField = value;
65      }
66    }
67
68    [System.Runtime.Serialization.DataMemberAttribute(Name = "<JobsDone>k__BackingField", IsRequired = true)]
69    public int JobsDonek__BackingField {
70      get {
71        return this.JobsDonek__BackingFieldField;
72      }
73      set {
74        this.JobsDonek__BackingFieldField = value;
75      }
76    }
77
78    [System.Runtime.Serialization.DataMemberAttribute(Name = "<JobsFetched>k__BackingField", IsRequired = true)]
79    public int JobsFetchedk__BackingField {
80      get {
81        return this.JobsFetchedk__BackingFieldField;
82      }
83      set {
84        this.JobsFetchedk__BackingFieldField = value;
85      }
86    }
87
88    [System.Runtime.Serialization.DataMemberAttribute(Name = "<Jobs>k__BackingField", IsRequired = true)]
89    public HeuristicLab.Hive.Client.Core.ClientConsoleService.JobStatus[] Jobsk__BackingField {
90      get {
91        return this.Jobsk__BackingFieldField;
92      }
93      set {
94        this.Jobsk__BackingFieldField = value;
95      }
96    }
97
98    [System.Runtime.Serialization.DataMemberAttribute(Name = "<Status>k__BackingField", IsRequired = true)]
99    public HeuristicLab.Hive.Client.Common.NetworkEnumWcfConnState Statusk__BackingField {
100      get {
101        return this.Statusk__BackingFieldField;
102      }
103      set {
104        this.Statusk__BackingFieldField = value;
105      }
106    }
107  }
108
109  [System.Diagnostics.DebuggerStepThroughAttribute()]
110  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
111  [System.Runtime.Serialization.DataContractAttribute(Name = "JobStatus", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Client.Core.ClientConso" +
112      "leService")]
113  public partial class JobStatus : object, System.Runtime.Serialization.IExtensibleDataObject {
114
115    private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
116
117    private long JobIdk__BackingFieldField;
118
119    private double Progressk__BackingFieldField;
120
121    private System.DateTime Sincek__BackingFieldField;
122
123    public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
124      get {
125        return this.extensionDataField;
126      }
127      set {
128        this.extensionDataField = value;
129      }
130    }
131
132    [System.Runtime.Serialization.DataMemberAttribute(Name = "<JobId>k__BackingField", IsRequired = true)]
133    public long JobIdk__BackingField {
134      get {
135        return this.JobIdk__BackingFieldField;
136      }
137      set {
138        this.JobIdk__BackingFieldField = value;
139      }
140    }
141
142    [System.Runtime.Serialization.DataMemberAttribute(Name = "<Progress>k__BackingField", IsRequired = true)]
143    public double Progressk__BackingField {
144      get {
145        return this.Progressk__BackingFieldField;
146      }
147      set {
148        this.Progressk__BackingFieldField = value;
149      }
150    }
151
152    [System.Runtime.Serialization.DataMemberAttribute(Name = "<Since>k__BackingField", IsRequired = true)]
153    public System.DateTime Sincek__BackingField {
154      get {
155        return this.Sincek__BackingFieldField;
156      }
157      set {
158        this.Sincek__BackingFieldField = value;
159      }
160    }
161  }
162
163  [System.Diagnostics.DebuggerStepThroughAttribute()]
164  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
165  [System.Runtime.Serialization.DataContractAttribute(Name = "ConnectionContainer", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Client.Core.ClientConso" +
166      "leService")]
167  public partial class ConnectionContainer : object, System.Runtime.Serialization.IExtensibleDataObject {
168
169    private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
170
171    private string IPAdressk__BackingFieldField;
172
173    private int Portk__BackingFieldField;
174
175    public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
176      get {
177        return this.extensionDataField;
178      }
179      set {
180        this.extensionDataField = value;
181      }
182    }
183
184    [System.Runtime.Serialization.DataMemberAttribute(Name = "<IPAdress>k__BackingField", IsRequired = true)]
185    public string IPAdressk__BackingField {
186      get {
187        return this.IPAdressk__BackingFieldField;
188      }
189      set {
190        this.IPAdressk__BackingFieldField = value;
191      }
192    }
193
194    [System.Runtime.Serialization.DataMemberAttribute(Name = "<Port>k__BackingField", IsRequired = true)]
195    public int Portk__BackingField {
196      get {
197        return this.Portk__BackingFieldField;
198      }
199      set {
200        this.Portk__BackingFieldField = value;
201      }
202    }
203  }
204}
205namespace HeuristicLab.Hive.Client.Common {
206  using System.Runtime.Serialization;
207
208
209  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
210  [System.Runtime.Serialization.DataContractAttribute(Name = "NetworkEnum.WcfConnState", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Client.Common")]
211  public enum NetworkEnumWcfConnState : int {
212
213    [System.Runtime.Serialization.EnumMemberAttribute()]
214    Connected = 0,
215
216    [System.Runtime.Serialization.EnumMemberAttribute()]
217    Disconnected = 1,
218
219    [System.Runtime.Serialization.EnumMemberAttribute()]
220    Failed = 2,
221  }
222}
223
224
225[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
226[System.ServiceModel.ServiceContractAttribute(ConfigurationName = "IClientConsoleCommunicator")]
227public interface IClientConsoleCommunicator {
228
229  [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IClientConsoleCommunicator/GetStatusInfos", ReplyAction = "http://tempuri.org/IClientConsoleCommunicator/GetStatusInfosResponse")]
230  HeuristicLab.Hive.Client.Core.ClientConsoleService.StatusCommons GetStatusInfos();
231
232  [System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://tempuri.org/IClientConsoleCommunicator/GetStatusInfos", ReplyAction = "http://tempuri.org/IClientConsoleCommunicator/GetStatusInfosResponse")]
233  System.IAsyncResult BeginGetStatusInfos(System.AsyncCallback callback, object asyncState);
234
235  HeuristicLab.Hive.Client.Core.ClientConsoleService.StatusCommons EndGetStatusInfos(System.IAsyncResult result);
236
237  [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IClientConsoleCommunicator/GetConnection", ReplyAction = "http://tempuri.org/IClientConsoleCommunicator/GetConnectionResponse")]
238  HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer GetConnection();
239
240  [System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://tempuri.org/IClientConsoleCommunicator/GetConnection", ReplyAction = "http://tempuri.org/IClientConsoleCommunicator/GetConnectionResponse")]
241  System.IAsyncResult BeginGetConnection(System.AsyncCallback callback, object asyncState);
242
243  HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer EndGetConnection(System.IAsyncResult result);
244
245  [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IClientConsoleCommunicator/SetConnection", ReplyAction = "http://tempuri.org/IClientConsoleCommunicator/SetConnectionResponse")]
246  void SetConnection(HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer container);
247
248  [System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://tempuri.org/IClientConsoleCommunicator/SetConnection", ReplyAction = "http://tempuri.org/IClientConsoleCommunicator/SetConnectionResponse")]
249  System.IAsyncResult BeginSetConnection(HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer container, System.AsyncCallback callback, object asyncState);
250
251  void EndSetConnection(System.IAsyncResult result);
252
253  [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IClientConsoleCommunicator/Disconnect", ReplyAction = "http://tempuri.org/IClientConsoleCommunicator/DisconnectResponse")]
254  void Disconnect();
255
256  [System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://tempuri.org/IClientConsoleCommunicator/Disconnect", ReplyAction = "http://tempuri.org/IClientConsoleCommunicator/DisconnectResponse")]
257  System.IAsyncResult BeginDisconnect(System.AsyncCallback callback, object asyncState);
258
259  void EndDisconnect(System.IAsyncResult result);
260}
261
262[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
263public interface IClientConsoleCommunicatorChannel : IClientConsoleCommunicator, System.ServiceModel.IClientChannel {
264}
265
266[System.Diagnostics.DebuggerStepThroughAttribute()]
267[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
268public partial class GetStatusInfosCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
269
270  private object[] results;
271
272  public GetStatusInfosCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
273    base(exception, cancelled, userState) {
274    this.results = results;
275  }
276
277  public HeuristicLab.Hive.Client.Core.ClientConsoleService.StatusCommons Result {
278    get {
279      base.RaiseExceptionIfNecessary();
280      return ((HeuristicLab.Hive.Client.Core.ClientConsoleService.StatusCommons)(this.results[0]));
281    }
282  }
283}
284
285[System.Diagnostics.DebuggerStepThroughAttribute()]
286[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
287public partial class GetConnectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
288
289  private object[] results;
290
291  public GetConnectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
292    base(exception, cancelled, userState) {
293    this.results = results;
294  }
295
296  public HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer Result {
297    get {
298      base.RaiseExceptionIfNecessary();
299      return ((HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer)(this.results[0]));
300    }
301  }
302}
303
304[System.Diagnostics.DebuggerStepThroughAttribute()]
305[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
306public partial class ClientConsoleCommunicatorClient : System.ServiceModel.ClientBase<IClientConsoleCommunicator>, IClientConsoleCommunicator {
307
308  private BeginOperationDelegate onBeginGetStatusInfosDelegate;
309
310  private EndOperationDelegate onEndGetStatusInfosDelegate;
311
312  private System.Threading.SendOrPostCallback onGetStatusInfosCompletedDelegate;
313
314  private BeginOperationDelegate onBeginGetConnectionDelegate;
315
316  private EndOperationDelegate onEndGetConnectionDelegate;
317
318  private System.Threading.SendOrPostCallback onGetConnectionCompletedDelegate;
319
320  private BeginOperationDelegate onBeginSetConnectionDelegate;
321
322  private EndOperationDelegate onEndSetConnectionDelegate;
323
324  private System.Threading.SendOrPostCallback onSetConnectionCompletedDelegate;
325
326  private BeginOperationDelegate onBeginDisconnectDelegate;
327
328  private EndOperationDelegate onEndDisconnectDelegate;
329
330  private System.Threading.SendOrPostCallback onDisconnectCompletedDelegate;
331
332  public ClientConsoleCommunicatorClient() {
333  }
334
335  public ClientConsoleCommunicatorClient(string endpointConfigurationName) :
336    base(endpointConfigurationName) {
337  }
338
339  public ClientConsoleCommunicatorClient(string endpointConfigurationName, string remoteAddress) :
340    base(endpointConfigurationName, remoteAddress) {
341  }
342
343  public ClientConsoleCommunicatorClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
344    base(endpointConfigurationName, remoteAddress) {
345  }
346
347  public ClientConsoleCommunicatorClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
348    base(binding, remoteAddress) {
349  }
350
351  public event System.EventHandler<GetStatusInfosCompletedEventArgs> GetStatusInfosCompleted;
352
353  public event System.EventHandler<GetConnectionCompletedEventArgs> GetConnectionCompleted;
354
355  public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> SetConnectionCompleted;
356
357  public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> DisconnectCompleted;
358
359  public HeuristicLab.Hive.Client.Core.ClientConsoleService.StatusCommons GetStatusInfos() {
360    return base.Channel.GetStatusInfos();
361  }
362
363  [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
364  public System.IAsyncResult BeginGetStatusInfos(System.AsyncCallback callback, object asyncState) {
365    return base.Channel.BeginGetStatusInfos(callback, asyncState);
366  }
367
368  [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
369  public HeuristicLab.Hive.Client.Core.ClientConsoleService.StatusCommons EndGetStatusInfos(System.IAsyncResult result) {
370    return base.Channel.EndGetStatusInfos(result);
371  }
372
373  private System.IAsyncResult OnBeginGetStatusInfos(object[] inValues, System.AsyncCallback callback, object asyncState) {
374    return this.BeginGetStatusInfos(callback, asyncState);
375  }
376
377  private object[] OnEndGetStatusInfos(System.IAsyncResult result) {
378    HeuristicLab.Hive.Client.Core.ClientConsoleService.StatusCommons retVal = this.EndGetStatusInfos(result);
379    return new object[] {
380                retVal};
381  }
382
383  private void OnGetStatusInfosCompleted(object state) {
384    if ((this.GetStatusInfosCompleted != null)) {
385      InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
386      this.GetStatusInfosCompleted(this, new GetStatusInfosCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
387    }
388  }
389
390  public void GetStatusInfosAsync() {
391    this.GetStatusInfosAsync(null);
392  }
393
394  public void GetStatusInfosAsync(object userState) {
395    if ((this.onBeginGetStatusInfosDelegate == null)) {
396      this.onBeginGetStatusInfosDelegate = new BeginOperationDelegate(this.OnBeginGetStatusInfos);
397    }
398    if ((this.onEndGetStatusInfosDelegate == null)) {
399      this.onEndGetStatusInfosDelegate = new EndOperationDelegate(this.OnEndGetStatusInfos);
400    }
401    if ((this.onGetStatusInfosCompletedDelegate == null)) {
402      this.onGetStatusInfosCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetStatusInfosCompleted);
403    }
404    base.InvokeAsync(this.onBeginGetStatusInfosDelegate, null, this.onEndGetStatusInfosDelegate, this.onGetStatusInfosCompletedDelegate, userState);
405  }
406
407  public HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer GetConnection() {
408    return base.Channel.GetConnection();
409  }
410
411  [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
412  public System.IAsyncResult BeginGetConnection(System.AsyncCallback callback, object asyncState) {
413    return base.Channel.BeginGetConnection(callback, asyncState);
414  }
415
416  [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
417  public HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer EndGetConnection(System.IAsyncResult result) {
418    return base.Channel.EndGetConnection(result);
419  }
420
421  private System.IAsyncResult OnBeginGetConnection(object[] inValues, System.AsyncCallback callback, object asyncState) {
422    return this.BeginGetConnection(callback, asyncState);
423  }
424
425  private object[] OnEndGetConnection(System.IAsyncResult result) {
426    HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer retVal = this.EndGetConnection(result);
427    return new object[] {
428                retVal};
429  }
430
431  private void OnGetConnectionCompleted(object state) {
432    if ((this.GetConnectionCompleted != null)) {
433      InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
434      this.GetConnectionCompleted(this, new GetConnectionCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
435    }
436  }
437
438  public void GetConnectionAsync() {
439    this.GetConnectionAsync(null);
440  }
441
442  public void GetConnectionAsync(object userState) {
443    if ((this.onBeginGetConnectionDelegate == null)) {
444      this.onBeginGetConnectionDelegate = new BeginOperationDelegate(this.OnBeginGetConnection);
445    }
446    if ((this.onEndGetConnectionDelegate == null)) {
447      this.onEndGetConnectionDelegate = new EndOperationDelegate(this.OnEndGetConnection);
448    }
449    if ((this.onGetConnectionCompletedDelegate == null)) {
450      this.onGetConnectionCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetConnectionCompleted);
451    }
452    base.InvokeAsync(this.onBeginGetConnectionDelegate, null, this.onEndGetConnectionDelegate, this.onGetConnectionCompletedDelegate, userState);
453  }
454
455  public void SetConnection(HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer container) {
456    base.Channel.SetConnection(container);
457  }
458
459  [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
460  public System.IAsyncResult BeginSetConnection(HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer container, System.AsyncCallback callback, object asyncState) {
461    return base.Channel.BeginSetConnection(container, callback, asyncState);
462  }
463
464  [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
465  public void EndSetConnection(System.IAsyncResult result) {
466    base.Channel.EndSetConnection(result);
467  }
468
469  private System.IAsyncResult OnBeginSetConnection(object[] inValues, System.AsyncCallback callback, object asyncState) {
470    HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer container = ((HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer)(inValues[0]));
471    return this.BeginSetConnection(container, callback, asyncState);
472  }
473
474  private object[] OnEndSetConnection(System.IAsyncResult result) {
475    this.EndSetConnection(result);
476    return null;
477  }
478
479  private void OnSetConnectionCompleted(object state) {
480    if ((this.SetConnectionCompleted != null)) {
481      InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
482      this.SetConnectionCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
483    }
484  }
485
486  public void SetConnectionAsync(HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer container) {
487    this.SetConnectionAsync(container, null);
488  }
489
490  public void SetConnectionAsync(HeuristicLab.Hive.Client.Core.ClientConsoleService.ConnectionContainer container, object userState) {
491    if ((this.onBeginSetConnectionDelegate == null)) {
492      this.onBeginSetConnectionDelegate = new BeginOperationDelegate(this.OnBeginSetConnection);
493    }
494    if ((this.onEndSetConnectionDelegate == null)) {
495      this.onEndSetConnectionDelegate = new EndOperationDelegate(this.OnEndSetConnection);
496    }
497    if ((this.onSetConnectionCompletedDelegate == null)) {
498      this.onSetConnectionCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnSetConnectionCompleted);
499    }
500    base.InvokeAsync(this.onBeginSetConnectionDelegate, new object[] {
501                    container}, this.onEndSetConnectionDelegate, this.onSetConnectionCompletedDelegate, userState);
502  }
503
504  public void Disconnect() {
505    base.Channel.Disconnect();
506  }
507
508  [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
509  public System.IAsyncResult BeginDisconnect(System.AsyncCallback callback, object asyncState) {
510    return base.Channel.BeginDisconnect(callback, asyncState);
511  }
512
513  [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
514  public void EndDisconnect(System.IAsyncResult result) {
515    base.Channel.EndDisconnect(result);
516  }
517
518  private System.IAsyncResult OnBeginDisconnect(object[] inValues, System.AsyncCallback callback, object asyncState) {
519    return this.BeginDisconnect(callback, asyncState);
520  }
521
522  private object[] OnEndDisconnect(System.IAsyncResult result) {
523    this.EndDisconnect(result);
524    return null;
525  }
526
527  private void OnDisconnectCompleted(object state) {
528    if ((this.DisconnectCompleted != null)) {
529      InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
530      this.DisconnectCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
531    }
532  }
533
534  public void DisconnectAsync() {
535    this.DisconnectAsync(null);
536  }
537
538  public void DisconnectAsync(object userState) {
539    if ((this.onBeginDisconnectDelegate == null)) {
540      this.onBeginDisconnectDelegate = new BeginOperationDelegate(this.OnBeginDisconnect);
541    }
542    if ((this.onEndDisconnectDelegate == null)) {
543      this.onEndDisconnectDelegate = new EndOperationDelegate(this.OnEndDisconnect);
544    }
545    if ((this.onDisconnectCompletedDelegate == null)) {
546      this.onDisconnectCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnDisconnectCompleted);
547    }
548    base.InvokeAsync(this.onBeginDisconnectDelegate, null, this.onEndDisconnectDelegate, this.onDisconnectCompletedDelegate, userState);
549  }
550
551}
Note: See TracBrowser for help on using the repository browser.