private void RemoveFileItems(IPsiSourceFile sourceFile) { lock (lockObject) { if (!registrationsMap.ContainsKey(sourceFile)) { return; } registrationsMap.RemoveKey(sourceFile); } }
private static List <IMetadataMethod> GetAllTestMethods(IMetadataTypeInfo typeInfo) { var list = new List <IMetadataMethod>(); var map = new OneToListMap <string, IMetadataMethod>(); while (typeInfo != null) { foreach (IMetadataMethod method in typeInfo.GetMethods()) { if (!IsTestMethod(method)) { continue; } if (map.ContainsKey(method.Name) && (method.IsVirtual)) { bool hasOverride = false; foreach (IMetadataMethod metadataMethod in map[method.Name]) { if (metadataMethod.IsVirtual && !metadataMethod.IsNewSlot) { hasOverride = true; } } if (hasOverride) { continue; } } map.AddValue(method.Name, method); list.Add(method); } IMetadataClassType baseType = typeInfo.Base; typeInfo = (baseType != null) ? baseType.Type : null; } return(list); }