ExcludeNode.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. using System;
  23. using System.Xml;
  24. using Prebuild.Core.Attributes;
  25. using Prebuild.Core.Interfaces;
  26. using Prebuild.Core.Utilities;
  27. namespace Prebuild.Core.Nodes
  28. {
  29. /// <summary>
  30. ///
  31. /// </summary>
  32. [DataNode("Exclude")]
  33. public class ExcludeNode : DataNode
  34. {
  35. #region Fields
  36. private string m_Pattern = "";
  37. #endregion
  38. #region Properties
  39. /// <summary>
  40. /// Gets the name.
  41. /// </summary>
  42. /// <value>The name.</value>
  43. public string Name
  44. {
  45. get
  46. {
  47. return m_Pattern;
  48. }
  49. }
  50. /// <summary>
  51. /// Gets the pattern.
  52. /// </summary>
  53. /// <value>The pattern.</value>
  54. public string Pattern
  55. {
  56. get
  57. {
  58. return m_Pattern;
  59. }
  60. }
  61. #endregion
  62. #region Public Methods
  63. /// <summary>
  64. /// Parses the specified node.
  65. /// </summary>
  66. /// <param name="node">The node.</param>
  67. public override void Parse(XmlNode node)
  68. {
  69. m_Pattern = Helper.AttributeValue( node, "name", m_Pattern );
  70. m_Pattern = Helper.AttributeValue(node, "pattern", m_Pattern );
  71. }
  72. #endregion
  73. }
  74. }