XmlSchemaObject.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Author: Dwivedi, Ajay kumar
  2. // [email protected]
  3. using System;
  4. using System.Collections;
  5. using System.Xml.Serialization;
  6. using System.Xml;
  7. namespace System.Xml.Schema
  8. {
  9. /// <summary>
  10. /// Summary description for XmlSchemaObject.
  11. /// </summary>
  12. public abstract class XmlSchemaObject
  13. {
  14. private int lineNumber;
  15. private int linePosition;
  16. private string sourceUri;
  17. private XmlSerializerNamespaces namespaces;
  18. internal ArrayList unhandledAttributeList ;
  19. internal bool isCompiled = false;
  20. internal int errorCount = 0;
  21. protected XmlSchemaObject()
  22. {
  23. namespaces = new XmlSerializerNamespaces();
  24. unhandledAttributeList = null;
  25. }
  26. [XmlIgnore]
  27. public int LineNumber
  28. {
  29. get{ return lineNumber; }
  30. set{ lineNumber = value; }
  31. }
  32. [XmlIgnore]
  33. public int LinePosition
  34. {
  35. get{ return linePosition; }
  36. set{ linePosition = value; }
  37. }
  38. [XmlIgnore]
  39. public string SourceUri
  40. {
  41. get{ return sourceUri; }
  42. set{ sourceUri = value; }
  43. }
  44. // Undocumented Property
  45. [XmlNamespaceDeclarations]
  46. public XmlSerializerNamespaces Namespaces
  47. {
  48. get{ return namespaces; }
  49. set{ namespaces = value; }
  50. }
  51. internal void error(ValidationEventHandler handle,string message)
  52. {
  53. errorCount++;
  54. ValidationHandler.RaiseValidationError(handle,this,message);
  55. }
  56. internal void warn(ValidationEventHandler handle,string message)
  57. {
  58. errorCount++;
  59. ValidationHandler.RaiseValidationWarning(handle,this,message);
  60. }
  61. internal static void error(ValidationEventHandler handle, string message, Exception innerException)
  62. {
  63. ValidationHandler.RaiseValidationError(handle,message, innerException);
  64. }
  65. internal static void warn(ValidationEventHandler handle, string message, Exception innerException)
  66. {
  67. ValidationHandler.RaiseValidationWarning(handle,message, innerException);
  68. }
  69. }
  70. }