/src/System.Web.Razor/Parser/SyntaxConstants.cs

https://bitbucket.org/patrickmcdonald/aspnetwebstack · C# · 52 lines · 47 code · 4 blank · 1 comment · 0 complexity · 76046ff5313ad682b6a918718fabe6b2 MD5 · raw file

  1. // Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
  2. using System.Diagnostics.CodeAnalysis;
  3. namespace System.Web.Razor.Parser
  4. {
  5. public static class SyntaxConstants
  6. {
  7. public static readonly string TextTagName = "text";
  8. public static readonly char TransitionCharacter = '@';
  9. public static readonly string TransitionString = "@";
  10. public static readonly string StartCommentSequence = "@*";
  11. public static readonly string EndCommentSequence = "*@";
  12. [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Justification = "Class is nested to provide better organization")]
  13. [SuppressMessage("Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces", Justification = "This type name should not cause a conflict")]
  14. public static class CSharp
  15. {
  16. public static readonly int UsingKeywordLength = 5;
  17. public static readonly string InheritsKeyword = "inherits";
  18. public static readonly string FunctionsKeyword = "functions";
  19. public static readonly string SectionKeyword = "section";
  20. public static readonly string HelperKeyword = "helper";
  21. public static readonly string ElseIfKeyword = "else if";
  22. public static readonly string NamespaceKeyword = "namespace";
  23. public static readonly string ClassKeyword = "class";
  24. public static readonly string LayoutKeyword = "layout";
  25. public static readonly string SessionStateKeyword = "sessionstate";
  26. }
  27. [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Justification = "Class is nested to provide better organization")]
  28. public static class VB
  29. {
  30. public static readonly int ImportsKeywordLength = 7;
  31. public static readonly string EndKeyword = "End";
  32. public static readonly string CodeKeyword = "Code";
  33. public static readonly string FunctionsKeyword = "Functions";
  34. public static readonly string SectionKeyword = "Section";
  35. public static readonly string StrictKeyword = "Strict";
  36. public static readonly string ExplicitKeyword = "Explicit";
  37. public static readonly string OffKeyword = "Off";
  38. public static readonly string HelperKeyword = "Helper";
  39. public static readonly string SelectCaseKeyword = "Select Case";
  40. public static readonly string LayoutKeyword = "Layout";
  41. public static readonly string EndCodeKeyword = "End Code";
  42. public static readonly string EndHelperKeyword = "End Helper";
  43. public static readonly string EndFunctionsKeyword = "End Functions";
  44. public static readonly string EndSectionKeyword = "End Section";
  45. public static readonly string SessionStateKeyword = "SessionState";
  46. }
  47. }
  48. }