Exemplo n.º 1
0
 public static AssemblySymbol GetAssemblySymbol(CSharpSymbols.AssemblySymbol csharpSymbol)
 {
     if (csharpSymbol == null)
     {
         return(null);
     }
     if (!assemblyMap.TryGetValue(csharpSymbol, out CSharpAssemblySymbol symbol))
     {
         symbol = new CSharpAssemblySymbol(csharpSymbol);
         if ((object)symbol != null)
         {
             assemblyMap.Add(csharpSymbol, symbol);
         }
     }
     return(symbol);
 }
Exemplo n.º 2
0
 public static bool TryGetAssemblySymbol(CSharpSymbols.AssemblySymbol csharpSymbol, out CSharpAssemblySymbol symbol)
 {
     if (csharpSymbol == null || !assemblyMap.TryGetValue(csharpSymbol, out CSharpAssemblySymbol cachedSymbol))
     {
         symbol = null;
         return(false);
     }
     symbol = cachedSymbol;
     return((object)symbol != null);
 }