CompilerErrorCollection.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. //
  2. // System.CodeDom.Compiler CompilerErrorCollection Class implementation
  3. //
  4. // Authors:
  5. // Daniel Stodden ([email protected])
  6. // Gonzalo Paniagua Javier ([email protected])
  7. //
  8. // (C) 2002 Ximian, Inc. (http://www.ximian.com)
  9. //
  10. using System.Collections;
  11. namespace System.CodeDom.Compiler
  12. {
  13. [MonoTODO]
  14. public class CompilerErrorCollection : CollectionBase
  15. {
  16. [MonoTODO]
  17. public CompilerErrorCollection ()
  18. {
  19. }
  20. public CompilerErrorCollection (CompilerErrorCollection value)
  21. {
  22. InnerList.AddRange(value.InnerList);
  23. }
  24. public CompilerErrorCollection (CompilerError[] value)
  25. {
  26. InnerList.AddRange(value);
  27. }
  28. public int Add (CompilerError value)
  29. {
  30. return InnerList.Add(value);
  31. }
  32. public void AddRange (CompilerError[] value)
  33. {
  34. InnerList.AddRange(value);
  35. }
  36. public void AddRange (CompilerErrorCollection value)
  37. {
  38. InnerList.AddRange(value.InnerList);
  39. }
  40. public bool Contains (CompilerError value)
  41. {
  42. return InnerList.Contains(value);
  43. }
  44. public void CopyTo (CompilerError[] array, int index)
  45. {
  46. InnerList.CopyTo(array,index);
  47. }
  48. public int IndexOf (CompilerError value)
  49. {
  50. return InnerList.IndexOf(value);
  51. }
  52. public void Insert (int index, CompilerError value)
  53. {
  54. InnerList.Insert(index,value);
  55. }
  56. public void Remove (CompilerError value)
  57. {
  58. InnerList.Remove(value);
  59. }
  60. public CompilerError this [int index]
  61. {
  62. get { return (CompilerError) InnerList[index]; }
  63. set { InnerList[index]=value; }
  64. }
  65. public bool HasErrors
  66. {
  67. get {
  68. foreach (CompilerError error in InnerList)
  69. if (!error.IsWarning) return true;
  70. return false;
  71. }
  72. }
  73. public bool HasWarnings
  74. {
  75. get {
  76. foreach (CompilerError error in InnerList)
  77. if (error.IsWarning) return true;
  78. return false;
  79. }
  80. }
  81. }
  82. }