示例#1
0
 public static string ToString(ISymbol symbol, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var writer = SymbolKeyWriter.GetWriter(cancellationToken))
     {
         writer.WriteFirstSymbolKey(symbol);
         return(writer.CreateKey());
     }
 }
示例#2
0
        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());
            }
        }