XmlChoiceIdentifierAttribute.cs 917 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // XmlChoiceIdentifierAttribute.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 XmlChoiceIdentifierAttribute.
  14. /// </summary>
  15. [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field
  16. | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
  17. public class XmlChoiceIdentifierAttribute : Attribute
  18. {
  19. private string memberName;
  20. public XmlChoiceIdentifierAttribute ()
  21. {
  22. }
  23. public XmlChoiceIdentifierAttribute (string name)
  24. {
  25. MemberName = name;
  26. }
  27. public string MemberName {
  28. get {
  29. return memberName;
  30. }
  31. set {
  32. memberName = value;
  33. }
  34. }
  35. internal bool InternalEquals (XmlChoiceIdentifierAttribute ob)
  36. {
  37. if (ob == null) return false;
  38. return memberName == ob.memberName;
  39. }
  40. }
  41. }