annotate SilverlightExampleApp/SilverlightExampleApp.Interfaces/Services/AuthenticationService.cs @ 100:9b6855dc165e

Updated System.Windows into Libs
author stevenhollidge <stevenhollidge@hotmail.com>
date Sat, 05 May 2012 23:04:16 +0100
parents 3591c26bd63e
children
rev   line source
59
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
1 //------------------------------------------------------------------------------
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
2 // <auto-generated>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
3 // This code was generated by a tool.
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
4 // Runtime Version:4.0.30319.17379
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
5 //
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
6 // Changes to this file may cause incorrect behavior and will be lost if
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
7 // the code is regenerated.
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
8 // </auto-generated>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
9 //------------------------------------------------------------------------------
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
10
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
11 //
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
12 // This code was auto-generated by SlSvcUtil, version 5.0.61118.0
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
13 //
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
14
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
15
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
16 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
17 [System.ServiceModel.ServiceContractAttribute(Namespace="", ConfigurationName="AuthenticationService")]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
18 public interface AuthenticationService
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
19 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
20
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
21 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:AuthenticationService/Authenticate", ReplyAction="urn:AuthenticationService/AuthenticateResponse")]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
22 System.IAsyncResult BeginAuthenticate(string username, string password, System.AsyncCallback callback, object asyncState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
23
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
24 bool EndAuthenticate(System.IAsyncResult result);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
25
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
26 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:AuthenticationService/LogOut", ReplyAction="urn:AuthenticationService/LogOutResponse")]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
27 System.IAsyncResult BeginLogOut(System.AsyncCallback callback, object asyncState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
28
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
29 bool EndLogOut(System.IAsyncResult result);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
30 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
31
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
32 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
33 public interface AuthenticationServiceChannel : AuthenticationService, System.ServiceModel.IClientChannel
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
34 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
35 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
36
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
37 [System.Diagnostics.DebuggerStepThroughAttribute()]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
38 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
39 public partial class AuthenticateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
40 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
41
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
42 private object[] results;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
43
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
44 public AuthenticateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
45 base(exception, cancelled, userState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
46 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
47 this.results = results;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
48 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
49
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
50 public bool Result
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
51 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
52 get
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
53 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
54 base.RaiseExceptionIfNecessary();
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
55 return ((bool)(this.results[0]));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
56 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
57 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
58 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
59
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
60 [System.Diagnostics.DebuggerStepThroughAttribute()]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
61 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
62 public partial class LogOutCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
63 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
64
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
65 private object[] results;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
66
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
67 public LogOutCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
68 base(exception, cancelled, userState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
69 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
70 this.results = results;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
71 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
72
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
73 public bool Result
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
74 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
75 get
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
76 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
77 base.RaiseExceptionIfNecessary();
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
78 return ((bool)(this.results[0]));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
79 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
80 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
81 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
82
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
83 [System.Diagnostics.DebuggerStepThroughAttribute()]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
84 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
85 public partial class AuthenticationServiceClient : System.ServiceModel.ClientBase<AuthenticationService>, AuthenticationService
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
86 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
87
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
88 private BeginOperationDelegate onBeginAuthenticateDelegate;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
89
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
90 private EndOperationDelegate onEndAuthenticateDelegate;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
91
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
92 private System.Threading.SendOrPostCallback onAuthenticateCompletedDelegate;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
93
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
94 private BeginOperationDelegate onBeginLogOutDelegate;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
95
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
96 private EndOperationDelegate onEndLogOutDelegate;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
97
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
98 private System.Threading.SendOrPostCallback onLogOutCompletedDelegate;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
99
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
100 private BeginOperationDelegate onBeginOpenDelegate;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
101
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
102 private EndOperationDelegate onEndOpenDelegate;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
103
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
104 private System.Threading.SendOrPostCallback onOpenCompletedDelegate;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
105
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
106 private BeginOperationDelegate onBeginCloseDelegate;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
107
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
108 private EndOperationDelegate onEndCloseDelegate;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
109
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
110 private System.Threading.SendOrPostCallback onCloseCompletedDelegate;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
111
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
112 public AuthenticationServiceClient()
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
113 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
114 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
115
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
116 public AuthenticationServiceClient(string endpointConfigurationName) :
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
117 base(endpointConfigurationName)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
118 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
119 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
120
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
121 public AuthenticationServiceClient(string endpointConfigurationName, string remoteAddress) :
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
122 base(endpointConfigurationName, remoteAddress)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
123 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
124 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
125
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
126 public AuthenticationServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
127 base(endpointConfigurationName, remoteAddress)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
128 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
129 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
130
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
131 public AuthenticationServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
132 base(binding, remoteAddress)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
133 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
134 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
135
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
136 public System.Net.CookieContainer CookieContainer
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
137 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
138 get
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
139 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
140 System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
141 if ((httpCookieContainerManager != null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
142 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
143 return httpCookieContainerManager.CookieContainer;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
144 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
145 else
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
146 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
147 return null;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
148 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
149 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
150 set
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
151 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
152 System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
153 if ((httpCookieContainerManager != null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
154 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
155 httpCookieContainerManager.CookieContainer = value;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
156 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
157 else
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
158 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
159 throw new System.InvalidOperationException("Unable to set the CookieContainer. Please make sure the binding contains an HttpC" +
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
160 "ookieContainerBindingElement.");
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
161 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
162 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
163 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
164
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
165 public event System.EventHandler<AuthenticateCompletedEventArgs> AuthenticateCompleted;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
166
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
167 public event System.EventHandler<LogOutCompletedEventArgs> LogOutCompleted;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
168
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
169 public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> OpenCompleted;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
170
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
171 public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> CloseCompleted;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
172
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
173 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
174 System.IAsyncResult AuthenticationService.BeginAuthenticate(string username, string password, System.AsyncCallback callback, object asyncState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
175 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
176 return base.Channel.BeginAuthenticate(username, password, callback, asyncState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
177 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
178
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
179 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
180 bool AuthenticationService.EndAuthenticate(System.IAsyncResult result)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
181 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
182 return base.Channel.EndAuthenticate(result);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
183 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
184
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
185 private System.IAsyncResult OnBeginAuthenticate(object[] inValues, System.AsyncCallback callback, object asyncState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
186 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
187 string username = ((string)(inValues[0]));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
188 string password = ((string)(inValues[1]));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
189 return ((AuthenticationService)(this)).BeginAuthenticate(username, password, callback, asyncState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
190 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
191
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
192 private object[] OnEndAuthenticate(System.IAsyncResult result)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
193 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
194 bool retVal = ((AuthenticationService)(this)).EndAuthenticate(result);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
195 return new object[] {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
196 retVal};
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
197 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
198
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
199 private void OnAuthenticateCompleted(object state)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
200 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
201 if ((this.AuthenticateCompleted != null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
202 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
203 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
204 this.AuthenticateCompleted(this, new AuthenticateCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
205 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
206 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
207
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
208 public void AuthenticateAsync(string username, string password)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
209 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
210 this.AuthenticateAsync(username, password, null);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
211 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
212
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
213 public void AuthenticateAsync(string username, string password, object userState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
214 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
215 if ((this.onBeginAuthenticateDelegate == null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
216 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
217 this.onBeginAuthenticateDelegate = new BeginOperationDelegate(this.OnBeginAuthenticate);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
218 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
219 if ((this.onEndAuthenticateDelegate == null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
220 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
221 this.onEndAuthenticateDelegate = new EndOperationDelegate(this.OnEndAuthenticate);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
222 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
223 if ((this.onAuthenticateCompletedDelegate == null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
224 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
225 this.onAuthenticateCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnAuthenticateCompleted);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
226 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
227 base.InvokeAsync(this.onBeginAuthenticateDelegate, new object[] {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
228 username,
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
229 password}, this.onEndAuthenticateDelegate, this.onAuthenticateCompletedDelegate, userState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
230 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
231
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
232 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
233 System.IAsyncResult AuthenticationService.BeginLogOut(System.AsyncCallback callback, object asyncState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
234 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
235 return base.Channel.BeginLogOut(callback, asyncState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
236 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
237
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
238 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
239 bool AuthenticationService.EndLogOut(System.IAsyncResult result)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
240 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
241 return base.Channel.EndLogOut(result);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
242 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
243
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
244 private System.IAsyncResult OnBeginLogOut(object[] inValues, System.AsyncCallback callback, object asyncState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
245 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
246 return ((AuthenticationService)(this)).BeginLogOut(callback, asyncState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
247 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
248
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
249 private object[] OnEndLogOut(System.IAsyncResult result)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
250 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
251 bool retVal = ((AuthenticationService)(this)).EndLogOut(result);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
252 return new object[] {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
253 retVal};
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
254 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
255
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
256 private void OnLogOutCompleted(object state)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
257 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
258 if ((this.LogOutCompleted != null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
259 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
260 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
261 this.LogOutCompleted(this, new LogOutCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
262 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
263 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
264
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
265 public void LogOutAsync()
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
266 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
267 this.LogOutAsync(null);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
268 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
269
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
270 public void LogOutAsync(object userState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
271 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
272 if ((this.onBeginLogOutDelegate == null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
273 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
274 this.onBeginLogOutDelegate = new BeginOperationDelegate(this.OnBeginLogOut);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
275 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
276 if ((this.onEndLogOutDelegate == null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
277 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
278 this.onEndLogOutDelegate = new EndOperationDelegate(this.OnEndLogOut);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
279 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
280 if ((this.onLogOutCompletedDelegate == null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
281 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
282 this.onLogOutCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnLogOutCompleted);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
283 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
284 base.InvokeAsync(this.onBeginLogOutDelegate, null, this.onEndLogOutDelegate, this.onLogOutCompletedDelegate, userState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
285 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
286
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
287 private System.IAsyncResult OnBeginOpen(object[] inValues, System.AsyncCallback callback, object asyncState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
288 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
289 return ((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(callback, asyncState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
290 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
291
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
292 private object[] OnEndOpen(System.IAsyncResult result)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
293 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
294 ((System.ServiceModel.ICommunicationObject)(this)).EndOpen(result);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
295 return null;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
296 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
297
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
298 private void OnOpenCompleted(object state)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
299 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
300 if ((this.OpenCompleted != null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
301 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
302 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
303 this.OpenCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
304 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
305 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
306
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
307 public void OpenAsync()
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
308 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
309 this.OpenAsync(null);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
310 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
311
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
312 public void OpenAsync(object userState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
313 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
314 if ((this.onBeginOpenDelegate == null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
315 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
316 this.onBeginOpenDelegate = new BeginOperationDelegate(this.OnBeginOpen);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
317 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
318 if ((this.onEndOpenDelegate == null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
319 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
320 this.onEndOpenDelegate = new EndOperationDelegate(this.OnEndOpen);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
321 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
322 if ((this.onOpenCompletedDelegate == null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
323 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
324 this.onOpenCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnOpenCompleted);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
325 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
326 base.InvokeAsync(this.onBeginOpenDelegate, null, this.onEndOpenDelegate, this.onOpenCompletedDelegate, userState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
327 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
328
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
329 private System.IAsyncResult OnBeginClose(object[] inValues, System.AsyncCallback callback, object asyncState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
330 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
331 return ((System.ServiceModel.ICommunicationObject)(this)).BeginClose(callback, asyncState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
332 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
333
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
334 private object[] OnEndClose(System.IAsyncResult result)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
335 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
336 ((System.ServiceModel.ICommunicationObject)(this)).EndClose(result);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
337 return null;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
338 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
339
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
340 private void OnCloseCompleted(object state)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
341 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
342 if ((this.CloseCompleted != null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
343 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
344 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
345 this.CloseCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
346 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
347 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
348
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
349 public void CloseAsync()
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
350 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
351 this.CloseAsync(null);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
352 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
353
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
354 public void CloseAsync(object userState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
355 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
356 if ((this.onBeginCloseDelegate == null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
357 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
358 this.onBeginCloseDelegate = new BeginOperationDelegate(this.OnBeginClose);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
359 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
360 if ((this.onEndCloseDelegate == null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
361 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
362 this.onEndCloseDelegate = new EndOperationDelegate(this.OnEndClose);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
363 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
364 if ((this.onCloseCompletedDelegate == null))
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
365 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
366 this.onCloseCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnCloseCompleted);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
367 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
368 base.InvokeAsync(this.onBeginCloseDelegate, null, this.onEndCloseDelegate, this.onCloseCompletedDelegate, userState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
369 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
370
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
371 protected override AuthenticationService CreateChannel()
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
372 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
373 return new AuthenticationServiceClientChannel(this);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
374 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
375
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
376 private class AuthenticationServiceClientChannel : ChannelBase<AuthenticationService>, AuthenticationService
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
377 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
378
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
379 public AuthenticationServiceClientChannel(System.ServiceModel.ClientBase<AuthenticationService> client) :
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
380 base(client)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
381 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
382 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
383
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
384 public System.IAsyncResult BeginAuthenticate(string username, string password, System.AsyncCallback callback, object asyncState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
385 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
386 object[] _args = new object[2];
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
387 _args[0] = username;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
388 _args[1] = password;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
389 System.IAsyncResult _result = base.BeginInvoke("Authenticate", _args, callback, asyncState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
390 return _result;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
391 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
392
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
393 public bool EndAuthenticate(System.IAsyncResult result)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
394 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
395 object[] _args = new object[0];
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
396 bool _result = ((bool)(base.EndInvoke("Authenticate", _args, result)));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
397 return _result;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
398 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
399
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
400 public System.IAsyncResult BeginLogOut(System.AsyncCallback callback, object asyncState)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
401 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
402 object[] _args = new object[0];
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
403 System.IAsyncResult _result = base.BeginInvoke("LogOut", _args, callback, asyncState);
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
404 return _result;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
405 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
406
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
407 public bool EndLogOut(System.IAsyncResult result)
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
408 {
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
409 object[] _args = new object[0];
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
410 bool _result = ((bool)(base.EndInvoke("LogOut", _args, result)));
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
411 return _result;
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
412 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
413 }
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
414 }