XmlArrayItemAttribute.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // XmlArrayItemAttribute.cs:
  3. //
  4. // Author:
  5. // John Donagher ([email protected])
  6. //
  7. // (C) 2002 John Donagher
  8. //
  9. using System.Xml.Schema;
  10. using System;
  11. namespace System.Xml.Serialization
  12. {
  13. /// <summary>
  14. /// Summary description for XmlArrayItemAttribute.
  15. /// </summary>
  16. [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field
  17. | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
  18. public class XmlArrayItemAttribute : Attribute
  19. {
  20. private string dataType;
  21. private string elementName;
  22. private XmlSchemaForm form;
  23. private string ns;
  24. private bool isNullable;
  25. private int nestingLevel;
  26. private Type type;
  27. public XmlArrayItemAttribute ()
  28. {
  29. }
  30. public XmlArrayItemAttribute (string elementName)
  31. {
  32. ElementName = elementName;
  33. }
  34. public XmlArrayItemAttribute (Type type)
  35. {
  36. Type = type;
  37. }
  38. public XmlArrayItemAttribute (string elementName, Type type)
  39. {
  40. ElementName = elementName;
  41. Type = type;
  42. }
  43. public string DataType {
  44. get { return dataType; }
  45. set { dataType = value; }
  46. }
  47. public string ElementName {
  48. get { return elementName; }
  49. set { elementName = value; }
  50. }
  51. public XmlSchemaForm Form {
  52. get { return form; }
  53. set { form = value; }
  54. }
  55. public string Namespace {
  56. get { return ns; }
  57. set { ns = value; }
  58. }
  59. public bool IsNullable {
  60. get { return isNullable; }
  61. set { isNullable = value; }
  62. }
  63. public Type Type {
  64. get { return type; }
  65. set { type = value; }
  66. }
  67. public int NestingLevel {
  68. get { return nestingLevel; }
  69. set { nestingLevel = value; }
  70. }
  71. }
  72. }