SoapDocumentMethodAttribute.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. //
  2. // System.Web.Services.Protocols.SoapDocumentMethodAttribute.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2002
  8. //
  9. //
  10. // Permission is hereby granted, free of charge, to any person obtaining
  11. // a copy of this software and associated documentation files (the
  12. // "Software"), to deal in the Software without restriction, including
  13. // without limitation the rights to use, copy, modify, merge, publish,
  14. // distribute, sublicense, and/or sell copies of the Software, and to
  15. // permit persons to whom the Software is furnished to do so, subject to
  16. // the following conditions:
  17. //
  18. // The above copyright notice and this permission notice shall be
  19. // included in all copies or substantial portions of the Software.
  20. //
  21. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  22. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  23. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  24. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  25. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  26. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  27. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  28. //
  29. using System.Web.Services.Description;
  30. namespace System.Web.Services.Protocols {
  31. [AttributeUsage (AttributeTargets.Method, Inherited = true)]
  32. public sealed class SoapDocumentMethodAttribute : Attribute {
  33. #region Fields
  34. string action;
  35. string binding;
  36. bool oneWay;
  37. SoapParameterStyle parameterStyle;
  38. string requestElementName;
  39. string requestNamespace;
  40. string responseElementName;
  41. string responseNamespace;
  42. SoapBindingUse use;
  43. #endregion
  44. #region Constructors
  45. public SoapDocumentMethodAttribute ()
  46. {
  47. }
  48. public SoapDocumentMethodAttribute (string action)
  49. : this ()
  50. {
  51. this.action = action;
  52. }
  53. #endregion // Constructors
  54. #region Properties
  55. public string Action {
  56. get { return action; }
  57. set { action = value; }
  58. }
  59. public string Binding {
  60. get {
  61. if (binding != null)
  62. return binding;
  63. return "";
  64. }
  65. set { binding = value; }
  66. }
  67. public bool OneWay {
  68. get { return oneWay; }
  69. set { oneWay = value; }
  70. }
  71. public SoapParameterStyle ParameterStyle {
  72. get { return parameterStyle; }
  73. set { parameterStyle = value; }
  74. }
  75. public string RequestElementName {
  76. get {
  77. if (requestElementName == null)
  78. return "";
  79. return requestElementName;
  80. }
  81. set { requestElementName = value; }
  82. }
  83. public string RequestNamespace {
  84. get {
  85. if (requestNamespace == null)
  86. return "";
  87. return requestNamespace;
  88. }
  89. set { requestNamespace = value; }
  90. }
  91. public string ResponseElementName {
  92. get {
  93. if (responseElementName == null)
  94. return "";
  95. return responseElementName;
  96. }
  97. set { responseElementName = value; }
  98. }
  99. public string ResponseNamespace {
  100. get {
  101. if (responseNamespace == null)
  102. return "";
  103. return responseNamespace;
  104. }
  105. set { responseNamespace = value; }
  106. }
  107. public SoapBindingUse Use {
  108. get { return use; }
  109. set { use = value; }
  110. }
  111. #endregion // Properties
  112. }
  113. }