コード例 #1
0
        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));
            }
        }
コード例 #2
0
        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));
        }
コード例 #3
0
		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));
		}
コード例 #4
0
ファイル: TypeProvider.cs プロジェクト: Smilediver/debugger
        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));
        }
コード例 #5
0
ファイル: TypeProvider.cs プロジェクト: Smilediver/debugger
 private void OnAssemblyLoaded(IAssemblyEvent ev)
 {
     LogProvider.Log (ev.Assembly.Path);
     ev.Cancel = filter.Count > 0 && !filter.Any (f => ev.Assembly.Path.StartsWith (f));
 }
コード例 #6
0
ファイル: TypeProvider.cs プロジェクト: shana/debugger
        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));
        }
コード例 #7
0
ファイル: TypeProvider.cs プロジェクト: shana/debugger
 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));
 }