DebugTarget.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #region BSD License
  2. /*
  3. Copyright (c) 2004-2005 Matthew Holmes ([email protected]), Dan Moorehead ([email protected])
  4. Redistribution and use in source and binary forms, with or without modification, are permitted
  5. provided that the following conditions are met:
  6. * Redistributions of source code must retain the above copyright notice, this list of conditions
  7. and the following disclaimer.
  8. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
  9. and the following disclaimer in the documentation and/or other materials provided with the
  10. distribution.
  11. * The name of the author may not be used to endorse or promote products derived from this software
  12. without specific prior written permission.
  13. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
  14. BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  15. ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  16. EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  17. OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  18. OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  19. IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  20. */
  21. #endregion
  22. #region CVS Information
  23. /*
  24. * $Source$
  25. * $Author: jendave $
  26. * $Date: 2006-09-20 03:42:51 -0400 (Wed, 20 Sep 2006) $
  27. * $Revision: 164 $
  28. */
  29. #endregion
  30. using System;
  31. using Prebuild.Core.Attributes;
  32. using Prebuild.Core.Interfaces;
  33. using Prebuild.Core.Nodes;
  34. #if (DEBUG && _DEBUG_TARGET)
  35. namespace Prebuild.Core.Targets
  36. {
  37. [Target("debug")]
  38. public class DebugTarget : ITarget
  39. {
  40. #region Fields
  41. private Kernel m_Kernel = null;
  42. #endregion
  43. #region ITarget Members
  44. public void Write()
  45. {
  46. foreach(SolutionNode s in m_Kernel.Solutions)
  47. {
  48. Console.WriteLine("Solution [ {0}, {1} ]", s.Name, s.Path);
  49. foreach(string file in s.Files)
  50. {
  51. Console.WriteLine("\tFile [ {0} ]", file);
  52. }
  53. foreach(ProjectNode proj in s.Projects)
  54. {
  55. Console.WriteLine("\tProject [ {0}, {1}. {2} ]", proj.Name, proj.Path, proj.Language);
  56. foreach(string file in proj.Files)
  57. Console.WriteLine("\t\tFile [ {0} ]", file);
  58. }
  59. }
  60. }
  61. public void Clean()
  62. {
  63. Console.WriteLine("Not implemented");
  64. }
  65. public string Name
  66. {
  67. get
  68. {
  69. return "debug";
  70. }
  71. }
  72. public Kernel Kernel
  73. {
  74. get
  75. {
  76. return m_Kernel;
  77. }
  78. set
  79. {
  80. m_Kernel = value;
  81. }
  82. }
  83. #endregion
  84. }
  85. }
  86. #endif