Exemplo n.º 1
0
        public static string GetGitHubPath(ISymbolBase symbol)
        {
            var location = symbol.Locations.FirstOrDefault();
            var indx     = location.Path.IndexOf("\\NTypewriter.CodeModel");

            if (indx < 0)
            {
                indx = location.Path.IndexOf("\\NTypewriter\\Internals");
            }
            var githubPath = location.Path.Substring(indx).Replace('\\', '/');
            var line       = "#L" + location.StartLinePosition;

            return(githubPath + line);
        }
Exemplo n.º 2
0
 private static bool IsScribanFunctionSetAvailble(ISymbolBase type)
 {
     return(ScribanFunctionSets.Contains(type.BareName));
 }
 /// <summary>
 /// Checks if symbol is decorated with an attribute
 /// </summary>
 public static bool HasAttribute(this ISymbolBase symbol, string attributeName)
 {
     return(symbol.Attributes.Any(y => y.Name == attributeName));
 }