PageRenderTime 44ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/Utilities.CodeGen/CodeGen/Templates/Using.cs

#
C# | 70 lines | 36 code | 11 blank | 23 comment | 0 complexity | 5ec036d0eab14393c24baaada28e261d MD5 | raw file
  1. /*
  2. Copyright (c) 2012 <a href="http://www.gutgames.com">James Craig</a>
  3. Permission is hereby granted, free of charge, to any person obtaining a copy
  4. of this software and associated documentation files (the "Software"), to deal
  5. in the Software without restriction, including without limitation the rights
  6. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. copies of the Software, and to permit persons to whom the Software is
  8. furnished to do so, subject to the following conditions:
  9. The above copyright notice and this permission notice shall be included in
  10. all copies or substantial portions of the Software.
  11. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  17. THE SOFTWARE.*/
  18. #region Usings
  19. using System;
  20. using System.Collections.Generic;
  21. using System.Linq;
  22. using System.Text;
  23. using Utilities.CodeGen.Templates.Interfaces;
  24. using Utilities.CodeGen.Interfaces;
  25. using Utilities.CodeGen.Templates.Enums;
  26. using Utilities.CodeGen.Templates.BaseClasses;
  27. #endregion
  28. namespace Utilities.CodeGen.Templates
  29. {
  30. /// <summary>
  31. /// Using class
  32. /// </summary>
  33. public class Using:ObjectBase
  34. {
  35. #region Constructor
  36. public Using(string Namespace, IParser Parser)
  37. : base(Parser)
  38. {
  39. this.Namespace = Namespace;
  40. }
  41. #endregion
  42. #region Properties
  43. protected string Namespace { get; set; }
  44. #endregion
  45. #region Functions
  46. protected override void SetupTemplate()
  47. {
  48. Template = new DefaultTemplate("using @Namespace;");
  49. }
  50. protected override void SetupInput()
  51. {
  52. Input.Values.Add("Namespace", Namespace);
  53. }
  54. #endregion
  55. }
  56. }