public static string ToString(ISymbol symbol, CancellationToken cancellationToken = default(CancellationToken)) { using (var writer = SymbolKeyWriter.GetWriter(cancellationToken)) { writer.WriteFirstSymbolKey(symbol); return(writer.CreateKey()); } }
public static string ToString(ISymbol symbol, CancellationToken cancellationToken = default(CancellationToken)) { var compilation = (symbol.ContainingAssembly as ISourceAssemblySymbol)?.Compilation; using (var writer = SymbolKeyWriter.GetWriter(compilation, cancellationToken)) { writer.WriteFirstSymbolKey(symbol); return(writer.CreateKey()); } }