XmlSchemaFacet.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Author: Dwivedi, Ajay kumar
  2. // [email protected]
  3. using System;
  4. using System.Xml;
  5. using System.Xml.Serialization;
  6. using System.ComponentModel;
  7. namespace System.Xml.Schema
  8. {
  9. /// <summary>
  10. /// Summary description for XmlSchemaFacet.
  11. /// </summary>
  12. public abstract class XmlSchemaFacet : XmlSchemaAnnotated
  13. {
  14. [Flags]
  15. internal protected enum Facet {
  16. None = 0,
  17. length = 1 ,
  18. minLength = 2,
  19. maxLength = 4,
  20. pattern = 8,
  21. enumeration = 16,
  22. whiteSpace = 32,
  23. maxInclusive = 64,
  24. maxExclusive = 128,
  25. minExclusive = 256,
  26. minInclusive = 512,
  27. totalDigits = 1024,
  28. fractionDigits = 2048
  29. };
  30. internal protected const Facet AllFacets =
  31. Facet.length | Facet.minLength | Facet.maxLength |
  32. Facet.minExclusive | Facet.maxExclusive |
  33. Facet.minInclusive | Facet.maxInclusive |
  34. Facet.pattern | Facet.enumeration | Facet.whiteSpace |
  35. Facet.totalDigits | Facet.fractionDigits;
  36. internal abstract Facet ThisFacet { get ; }
  37. private bool isFixed;
  38. private string val;
  39. protected XmlSchemaFacet()
  40. {
  41. }
  42. [System.Xml.Serialization.XmlAttribute("value")]
  43. public string Value
  44. {
  45. get{ return val; }
  46. set{ val = value; }
  47. }
  48. [DefaultValue(false)]
  49. [System.Xml.Serialization.XmlAttribute("fixed")]
  50. public virtual bool IsFixed
  51. {
  52. get{ return isFixed; }
  53. set{ isFixed = value; }
  54. }
  55. }
  56. }