public DebuggerProcessAssemblyList(Debugger.Process process)
		{
			if (process == null)
				throw new ArgumentNullException("process");
			this.process = process;
			this.moduleModels = new NullSafeSimpleModelCollection<DebuggerModuleModel>();
			this.moduleModels.AddRange(this.process.Modules.Select(m => new DebuggerModuleModel(m)));
			this.Assemblies = new NullSafeSimpleModelCollection<IAssemblyModel>();
			this.Assemblies.AddRange(moduleModels.Select(mm => mm.AssemblyModel));
			this.process.ModuleLoaded += ModuleLoaded;
			this.process.ModuleUnloaded += ModuleUnloaded;
		}
 public SynchronizedModelCollection(IMutableModelCollection <T> underlyingCollection, object syncRoot)
 {
     if (underlyingCollection == null)
     {
         throw new ArgumentNullException("underlyingCollection");
     }
     if (syncRoot == null)
     {
         throw new ArgumentNullException("syncRoot");
     }
     this.underlyingCollection = underlyingCollection;
     this.syncRoot             = syncRoot;
 }
 public DebuggerProcessAssemblyList(Debugger.Process process)
 {
     if (process == null)
     {
         throw new ArgumentNullException("process");
     }
     this.process      = process;
     this.moduleModels = new NullSafeSimpleModelCollection <DebuggerModuleModel>();
     this.moduleModels.AddRange(this.process.Modules.Select(m => new DebuggerModuleModel(m)));
     this.Assemblies = new NullSafeSimpleModelCollection <IAssemblyModel>();
     this.Assemblies.AddRange(moduleModels.Select(mm => mm.AssemblyModel));
     this.process.ModuleLoaded   += ModuleLoaded;
     this.process.ModuleUnloaded += ModuleUnloaded;
 }
Esempio n. 4
0
 /// <summary>
 /// Scans the project items (files, usually) of
 /// a project's ProjectItems collection.
 /// </summary>
 /// <param name="projectItems">The ProjectItems collection to scan.</param>
 /// <param name="summary">The root summary data object that these
 /// files belong to.</param>
 private void ScanProjectItems(IMutableModelCollection <ProjectItem> projectItems, LineCountSummary summary)
 {
     tsprgTask.Maximum += projectItems.Count;
     foreach (ProjectItem projectItem in projectItems)
     {
         tsprgTask.PerformStep();
         if (!(projectItem is FileProjectItem))
         {
             // Skip references and other special MSBuild things
             continue;
         }
         string projectFile = projectItem.FileName;
         if (!Directory.Exists(projectFile))
         {
             int iconIndex = 0;
                                 #if IMPR1
             iconIndex = fileImageListHelper.GetIndex(IconService.GetImageForFile(projectFile));
                                 #else
             m_fileIconMappings.TryGetValue(Path.GetExtension(projectFile), out iconIndex);
                                 #endif
             summary.FileLineCountInfo.Add(new LineCountInfo(projectFile, iconIndex, summary));
         }
     }
 }
Esempio n. 5
0
		public WorkspaceModel()
		{
			this.assemblyLists = new SimpleModelCollection<IAssemblyList>();
			this.MainAssemblyList = new AssemblyList();
			this.UnpinnedAssemblies = new AssemblyList();
		}
		/// <summary>
		/// Scans the project items (files, usually) of
		/// a project's ProjectItems collection.
		/// </summary>
		/// <param name="projectItems">The ProjectItems collection to scan.</param>
		/// <param name="summary">The root summary data object that these
		/// files belong to.</param>
		private void ScanProjectItems(IMutableModelCollection<ProjectItem> projectItems, LineCountSummary summary)
		{
			tsprgTask.Maximum += projectItems.Count;
			foreach (ProjectItem projectItem in projectItems)
			{
				tsprgTask.PerformStep();
				if (!(projectItem is FileProjectItem)) {
					// Skip references and other special MSBuild things
					continue;
				}
				string projectFile = projectItem.FileName;
				if (!Directory.Exists(projectFile))
				{
					int iconIndex = 0;
					#if IMPR1
					iconIndex = fileImageListHelper.GetIndex(IconService.GetImageForFile(projectFile));
					#else
					m_fileIconMappings.TryGetValue(Path.GetExtension(projectFile), out iconIndex);
					#endif
					summary.FileLineCountInfo.Add(new LineCountInfo(projectFile, iconIndex, summary));
				}
			}
		}
Esempio n. 7
0
		public AssemblyList()
		{
			Name = "<default>";
			Assemblies = new NullSafeSimpleModelCollection<IAssemblyModel>();
		}
Esempio n. 8
0
 public WorkspaceModel()
 {
     this.assemblyLists      = new SimpleModelCollection <IAssemblyList>();
     this.MainAssemblyList   = new AssemblyList();
     this.UnpinnedAssemblies = new AssemblyList();
 }
 public SynchronizedModelCollection(IMutableModelCollection <T> underlyingCollection)
     : this(underlyingCollection, new object())
 {
 }
 public AssemblyList()
 {
     Name       = "<default>";
     Assemblies = new NullSafeSimpleModelCollection <IAssemblyModel>();
 }