XmlTextAttribute.cs 986 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // XmlTextAttribute.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 XmlTextAttribute.
  14. /// </summary>
  15. [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field
  16. | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
  17. public class XmlTextAttribute : Attribute
  18. {
  19. private string dataType = "";
  20. private Type type;
  21. public XmlTextAttribute ()
  22. {
  23. }
  24. public XmlTextAttribute (Type type)
  25. {
  26. Type = type;
  27. }
  28. public string DataType {
  29. get {
  30. return dataType;
  31. }
  32. set {
  33. dataType = value;
  34. }
  35. }
  36. public Type Type
  37. {
  38. get {
  39. return type;
  40. }
  41. set {
  42. type = value;
  43. }
  44. }
  45. internal bool InternalEquals (XmlTextAttribute ob)
  46. {
  47. if (ob == null) return false;
  48. return (dataType == ob.dataType && type == ob.type);
  49. }
  50. }
  51. }