public Uri GetUrl(IDeclaredElement element)
        {
            if (!IsAvailable(element))
            {
                return(null);
            }
            var unityApi = element.GetSolution().GetComponent <UnityApi>();
            var keyword  = element.GetUnityEventFunctionName(unityApi);

            keyword = ShowUnityHelp.FormatDocumentationKeyword(keyword);
            if (keyword == null)
            {
                return(null);
            }
            return(myShowUnityHelp.GetUri(keyword));
        }
Пример #2
0
        private static string GetSearchableText(ICompiledElement compiledElement)
        {
            if (compiledElement is ITypeElement)
            {
                return(compiledElement.ShortName);
            }

            if (compiledElement is IProperty property)
            {
                var containingType = property.GetContainingType();
                if (containingType != null)
                {
                    return(ShowUnityHelp.FormatDocumentationKeyword(containingType.GetClrName() + "-" + property.ShortName));
                }
            }

            return(ShowUnityHelp.FormatDocumentationKeyword(compiledElement.GetSearchableText()));
        }
 public DocumentationNavigationAction(ShowUnityHelp showUnityHelp, IMethod method, UnityApi unityApi)
 {
     myShowUnityHelp = showUnityHelp;
     myMethod        = method;
     myUnityApi      = unityApi;
 }
Пример #4
0
 public UnityCompiledElementOnlineHelpProvider(ShowUnityHelp showUnityHelp)
 {
     myShowUnityHelp = showUnityHelp;
 }
 public UnityOnlineHelpProvider(ShowUnityHelp showUnityHelp)
 {
     myShowUnityHelp = showUnityHelp;
 }