CleanFilesNode.cs 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #region BSD License
  2. /*
  3. Copyright (c) 2007 C.J. Adams-Collier ([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. using System;
  23. using System.Collections.Generic;
  24. using System.Xml;
  25. using Prebuild.Core.Attributes;
  26. using Prebuild.Core.Interfaces;
  27. using Prebuild.Core.Utilities;
  28. namespace Prebuild.Core.Nodes
  29. {
  30. [DataNode("CleanFiles")]
  31. public class CleanFilesNode : DataNode
  32. {
  33. #region Fields
  34. private string m_Pattern;
  35. #endregion
  36. #region Properties
  37. /// <summary>
  38. /// Gets the signature.
  39. /// </summary>
  40. /// <value>The signature.</value>
  41. public string Pattern
  42. {
  43. get
  44. {
  45. return m_Pattern;
  46. }
  47. }
  48. #endregion
  49. #region Public Methods
  50. /// <summary>
  51. /// Parses the specified node.
  52. /// </summary>
  53. /// <param name="node">The node.</param>
  54. public override void Parse(XmlNode node)
  55. {
  56. if (node == null)
  57. {
  58. throw new ArgumentNullException("node");
  59. }
  60. m_Pattern = Helper.AttributeValue(node, "pattern", String.Empty); ;
  61. m_Pattern = m_Pattern.Trim();
  62. }
  63. #endregion
  64. }
  65. }