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