/NetDisk/WebApp/Web References/SSOService/Reference.cs

http://mobileshop.codeplex.com · C# · 270 lines · 190 code · 44 blank · 36 comment · 28 complexity · 7708538e2e2cea1ad8df0b46d3cedec3 MD5 · raw file

  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. // Runtime Version:4.0.30319.239
  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. // This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.239.
  12. //
  13. #pragma warning disable 1591
  14. namespace WebApp.SSOService {
  15. using System;
  16. using System.Web.Services;
  17. using System.Diagnostics;
  18. using System.Web.Services.Protocols;
  19. using System.ComponentModel;
  20. using System.Xml.Serialization;
  21. /// <remarks/>
  22. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
  23. [System.Diagnostics.DebuggerStepThroughAttribute()]
  24. [System.ComponentModel.DesignerCategoryAttribute("code")]
  25. [System.Web.Services.WebServiceBindingAttribute(Name="AuthSoap", Namespace="http://tempuri.org/")]
  26. public partial class Auth : System.Web.Services.Protocols.SoapHttpClientProtocol {
  27. private System.Threading.SendOrPostCallback GetLogonUrlOperationCompleted;
  28. private System.Threading.SendOrPostCallback GetLogoutUrlOperationCompleted;
  29. private System.Threading.SendOrPostCallback GetCurrentUserOperationCompleted;
  30. private bool useDefaultCredentialsSetExplicitly;
  31. /// <remarks/>
  32. public Auth() {
  33. this.Url = global::WebApp.Properties.Settings.Default.WebApp_SSOService_Auth;
  34. if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
  35. this.UseDefaultCredentials = true;
  36. this.useDefaultCredentialsSetExplicitly = false;
  37. }
  38. else {
  39. this.useDefaultCredentialsSetExplicitly = true;
  40. }
  41. }
  42. public new string Url {
  43. get {
  44. return base.Url;
  45. }
  46. set {
  47. if ((((this.IsLocalFileSystemWebService(base.Url) == true)
  48. && (this.useDefaultCredentialsSetExplicitly == false))
  49. && (this.IsLocalFileSystemWebService(value) == false))) {
  50. base.UseDefaultCredentials = false;
  51. }
  52. base.Url = value;
  53. }
  54. }
  55. public new bool UseDefaultCredentials {
  56. get {
  57. return base.UseDefaultCredentials;
  58. }
  59. set {
  60. base.UseDefaultCredentials = value;
  61. this.useDefaultCredentialsSetExplicitly = true;
  62. }
  63. }
  64. /// <remarks/>
  65. public event GetLogonUrlCompletedEventHandler GetLogonUrlCompleted;
  66. /// <remarks/>
  67. public event GetLogoutUrlCompletedEventHandler GetLogoutUrlCompleted;
  68. /// <remarks/>
  69. public event GetCurrentUserCompletedEventHandler GetCurrentUserCompleted;
  70. /// <remarks/>
  71. [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetLogonUrl", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
  72. public string GetLogonUrl(string gotoUrl) {
  73. object[] results = this.Invoke("GetLogonUrl", new object[] {
  74. gotoUrl});
  75. return ((string)(results[0]));
  76. }
  77. /// <remarks/>
  78. public void GetLogonUrlAsync(string gotoUrl) {
  79. this.GetLogonUrlAsync(gotoUrl, null);
  80. }
  81. /// <remarks/>
  82. public void GetLogonUrlAsync(string gotoUrl, object userState) {
  83. if ((this.GetLogonUrlOperationCompleted == null)) {
  84. this.GetLogonUrlOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLogonUrlOperationCompleted);
  85. }
  86. this.InvokeAsync("GetLogonUrl", new object[] {
  87. gotoUrl}, this.GetLogonUrlOperationCompleted, userState);
  88. }
  89. private void OnGetLogonUrlOperationCompleted(object arg) {
  90. if ((this.GetLogonUrlCompleted != null)) {
  91. System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
  92. this.GetLogonUrlCompleted(this, new GetLogonUrlCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
  93. }
  94. }
  95. /// <remarks/>
  96. [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetLogoutUrl", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
  97. public string GetLogoutUrl(string gotoUrl) {
  98. object[] results = this.Invoke("GetLogoutUrl", new object[] {
  99. gotoUrl});
  100. return ((string)(results[0]));
  101. }
  102. /// <remarks/>
  103. public void GetLogoutUrlAsync(string gotoUrl) {
  104. this.GetLogoutUrlAsync(gotoUrl, null);
  105. }
  106. /// <remarks/>
  107. public void GetLogoutUrlAsync(string gotoUrl, object userState) {
  108. if ((this.GetLogoutUrlOperationCompleted == null)) {
  109. this.GetLogoutUrlOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLogoutUrlOperationCompleted);
  110. }
  111. this.InvokeAsync("GetLogoutUrl", new object[] {
  112. gotoUrl}, this.GetLogoutUrlOperationCompleted, userState);
  113. }
  114. private void OnGetLogoutUrlOperationCompleted(object arg) {
  115. if ((this.GetLogoutUrlCompleted != null)) {
  116. System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
  117. this.GetLogoutUrlCompleted(this, new GetLogoutUrlCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
  118. }
  119. }
  120. /// <remarks/>
  121. [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetCurrentUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
  122. public string GetCurrentUser(string cookieValue) {
  123. object[] results = this.Invoke("GetCurrentUser", new object[] {
  124. cookieValue});
  125. return ((string)(results[0]));
  126. }
  127. /// <remarks/>
  128. public void GetCurrentUserAsync(string cookieValue) {
  129. this.GetCurrentUserAsync(cookieValue, null);
  130. }
  131. /// <remarks/>
  132. public void GetCurrentUserAsync(string cookieValue, object userState) {
  133. if ((this.GetCurrentUserOperationCompleted == null)) {
  134. this.GetCurrentUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCurrentUserOperationCompleted);
  135. }
  136. this.InvokeAsync("GetCurrentUser", new object[] {
  137. cookieValue}, this.GetCurrentUserOperationCompleted, userState);
  138. }
  139. private void OnGetCurrentUserOperationCompleted(object arg) {
  140. if ((this.GetCurrentUserCompleted != null)) {
  141. System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
  142. this.GetCurrentUserCompleted(this, new GetCurrentUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
  143. }
  144. }
  145. /// <remarks/>
  146. public new void CancelAsync(object userState) {
  147. base.CancelAsync(userState);
  148. }
  149. private bool IsLocalFileSystemWebService(string url) {
  150. if (((url == null)
  151. || (url == string.Empty))) {
  152. return false;
  153. }
  154. System.Uri wsUri = new System.Uri(url);
  155. if (((wsUri.Port >= 1024)
  156. && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
  157. return true;
  158. }
  159. return false;
  160. }
  161. }
  162. /// <remarks/>
  163. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
  164. public delegate void GetLogonUrlCompletedEventHandler(object sender, GetLogonUrlCompletedEventArgs e);
  165. /// <remarks/>
  166. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
  167. [System.Diagnostics.DebuggerStepThroughAttribute()]
  168. [System.ComponentModel.DesignerCategoryAttribute("code")]
  169. public partial class GetLogonUrlCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
  170. private object[] results;
  171. internal GetLogonUrlCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
  172. base(exception, cancelled, userState) {
  173. this.results = results;
  174. }
  175. /// <remarks/>
  176. public string Result {
  177. get {
  178. this.RaiseExceptionIfNecessary();
  179. return ((string)(this.results[0]));
  180. }
  181. }
  182. }
  183. /// <remarks/>
  184. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
  185. public delegate void GetLogoutUrlCompletedEventHandler(object sender, GetLogoutUrlCompletedEventArgs e);
  186. /// <remarks/>
  187. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
  188. [System.Diagnostics.DebuggerStepThroughAttribute()]
  189. [System.ComponentModel.DesignerCategoryAttribute("code")]
  190. public partial class GetLogoutUrlCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
  191. private object[] results;
  192. internal GetLogoutUrlCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
  193. base(exception, cancelled, userState) {
  194. this.results = results;
  195. }
  196. /// <remarks/>
  197. public string Result {
  198. get {
  199. this.RaiseExceptionIfNecessary();
  200. return ((string)(this.results[0]));
  201. }
  202. }
  203. }
  204. /// <remarks/>
  205. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
  206. public delegate void GetCurrentUserCompletedEventHandler(object sender, GetCurrentUserCompletedEventArgs e);
  207. /// <remarks/>
  208. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
  209. [System.Diagnostics.DebuggerStepThroughAttribute()]
  210. [System.ComponentModel.DesignerCategoryAttribute("code")]
  211. public partial class GetCurrentUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
  212. private object[] results;
  213. internal GetCurrentUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
  214. base(exception, cancelled, userState) {
  215. this.results = results;
  216. }
  217. /// <remarks/>
  218. public string Result {
  219. get {
  220. this.RaiseExceptionIfNecessary();
  221. return ((string)(this.results[0]));
  222. }
  223. }
  224. }
  225. }
  226. #pragma warning restore 1591