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)); }
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())); }