private void OnAssemblyUnloaded(IAssemblyEvent assemblyEvent) { var unloaded = new List <ITypeMirror> (); foreach (var loadedType in loadedTypes) { if (loadedType.Assembly.Equals(assemblyEvent.Assembly) && !unloaded.Contains(loadedType)) { unloaded.Add(loadedType); } } foreach (var typeMirror in unloaded) { foreach (var file in typeMirror.SourceFiles) { if (sourceFiles.Contains(file)) { sourceFiles.Remove(file); } } } unloaded.ForEach(t => loadedTypes.Remove(t)); if (TypeUnloaded != null) { unloaded.ForEach(t => TypeUnloaded(t)); } }
private void OnAssemblyLoaded(IAssemblyEvent ev) { var path = NormalizePath(ev.Assembly.Path); //ev.Cancel = true; ev.Cancel = filter.Count > 0 && !filter.Any(f => path.StartsWith(f)); }
private void OnAssemblyUnloaded (IAssemblyEvent assemblyEvent) { var unloaded = new List<ITypeMirror> (); foreach (var loadedType in LoadedTypes) { if (loadedType.Assembly.Equals (assemblyEvent.Assembly) && !unloaded.Contains (loadedType)) unloaded.Add (loadedType); } unloaded.ForEach (t => loadedTypes.Remove (t)); if (TypeUnloaded != null) unloaded.ForEach (t => TypeUnloaded (t)); }
private void OnAssemblyUnloaded(IAssemblyEvent assemblyEvent) { var unloaded = new List<ITypeMirror> (); foreach (var loadedType in LoadedTypes) { if (loadedType.Assembly.Equals (assemblyEvent.Assembly) && !unloaded.Contains (loadedType)) unloaded.Add (loadedType); } unloaded.ForEach (t => loadedTypes.Remove (t)); if (TypeUnloaded != null) unloaded.ForEach (t => TypeUnloaded (t)); }
private void OnAssemblyLoaded(IAssemblyEvent ev) { LogProvider.Log (ev.Assembly.Path); ev.Cancel = filter.Count > 0 && !filter.Any (f => ev.Assembly.Path.StartsWith (f)); }
private void OnAssemblyUnloaded(IAssemblyEvent assemblyEvent) { var unloaded = new List<ITypeMirror> (); foreach (var loadedType in loadedTypes) { if (loadedType.Assembly.Equals (assemblyEvent.Assembly) && !unloaded.Contains (loadedType)) unloaded.Add (loadedType); } foreach (var typeMirror in unloaded) foreach (var file in typeMirror.SourceFiles) if (sourceFiles.Contains (file)) sourceFiles.Remove (file); unloaded.ForEach (t => loadedTypes.Remove (t)); if (TypeUnloaded != null) unloaded.ForEach (t => TypeUnloaded (t)); }
private void OnAssemblyLoaded(IAssemblyEvent ev) { var path = NormalizePath (ev.Assembly.Path); //ev.Cancel = true; ev.Cancel = filter.Count > 0 && !filter.Any (f => path.StartsWith (f)); }