XmlSchemaException.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // Author: Dwivedi, Ajay kumar
  2. // [email protected]
  3. using System;
  4. using System.Runtime.Serialization;
  5. namespace System.Xml.Schema
  6. {
  7. /// <summary>
  8. /// Summary description for XmlSchemaException.
  9. /// </summary>
  10. [Serializable]
  11. public class XmlSchemaException : System.SystemException
  12. {
  13. //fields
  14. private int lineNumber;
  15. private int linePosition;
  16. private XmlSchemaObject sourceObj;
  17. private string sourceUri;
  18. [MonoTODO]
  19. protected XmlSchemaException(SerializationInfo info, StreamingContext context){}
  20. protected XmlSchemaException(string message, int lineNumber, int linePosition,
  21. XmlSchemaObject sourceObject, string sourceUri, Exception innerException)
  22. : base(message, innerException)
  23. {
  24. this.lineNumber = lineNumber;
  25. this.linePosition = linePosition;
  26. this.sourceObj = sourceObject;
  27. this.sourceUri = sourceUri;
  28. }
  29. protected XmlSchemaException(string message, XmlSchemaObject sourceObject,
  30. Exception innerException)
  31. : base(message, innerException)
  32. {
  33. this.lineNumber = sourceObject.LineNumber;
  34. this.linePosition = sourceObject.LinePosition;
  35. this.sourceObj = sourceObject;
  36. this.sourceUri = sourceObject.SourceUri;
  37. }
  38. public XmlSchemaException(string message, Exception innerException)
  39. : base(message,innerException){}
  40. // Properties
  41. public int LineNumber
  42. {
  43. get{ return this.lineNumber;}
  44. }
  45. public int LinePosition
  46. {
  47. get{ return this.linePosition;}
  48. }
  49. public override string Message
  50. {
  51. get{ return this.Message; }
  52. }
  53. public XmlSchemaObject SourceSchemaObject
  54. {
  55. get{ return this.sourceObj; }
  56. }
  57. public string SourceUri
  58. {
  59. get{ return this.sourceUri; }
  60. }
  61. // Methods
  62. [MonoTODO]
  63. public override void GetObjectData(SerializationInfo info, StreamingContext context){}
  64. }
  65. }