SoapElementAttribute.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //
  2. // SoapElementAttribute.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 SoapElementAttribute.
  14. /// </summary>
  15. [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field
  16. | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
  17. public class SoapElementAttribute : Attribute
  18. {
  19. private string dataType;
  20. private string elementName;
  21. private bool isNullable;
  22. public SoapElementAttribute ()
  23. {
  24. }
  25. public SoapElementAttribute (string elementName)
  26. {
  27. ElementName = elementName;
  28. }
  29. public string DataType {
  30. get {
  31. return dataType;
  32. }
  33. set {
  34. dataType = value;
  35. }
  36. }
  37. public string ElementName {
  38. get {
  39. return elementName;
  40. }
  41. set {
  42. elementName = value;
  43. }
  44. }
  45. public bool IsNullable {
  46. get {
  47. return isNullable;
  48. }
  49. set {
  50. isNullable = value;
  51. }
  52. }
  53. internal bool InternalEquals (SoapElementAttribute other)
  54. {
  55. if (other == null) return false;
  56. return (elementName == other.elementName &&
  57. dataType == other.dataType &&
  58. isNullable == other.isNullable);
  59. }
  60. }
  61. }