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