public bool TryGetDuplicateExport( string fullTypeName, string memberName, out ExportedMethod exportedMethod) { return(this._DuplicateExportMethodsbyFullName.TryGetValue(AssemblyExports.GetKey(fullTypeName, memberName), out exportedMethod)); }
internal void Refresh() { int num = 0; this.MethodsByExportName.Clear(); this._DuplicateExportMethods.Clear(); Dictionary <string, DuplicateExports> dictionary = new Dictionary <string, DuplicateExports>(); foreach (ExportedClass exportedClass in this.ClassesByName.Values) { List <ExportedMethod> exportedMethodList = new List <ExportedMethod>(exportedClass.Methods.Count); foreach (ExportedMethod method in exportedClass.Methods) { DuplicateExports duplicateExports; if (!dictionary.TryGetValue(method.ExportName, out duplicateExports)) { method.VTableOffset = num++; this.MethodsByExportName.Add(method.MemberName, method); dictionary.Add(method.ExportName, new DuplicateExports(method)); } else { exportedMethodList.Add(method); duplicateExports.Duplicates.Add(method); } } ExportedClass exportClassCopy = exportedClass; exportedMethodList.ForEach((Action <ExportedMethod>)(m => exportClassCopy.Methods.Remove(m))); exportedClass.Refresh(); } foreach (DuplicateExports duplicateExports in dictionary.Values) { if (duplicateExports.Duplicates.Count > 0) { this._DuplicateExportMethods.Add(duplicateExports); foreach (ExportedMethod duplicate in (IEnumerable <ExportedMethod>)duplicateExports.Duplicates) { this._DuplicateExportMethodsbyFullName.Add(AssemblyExports.GetKey(duplicate.ExportedClass.FullTypeName, duplicate.MemberName), duplicate); } } } this._DuplicateExportMethods.Sort((Comparison <DuplicateExports>)((l, r) => string.CompareOrdinal(l.UsedExport.ExportName, r.UsedExport.ExportName))); }