59
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
1 //------------------------------------------------------------------------------
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
2 // <auto-generated>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
3 // This code was generated by a tool.
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
4 // Runtime Version:4.0.30319.17379
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
5 //
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
6 // Changes to this file may cause incorrect behavior and will be lost if
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
7 // the code is regenerated.
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
8 // </auto-generated>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
9 //------------------------------------------------------------------------------
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
10
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
11 //
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
12 // This code was auto-generated by SlSvcUtil, version 5.0.61118.0
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
13 //
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
14
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
15
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
16 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
17 [System.ServiceModel.ServiceContractAttribute(Namespace="", ConfigurationName="SecureService")]
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
18 public interface SecureService
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
19 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
20
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
21 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:SecureService/DoWork", ReplyAction="urn:SecureService/DoWorkResponse")]
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
22 System.IAsyncResult BeginDoWork(System.AsyncCallback callback, object asyncState);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
23
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
24 void EndDoWork(System.IAsyncResult result);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
25 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
26
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
27 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
28 public interface SecureServiceChannel : SecureService, System.ServiceModel.IClientChannel
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
29 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
30 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
31
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
32 [System.Diagnostics.DebuggerStepThroughAttribute()]
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
33 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
34 public partial class SecureServiceClient : System.ServiceModel.ClientBase<SecureService>, SecureService
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
35 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
36
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
37 private BeginOperationDelegate onBeginDoWorkDelegate;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
38
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
39 private EndOperationDelegate onEndDoWorkDelegate;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
40
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
41 private System.Threading.SendOrPostCallback onDoWorkCompletedDelegate;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
42
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
43 private BeginOperationDelegate onBeginOpenDelegate;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
44
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
45 private EndOperationDelegate onEndOpenDelegate;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
46
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
47 private System.Threading.SendOrPostCallback onOpenCompletedDelegate;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
48
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
49 private BeginOperationDelegate onBeginCloseDelegate;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
50
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
51 private EndOperationDelegate onEndCloseDelegate;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
52
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
53 private System.Threading.SendOrPostCallback onCloseCompletedDelegate;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
54
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
55 public SecureServiceClient()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
56 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
57 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
58
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
59 public SecureServiceClient(string endpointConfigurationName) :
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
60 base(endpointConfigurationName)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
61 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
62 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
63
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
64 public SecureServiceClient(string endpointConfigurationName, string remoteAddress) :
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
65 base(endpointConfigurationName, remoteAddress)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
66 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
67 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
68
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
69 public SecureServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
70 base(endpointConfigurationName, remoteAddress)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
71 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
72 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
73
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
74 public SecureServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
75 base(binding, remoteAddress)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
76 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
77 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
78
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
79 public System.Net.CookieContainer CookieContainer
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
80 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
81 get
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
82 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
83 System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
84 if ((httpCookieContainerManager != null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
85 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
86 return httpCookieContainerManager.CookieContainer;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
87 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
88 else
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
89 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
90 return null;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
91 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
92 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
93 set
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
94 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
95 System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
96 if ((httpCookieContainerManager != null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
97 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
98 httpCookieContainerManager.CookieContainer = value;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
99 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
100 else
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
101 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
102 throw new System.InvalidOperationException("Unable to set the CookieContainer. Please make sure the binding contains an HttpC" +
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
103 "ookieContainerBindingElement.");
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
104 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
105 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
106 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
107
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
108 public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> DoWorkCompleted;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
109
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
110 public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> OpenCompleted;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
111
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
112 public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> CloseCompleted;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
113
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
114 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
115 System.IAsyncResult SecureService.BeginDoWork(System.AsyncCallback callback, object asyncState)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
116 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
117 return base.Channel.BeginDoWork(callback, asyncState);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
118 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
119
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
120 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
121 void SecureService.EndDoWork(System.IAsyncResult result)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
122 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
123 base.Channel.EndDoWork(result);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
124 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
125
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
126 private System.IAsyncResult OnBeginDoWork(object[] inValues, System.AsyncCallback callback, object asyncState)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
127 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
128 return ((SecureService)(this)).BeginDoWork(callback, asyncState);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
129 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
130
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
131 private object[] OnEndDoWork(System.IAsyncResult result)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
132 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
133 ((SecureService)(this)).EndDoWork(result);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
134 return null;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
135 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
136
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
137 private void OnDoWorkCompleted(object state)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
138 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
139 if ((this.DoWorkCompleted != null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
140 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
141 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
142 this.DoWorkCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
143 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
144 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
145
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
146 public void DoWorkAsync()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
147 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
148 this.DoWorkAsync(null);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
149 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
150
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
151 public void DoWorkAsync(object userState)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
152 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
153 if ((this.onBeginDoWorkDelegate == null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
154 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
155 this.onBeginDoWorkDelegate = new BeginOperationDelegate(this.OnBeginDoWork);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
156 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
157 if ((this.onEndDoWorkDelegate == null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
158 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
159 this.onEndDoWorkDelegate = new EndOperationDelegate(this.OnEndDoWork);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
160 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
161 if ((this.onDoWorkCompletedDelegate == null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
162 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
163 this.onDoWorkCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnDoWorkCompleted);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
164 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
165 base.InvokeAsync(this.onBeginDoWorkDelegate, null, this.onEndDoWorkDelegate, this.onDoWorkCompletedDelegate, userState);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
166 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
167
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
168 private System.IAsyncResult OnBeginOpen(object[] inValues, System.AsyncCallback callback, object asyncState)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
169 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
170 return ((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(callback, asyncState);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
171 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
172
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
173 private object[] OnEndOpen(System.IAsyncResult result)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
174 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
175 ((System.ServiceModel.ICommunicationObject)(this)).EndOpen(result);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
176 return null;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
177 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
178
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
179 private void OnOpenCompleted(object state)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
180 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
181 if ((this.OpenCompleted != null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
182 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
183 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
184 this.OpenCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
185 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
186 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
187
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
188 public void OpenAsync()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
189 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
190 this.OpenAsync(null);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
191 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
192
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
193 public void OpenAsync(object userState)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
194 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
195 if ((this.onBeginOpenDelegate == null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
196 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
197 this.onBeginOpenDelegate = new BeginOperationDelegate(this.OnBeginOpen);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
198 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
199 if ((this.onEndOpenDelegate == null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
200 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
201 this.onEndOpenDelegate = new EndOperationDelegate(this.OnEndOpen);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
202 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
203 if ((this.onOpenCompletedDelegate == null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
204 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
205 this.onOpenCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnOpenCompleted);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
206 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
207 base.InvokeAsync(this.onBeginOpenDelegate, null, this.onEndOpenDelegate, this.onOpenCompletedDelegate, userState);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
208 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
209
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
210 private System.IAsyncResult OnBeginClose(object[] inValues, System.AsyncCallback callback, object asyncState)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
211 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
212 return ((System.ServiceModel.ICommunicationObject)(this)).BeginClose(callback, asyncState);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
213 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
214
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
215 private object[] OnEndClose(System.IAsyncResult result)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
216 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
217 ((System.ServiceModel.ICommunicationObject)(this)).EndClose(result);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
218 return null;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
219 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
220
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
221 private void OnCloseCompleted(object state)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
222 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
223 if ((this.CloseCompleted != null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
224 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
225 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
226 this.CloseCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
227 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
228 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
229
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
230 public void CloseAsync()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
231 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
232 this.CloseAsync(null);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
233 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
234
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
235 public void CloseAsync(object userState)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
236 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
237 if ((this.onBeginCloseDelegate == null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
238 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
239 this.onBeginCloseDelegate = new BeginOperationDelegate(this.OnBeginClose);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
240 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
241 if ((this.onEndCloseDelegate == null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
242 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
243 this.onEndCloseDelegate = new EndOperationDelegate(this.OnEndClose);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
244 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
245 if ((this.onCloseCompletedDelegate == null))
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
246 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
247 this.onCloseCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnCloseCompleted);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
248 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
249 base.InvokeAsync(this.onBeginCloseDelegate, null, this.onEndCloseDelegate, this.onCloseCompletedDelegate, userState);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
250 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
251
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
252 protected override SecureService CreateChannel()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
253 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
254 return new SecureServiceClientChannel(this);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
255 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
256
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
257 private class SecureServiceClientChannel : ChannelBase<SecureService>, SecureService
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
258 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
259
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
260 public SecureServiceClientChannel(System.ServiceModel.ClientBase<SecureService> client) :
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
261 base(client)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
262 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
263 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
264
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
265 public System.IAsyncResult BeginDoWork(System.AsyncCallback callback, object asyncState)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
266 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
267 object[] _args = new object[0];
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
268 System.IAsyncResult _result = base.BeginInvoke("DoWork", _args, callback, asyncState);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
269 return _result;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
270 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
271
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
272 public void EndDoWork(System.IAsyncResult result)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
273 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
274 object[] _args = new object[0];
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
275 base.EndInvoke("DoWork", _args, result);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
276 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
277 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
278 }
|