SoapAttributeAttribute.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //
  2. // SoapAttributeAttribute.cs:
  3. //
  4. // Author:
  5. // John Donagher ([email protected])
  6. //
  7. // (C) 2002 John Donagher
  8. //
  9. using System;
  10. namespace System.Xml.Serialization
  11. {
  12. /// <summary>
  13. /// Summary description for SoapAttributeAttribute.
  14. /// </summary>
  15. [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field
  16. | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
  17. public class SoapAttributeAttribute : Attribute
  18. {
  19. private string attrName;
  20. private string dataType;
  21. private string ns;
  22. public SoapAttributeAttribute ()
  23. {
  24. }
  25. public SoapAttributeAttribute (string attrName)
  26. {
  27. AttributeName = attrName;
  28. }
  29. public string AttributeName {
  30. get {
  31. return attrName;
  32. }
  33. set {
  34. attrName = value;
  35. }
  36. }
  37. public string DataType {
  38. get {
  39. return dataType;
  40. }
  41. set {
  42. dataType = value;
  43. }
  44. }
  45. public string Namespace {
  46. get {
  47. return ns;
  48. }
  49. set {
  50. ns = value;
  51. }
  52. }
  53. internal bool InternalEquals (SoapAttributeAttribute other)
  54. {
  55. if (other == null) return false;
  56. return (attrName == other.attrName &&
  57. dataType == other.dataType &&
  58. ns == other.ns);
  59. }
  60. }
  61. }