コード例 #1
0
            private IEnumerable <IAssemblySymbol> GetAssemblySymbols(Compilation compilation, bool ignoreAssemblyKey)
            {
                if (ignoreAssemblyKey || compilation.Assembly.Identity.Name == _assemblyName)
                {
                    yield return(compilation.Assembly);
                }

                // Might need keys for symbols from previous script compilations.
                foreach (var assembly in compilation.GetReferencedAssemblySymbols())
                {
                    if (ignoreAssemblyKey || assembly.Identity.Name == _assemblyName)
                    {
                        yield return(assembly);
                    }
                }
            }