PageRenderTime 84ms CodeModel.GetById 40ms RepoModel.GetById 0ms app.codeStats 0ms

/Experiments.WebAppThreading/ClientWeb/Service References/ServiceReference1/Reference.cs

https://github.com/gpeipman/Visual-Studio-Experiments
C# | 223 lines | 165 code | 48 blank | 10 comment | 8 complexity | 4d9019ac6d596aa84bca3444c25aae1a MD5 | raw file
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. // Runtime Version:4.0.30319.1
  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. namespace ClientWeb.ServiceReference1 {
  11. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  12. [System.ServiceModel.ServiceContractAttribute(ConfigurationName="ServiceReference1.DelayedHelloSoap")]
  13. public interface DelayedHelloSoap {
  14. // CODEGEN: Generating message contract since element name HelloWorldResult from namespace http://tempuri.org/ is not marked nillable
  15. [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/HelloWorld", ReplyAction="*")]
  16. ClientWeb.ServiceReference1.HelloWorldResponse HelloWorld(ClientWeb.ServiceReference1.HelloWorldRequest request);
  17. [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/HelloWorld", ReplyAction="*")]
  18. System.IAsyncResult BeginHelloWorld(ClientWeb.ServiceReference1.HelloWorldRequest request, System.AsyncCallback callback, object asyncState);
  19. ClientWeb.ServiceReference1.HelloWorldResponse EndHelloWorld(System.IAsyncResult result);
  20. }
  21. [System.Diagnostics.DebuggerStepThroughAttribute()]
  22. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  23. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  24. [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
  25. public partial class HelloWorldRequest {
  26. [System.ServiceModel.MessageBodyMemberAttribute(Name="HelloWorld", Namespace="http://tempuri.org/", Order=0)]
  27. public ClientWeb.ServiceReference1.HelloWorldRequestBody Body;
  28. public HelloWorldRequest() {
  29. }
  30. public HelloWorldRequest(ClientWeb.ServiceReference1.HelloWorldRequestBody Body) {
  31. this.Body = Body;
  32. }
  33. }
  34. [System.Diagnostics.DebuggerStepThroughAttribute()]
  35. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  36. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  37. [System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
  38. public partial class HelloWorldRequestBody {
  39. [System.Runtime.Serialization.DataMemberAttribute(Order=0)]
  40. public int delay;
  41. public HelloWorldRequestBody() {
  42. }
  43. public HelloWorldRequestBody(int delay) {
  44. this.delay = delay;
  45. }
  46. }
  47. [System.Diagnostics.DebuggerStepThroughAttribute()]
  48. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  49. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  50. [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
  51. public partial class HelloWorldResponse {
  52. [System.ServiceModel.MessageBodyMemberAttribute(Name="HelloWorldResponse", Namespace="http://tempuri.org/", Order=0)]
  53. public ClientWeb.ServiceReference1.HelloWorldResponseBody Body;
  54. public HelloWorldResponse() {
  55. }
  56. public HelloWorldResponse(ClientWeb.ServiceReference1.HelloWorldResponseBody Body) {
  57. this.Body = Body;
  58. }
  59. }
  60. [System.Diagnostics.DebuggerStepThroughAttribute()]
  61. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  62. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  63. [System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
  64. public partial class HelloWorldResponseBody {
  65. [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
  66. public string HelloWorldResult;
  67. public HelloWorldResponseBody() {
  68. }
  69. public HelloWorldResponseBody(string HelloWorldResult) {
  70. this.HelloWorldResult = HelloWorldResult;
  71. }
  72. }
  73. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  74. public interface DelayedHelloSoapChannel : ClientWeb.ServiceReference1.DelayedHelloSoap, System.ServiceModel.IClientChannel {
  75. }
  76. [System.Diagnostics.DebuggerStepThroughAttribute()]
  77. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  78. public partial class HelloWorldCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
  79. private object[] results;
  80. public HelloWorldCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
  81. base(exception, cancelled, userState) {
  82. this.results = results;
  83. }
  84. public string Result {
  85. get {
  86. base.RaiseExceptionIfNecessary();
  87. return ((string)(this.results[0]));
  88. }
  89. }
  90. }
  91. [System.Diagnostics.DebuggerStepThroughAttribute()]
  92. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  93. public partial class DelayedHelloSoapClient : System.ServiceModel.ClientBase<ClientWeb.ServiceReference1.DelayedHelloSoap>, ClientWeb.ServiceReference1.DelayedHelloSoap {
  94. private BeginOperationDelegate onBeginHelloWorldDelegate;
  95. private EndOperationDelegate onEndHelloWorldDelegate;
  96. private System.Threading.SendOrPostCallback onHelloWorldCompletedDelegate;
  97. public DelayedHelloSoapClient() {
  98. }
  99. public DelayedHelloSoapClient(string endpointConfigurationName) :
  100. base(endpointConfigurationName) {
  101. }
  102. public DelayedHelloSoapClient(string endpointConfigurationName, string remoteAddress) :
  103. base(endpointConfigurationName, remoteAddress) {
  104. }
  105. public DelayedHelloSoapClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
  106. base(endpointConfigurationName, remoteAddress) {
  107. }
  108. public DelayedHelloSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
  109. base(binding, remoteAddress) {
  110. }
  111. public event System.EventHandler<HelloWorldCompletedEventArgs> HelloWorldCompleted;
  112. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  113. ClientWeb.ServiceReference1.HelloWorldResponse ClientWeb.ServiceReference1.DelayedHelloSoap.HelloWorld(ClientWeb.ServiceReference1.HelloWorldRequest request) {
  114. return base.Channel.HelloWorld(request);
  115. }
  116. public string HelloWorld(int delay) {
  117. ClientWeb.ServiceReference1.HelloWorldRequest inValue = new ClientWeb.ServiceReference1.HelloWorldRequest();
  118. inValue.Body = new ClientWeb.ServiceReference1.HelloWorldRequestBody();
  119. inValue.Body.delay = delay;
  120. ClientWeb.ServiceReference1.HelloWorldResponse retVal = ((ClientWeb.ServiceReference1.DelayedHelloSoap)(this)).HelloWorld(inValue);
  121. return retVal.Body.HelloWorldResult;
  122. }
  123. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  124. System.IAsyncResult ClientWeb.ServiceReference1.DelayedHelloSoap.BeginHelloWorld(ClientWeb.ServiceReference1.HelloWorldRequest request, System.AsyncCallback callback, object asyncState) {
  125. return base.Channel.BeginHelloWorld(request, callback, asyncState);
  126. }
  127. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  128. public System.IAsyncResult BeginHelloWorld(int delay, System.AsyncCallback callback, object asyncState) {
  129. ClientWeb.ServiceReference1.HelloWorldRequest inValue = new ClientWeb.ServiceReference1.HelloWorldRequest();
  130. inValue.Body = new ClientWeb.ServiceReference1.HelloWorldRequestBody();
  131. inValue.Body.delay = delay;
  132. return ((ClientWeb.ServiceReference1.DelayedHelloSoap)(this)).BeginHelloWorld(inValue, callback, asyncState);
  133. }
  134. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  135. ClientWeb.ServiceReference1.HelloWorldResponse ClientWeb.ServiceReference1.DelayedHelloSoap.EndHelloWorld(System.IAsyncResult result) {
  136. return base.Channel.EndHelloWorld(result);
  137. }
  138. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  139. public string EndHelloWorld(System.IAsyncResult result) {
  140. ClientWeb.ServiceReference1.HelloWorldResponse retVal = ((ClientWeb.ServiceReference1.DelayedHelloSoap)(this)).EndHelloWorld(result);
  141. return retVal.Body.HelloWorldResult;
  142. }
  143. private System.IAsyncResult OnBeginHelloWorld(object[] inValues, System.AsyncCallback callback, object asyncState) {
  144. int delay = ((int)(inValues[0]));
  145. return this.BeginHelloWorld(delay, callback, asyncState);
  146. }
  147. private object[] OnEndHelloWorld(System.IAsyncResult result) {
  148. string retVal = this.EndHelloWorld(result);
  149. return new object[] {
  150. retVal};
  151. }
  152. private void OnHelloWorldCompleted(object state) {
  153. if ((this.HelloWorldCompleted != null)) {
  154. InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
  155. this.HelloWorldCompleted(this, new HelloWorldCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
  156. }
  157. }
  158. public void HelloWorldAsync(int delay) {
  159. this.HelloWorldAsync(delay, null);
  160. }
  161. public void HelloWorldAsync(int delay, object userState) {
  162. if ((this.onBeginHelloWorldDelegate == null)) {
  163. this.onBeginHelloWorldDelegate = new BeginOperationDelegate(this.OnBeginHelloWorld);
  164. }
  165. if ((this.onEndHelloWorldDelegate == null)) {
  166. this.onEndHelloWorldDelegate = new EndOperationDelegate(this.OnEndHelloWorld);
  167. }
  168. if ((this.onHelloWorldCompletedDelegate == null)) {
  169. this.onHelloWorldCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnHelloWorldCompleted);
  170. }
  171. base.InvokeAsync(this.onBeginHelloWorldDelegate, new object[] {
  172. delay}, this.onEndHelloWorldDelegate, this.onHelloWorldCompletedDelegate, userState);
  173. }
  174. }
  175. }