CompilerResults.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. //
  2. // System.CodeDom.Compiler.CompilerResults.cs
  3. //
  4. // Authors:
  5. // Daniel Stodden ([email protected])
  6. // Andreas Nahr ([email protected])
  7. //
  8. // (C) 2002 Ximian, Inc.
  9. //
  10. //
  11. // Permission is hereby granted, free of charge, to any person obtaining
  12. // a copy of this software and associated documentation files (the
  13. // "Software"), to deal in the Software without restriction, including
  14. // without limitation the rights to use, copy, modify, merge, publish,
  15. // distribute, sublicense, and/or sell copies of the Software, and to
  16. // permit persons to whom the Software is furnished to do so, subject to
  17. // the following conditions:
  18. //
  19. // The above copyright notice and this permission notice shall be
  20. // included in all copies or substantial portions of the Software.
  21. //
  22. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  23. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  24. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  25. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  26. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  27. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  28. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  29. //
  30. using System.Security.Policy;
  31. namespace System.CodeDom.Compiler
  32. {
  33. using System.Reflection;
  34. using System.Collections.Specialized;
  35. public class CompilerResults
  36. {
  37. private Assembly compiledAssembly;
  38. private CompilerErrorCollection errors = new CompilerErrorCollection ();
  39. #if (NET_1_1)
  40. private Evidence evidence;
  41. #endif
  42. private int nativeCompilerReturnValue = 0;
  43. private StringCollection output = new StringCollection ();
  44. private string pathToAssembly;
  45. private TempFileCollection tempFiles;
  46. //
  47. // Constructors
  48. //
  49. public CompilerResults (TempFileCollection tempFiles)
  50. {
  51. this.tempFiles = tempFiles;
  52. }
  53. //
  54. // Properties
  55. //
  56. public Assembly CompiledAssembly {
  57. get {
  58. return compiledAssembly;
  59. }
  60. set {
  61. compiledAssembly = value;
  62. }
  63. }
  64. public CompilerErrorCollection Errors {
  65. get {
  66. if (errors == null)
  67. errors = new CompilerErrorCollection();
  68. return errors;
  69. }
  70. }
  71. #if (NET_1_1)
  72. public Evidence Evidence {
  73. get {
  74. return evidence;
  75. }
  76. set {
  77. evidence = value;
  78. }
  79. }
  80. #endif
  81. public int NativeCompilerReturnValue {
  82. get {
  83. return nativeCompilerReturnValue;
  84. }
  85. set {
  86. nativeCompilerReturnValue = value;
  87. }
  88. }
  89. public StringCollection Output {
  90. get {
  91. if (output == null)
  92. output = new StringCollection();
  93. return output;
  94. }
  95. }
  96. public string PathToAssembly {
  97. get {
  98. return pathToAssembly;
  99. }
  100. set {
  101. pathToAssembly = value;
  102. }
  103. }
  104. public TempFileCollection TempFiles {
  105. get {
  106. return tempFiles;
  107. }
  108. set {
  109. tempFiles = value;
  110. }
  111. }
  112. }
  113. }