/Chapter 5/Completed/MutualAuthenticationUsingCertificates/ProductsClient/Products.cs

https://bitbucket.org/dhirschl/wcf-4-step-by-step · C# · 303 lines · 247 code · 47 blank · 9 comment · 0 complexity · e5a9584d3c9baabd8985019b5a7b393b 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 ProductsClient.ProductsService
  11. {
  12. using System.Runtime.Serialization;
  13. [System.Diagnostics.DebuggerStepThroughAttribute()]
  14. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
  15. [System.Runtime.Serialization.DataContractAttribute(Name="ProductData", Namespace="http://schemas.datacontract.org/2004/07/Products")]
  16. public partial class ProductData : object, System.Runtime.Serialization.IExtensibleDataObject
  17. {
  18. private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
  19. private string ColorField;
  20. private decimal ListPriceField;
  21. private string NameField;
  22. private string ProductNumberField;
  23. public System.Runtime.Serialization.ExtensionDataObject ExtensionData
  24. {
  25. get
  26. {
  27. return this.extensionDataField;
  28. }
  29. set
  30. {
  31. this.extensionDataField = value;
  32. }
  33. }
  34. [System.Runtime.Serialization.DataMemberAttribute()]
  35. public string Color
  36. {
  37. get
  38. {
  39. return this.ColorField;
  40. }
  41. set
  42. {
  43. this.ColorField = value;
  44. }
  45. }
  46. [System.Runtime.Serialization.DataMemberAttribute()]
  47. public decimal ListPrice
  48. {
  49. get
  50. {
  51. return this.ListPriceField;
  52. }
  53. set
  54. {
  55. this.ListPriceField = value;
  56. }
  57. }
  58. [System.Runtime.Serialization.DataMemberAttribute()]
  59. public string Name
  60. {
  61. get
  62. {
  63. return this.NameField;
  64. }
  65. set
  66. {
  67. this.NameField = value;
  68. }
  69. }
  70. [System.Runtime.Serialization.DataMemberAttribute()]
  71. public string ProductNumber
  72. {
  73. get
  74. {
  75. return this.ProductNumberField;
  76. }
  77. set
  78. {
  79. this.ProductNumberField = value;
  80. }
  81. }
  82. }
  83. [System.Diagnostics.DebuggerStepThroughAttribute()]
  84. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
  85. [System.Runtime.Serialization.DataContractAttribute(Name="DatabaseFault", Namespace="http://schemas.datacontract.org/2004/07/Products")]
  86. public partial class DatabaseFault : object, System.Runtime.Serialization.IExtensibleDataObject
  87. {
  88. private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
  89. private string DbMessageField;
  90. private string DbOperationField;
  91. private string DbReasonField;
  92. public System.Runtime.Serialization.ExtensionDataObject ExtensionData
  93. {
  94. get
  95. {
  96. return this.extensionDataField;
  97. }
  98. set
  99. {
  100. this.extensionDataField = value;
  101. }
  102. }
  103. [System.Runtime.Serialization.DataMemberAttribute()]
  104. public string DbMessage
  105. {
  106. get
  107. {
  108. return this.DbMessageField;
  109. }
  110. set
  111. {
  112. this.DbMessageField = value;
  113. }
  114. }
  115. [System.Runtime.Serialization.DataMemberAttribute()]
  116. public string DbOperation
  117. {
  118. get
  119. {
  120. return this.DbOperationField;
  121. }
  122. set
  123. {
  124. this.DbOperationField = value;
  125. }
  126. }
  127. [System.Runtime.Serialization.DataMemberAttribute()]
  128. public string DbReason
  129. {
  130. get
  131. {
  132. return this.DbReasonField;
  133. }
  134. set
  135. {
  136. this.DbReasonField = value;
  137. }
  138. }
  139. }
  140. [System.Diagnostics.DebuggerStepThroughAttribute()]
  141. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
  142. [System.Runtime.Serialization.DataContractAttribute(Name="SystemFault", Namespace="http://schemas.datacontract.org/2004/07/Products")]
  143. public partial class SystemFault : object, System.Runtime.Serialization.IExtensibleDataObject
  144. {
  145. private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
  146. private string SystemMessageField;
  147. private string SystemOperationField;
  148. private string SystemReasonField;
  149. public System.Runtime.Serialization.ExtensionDataObject ExtensionData
  150. {
  151. get
  152. {
  153. return this.extensionDataField;
  154. }
  155. set
  156. {
  157. this.extensionDataField = value;
  158. }
  159. }
  160. [System.Runtime.Serialization.DataMemberAttribute()]
  161. public string SystemMessage
  162. {
  163. get
  164. {
  165. return this.SystemMessageField;
  166. }
  167. set
  168. {
  169. this.SystemMessageField = value;
  170. }
  171. }
  172. [System.Runtime.Serialization.DataMemberAttribute()]
  173. public string SystemOperation
  174. {
  175. get
  176. {
  177. return this.SystemOperationField;
  178. }
  179. set
  180. {
  181. this.SystemOperationField = value;
  182. }
  183. }
  184. [System.Runtime.Serialization.DataMemberAttribute()]
  185. public string SystemReason
  186. {
  187. get
  188. {
  189. return this.SystemReasonField;
  190. }
  191. set
  192. {
  193. this.SystemReasonField = value;
  194. }
  195. }
  196. }
  197. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  198. [System.ServiceModel.ServiceContractAttribute(ConfigurationName="ProductsClient.ProductsService.IProductsService")]
  199. public interface IProductsService
  200. {
  201. [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IProductsService/ListProducts", ReplyAction="http://tempuri.org/IProductsService/ListProductsResponse")]
  202. [System.ServiceModel.FaultContractAttribute(typeof(ProductsClient.ProductsService.DatabaseFault), Action="http://tempuri.org/IProductsService/ListProductsDatabaseFaultFault", Name="DatabaseFault", Namespace="http://schemas.datacontract.org/2004/07/Products")]
  203. [System.ServiceModel.FaultContractAttribute(typeof(ProductsClient.ProductsService.SystemFault), Action="http://tempuri.org/IProductsService/ListProductsSystemFaultFault", Name="SystemFault", Namespace="http://schemas.datacontract.org/2004/07/Products")]
  204. string[] ListProducts();
  205. [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IProductsService/GetProduct", ReplyAction="http://tempuri.org/IProductsService/GetProductResponse")]
  206. ProductsClient.ProductsService.ProductData GetProduct(string productNumber);
  207. [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IProductsService/CurrentStockLevel", ReplyAction="http://tempuri.org/IProductsService/CurrentStockLevelResponse")]
  208. int CurrentStockLevel(string productNumber);
  209. [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IProductsService/ChangeStockLevel", ReplyAction="http://tempuri.org/IProductsService/ChangeStockLevelResponse")]
  210. bool ChangeStockLevel(string productNumber, short newStockLevel, string shelf, int bin);
  211. }
  212. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  213. public interface IProductsServiceChannel : ProductsClient.ProductsService.IProductsService, System.ServiceModel.IClientChannel
  214. {
  215. }
  216. [System.Diagnostics.DebuggerStepThroughAttribute()]
  217. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  218. public partial class ProductsServiceClient : System.ServiceModel.ClientBase<ProductsClient.ProductsService.IProductsService>, ProductsClient.ProductsService.IProductsService
  219. {
  220. public ProductsServiceClient()
  221. {
  222. }
  223. public ProductsServiceClient(string endpointConfigurationName) :
  224. base(endpointConfigurationName)
  225. {
  226. }
  227. public ProductsServiceClient(string endpointConfigurationName, string remoteAddress) :
  228. base(endpointConfigurationName, remoteAddress)
  229. {
  230. }
  231. public ProductsServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
  232. base(endpointConfigurationName, remoteAddress)
  233. {
  234. }
  235. public ProductsServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
  236. base(binding, remoteAddress)
  237. {
  238. }
  239. public string[] ListProducts()
  240. {
  241. return base.Channel.ListProducts();
  242. }
  243. public ProductsClient.ProductsService.ProductData GetProduct(string productNumber)
  244. {
  245. return base.Channel.GetProduct(productNumber);
  246. }
  247. public int CurrentStockLevel(string productNumber)
  248. {
  249. return base.Channel.CurrentStockLevel(productNumber);
  250. }
  251. public bool ChangeStockLevel(string productNumber, short newStockLevel, string shelf, int bin)
  252. {
  253. return base.Channel.ChangeStockLevel(productNumber, newStockLevel, shelf, bin);
  254. }
  255. }
  256. }