/// <summary> /// Gets the <see cref="AssemblyData"/> instance containing the metadata for externally visible types and members of the specified <see cref="Assembly"/>. /// </summary> /// <param name="assembly">The Assembly for which the AssemblyData should be obtained.</param> /// <returns>The AssemblyData instance containing the metadata for externally visible types and members of the specified Assembly.</returns> public AssemblyData GetAssemblyData(IAssemblySymbol assembly) { lock (_cachedAssemblyDatas) { if (_cachedAssemblyDatas.TryGetValue(assembly.Identity, out AssemblyData assemblyData) == false) { assemblyData = new AssemblyData(this, assembly); _cachedAssemblyDatas[assembly.Identity] = assemblyData; assemblyData.LoadFromMetadata(assembly); } return(assemblyData); } }