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

/Src/Condor.Core/PropertyObjects/BusinessObjectsPropertyRenderFullProperty.cs

http://github.com/kahanu/CondorXE
C# | 44 lines | 42 code | 2 blank | 0 comment | 2 complexity | 3dbf2181bfa33299fa26c5d4ea0b1ae2 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Condor.Core.PropertyObjects
  6. {
  7. public class BusinessObjectsPropertyRenderFullProperty : Property
  8. {
  9. public BusinessObjectsPropertyRenderFullProperty(MyMeta.IColumn column, RequestContext context)
  10. :base(column, context)
  11. {
  12. }
  13. public override void Render()
  14. {
  15. if (ToPropertyName().ToLower() == _script.Settings.DataOptions.VersionColumnName.ToLower())
  16. {
  17. _output.autoTabLn("public string " + this.Alias + " { get; set; }");
  18. }
  19. else
  20. {
  21. _output.tabLevel++;
  22. _output.autoTabLn("public " + LanguageType + " " + ToPropertyName());
  23. _output.autoTabLn("{");
  24. _output.tabLevel++;
  25. _output.autoTabLn("get");
  26. _output.autoTabLn("{");
  27. _output.tabLevel++;
  28. _output.autoTabLn("return this._" + StringFormatter.CamelCasing(LanguageType) + ";");
  29. _output.tabLevel--;
  30. _output.autoTabLn("}");
  31. _output.autoTabLn("set");
  32. _output.autoTabLn("{");
  33. _output.tabLevel++;
  34. _output.autoTabLn("this._" + StringFormatter.CamelCasing(LanguageType) + " = value;");
  35. _output.tabLevel--;
  36. _output.autoTabLn("}");
  37. _output.tabLevel--;
  38. _output.autoTabLn("}");
  39. }
  40. }
  41. }
  42. }