public static string GetSymbolId(MethodDescriptor methodDescriptor, int invocationIndex) { var result = CodeGraphHelper.GetSymbolId(methodDescriptor); result = string.Format("{0}@{1}", result, invocationIndex); return(result); }
public static ReferenceAnnotation GetMethodInvocationInfo(IMethodSymbol caller, IMethodSymbol callee, int invocationIndex, FileLinePositionSpan span) { var result = new ReferenceAnnotation() { declarationId = CodeGraphHelper.GetSymbolId(callee), symbolId = CodeGraphHelper.GetSymbolId(caller, invocationIndex), declFile = callee.Locations.First().GetMappedLineSpan().Path, symbolType = SymbolType.Method, label = callee.Name, hover = callee.ToDisplayString(), refType = "ref", range = CodeGraphHelper.GetRange(span) }; return(result); }
public static ReferenceAnnotation GetMethodInvocationInfo(MethodDescriptor callerDescriptor, AnalysisCallNode callNode) { var result = new ReferenceAnnotation() { declarationId = CodeGraphHelper.GetSymbolId(callNode.AdditionalInfo.StaticMethodDescriptor), symbolId = CodeGraphHelper.GetSymbolId(callerDescriptor, callNode.InMethodPosition), declFile = callNode.AdditionalInfo.StaticMethodDeclarationPath, symbolType = SymbolType.Method, label = callNode.Name, hover = callNode.AdditionalInfo.DisplayString, refType = "ref", range = callNode.LocationDescriptor.Range }; return(result); }
public static DeclarationAnnotation GetMethodDeclarationInfo(SyntaxNode node, IMethodSymbol symbol) { var span = CodeGraphHelper.GetSpan(node); var result = new DeclarationAnnotation() { symbolId = CodeGraphHelper.GetSymbolId(symbol), symbolType = SymbolType.Method, label = symbol.Name, hover = symbol.ToDisplayString(), refType = "decl", glyph = "72", range = CodeGraphHelper.GetRange(span) }; return(result); }
public static string GetSymbolId(IMethodSymbol symbol, int invocationIndex) { var methodDescriptor = Utils.CreateMethodDescriptor(symbol); return(CodeGraphHelper.GetSymbolId(methodDescriptor, invocationIndex)); }
public static string GetSymbolId(IMethodSymbol symbol) { var methodDescriptor = Utils.CreateMethodDescriptor(symbol); return(CodeGraphHelper.GetSymbolId(methodDescriptor)); }