2
0

Location.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // System.Web.Compilation.Location
  3. //
  4. // Authors:
  5. // Gonzalo Paniagua Javier ([email protected])
  6. //
  7. // (C) 2003 Ximian, Inc (http://www.ximian.com)
  8. //
  9. namespace System.Web.Compilation
  10. {
  11. class Location : ILocation
  12. {
  13. int beginLine, endLine, beginColumn, endColumn;
  14. string fileName, plainText;
  15. public Location (ILocation location)
  16. {
  17. Init (location);
  18. }
  19. public void Init (ILocation location)
  20. {
  21. if (location == null) {
  22. beginLine = 0;
  23. endLine = 0;
  24. beginColumn = 0;
  25. endColumn = 0;
  26. fileName = null;
  27. plainText = null;
  28. } else {
  29. beginLine = location.BeginLine;
  30. endLine = location.EndLine;
  31. beginColumn = location.BeginColumn;
  32. endColumn = location.EndColumn;
  33. fileName = location.Filename;
  34. plainText = location.PlainText;
  35. }
  36. }
  37. public string Filename {
  38. get { return fileName; }
  39. }
  40. public int BeginLine {
  41. get { return beginLine; }
  42. }
  43. public int EndLine {
  44. get { return endLine; }
  45. }
  46. public int BeginColumn {
  47. get { return beginColumn; }
  48. }
  49. public int EndColumn {
  50. get { return endColumn; }
  51. }
  52. public string PlainText {
  53. get { return plainText; }
  54. }
  55. }
  56. }