ProcessModule.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. //
  2. // System.Diagnostics.ProcessModule.cs
  3. //
  4. // Authors:
  5. // Dick Porter ([email protected])
  6. // Andreas Nahr ([email protected])
  7. //
  8. // (C) 2002 Ximian, Inc.
  9. // (C) 2003 Andreas Nahr
  10. //
  11. using System;
  12. using System.ComponentModel;
  13. using System.ComponentModel.Design;
  14. namespace System.Diagnostics
  15. {
  16. [Designer ("System.Diagnostics.Design.ProcessModuleDesigner, " + Consts.AssemblySystem_Design, typeof (IDesigner))]
  17. public class ProcessModule : Component
  18. {
  19. private IntPtr baseaddr;
  20. private IntPtr entryaddr;
  21. private string filename;
  22. private FileVersionInfo version_info;
  23. private int memory_size;
  24. private string modulename;
  25. internal ProcessModule(IntPtr baseaddr, IntPtr entryaddr,
  26. string filename,
  27. FileVersionInfo version_info,
  28. int memory_size, string modulename) {
  29. this.baseaddr=baseaddr;
  30. this.entryaddr=entryaddr;
  31. this.filename=filename;
  32. this.version_info=version_info;
  33. this.memory_size=memory_size;
  34. this.modulename=modulename;
  35. }
  36. [MonitoringDescription ("The base memory address of this module")]
  37. public IntPtr BaseAddress {
  38. get {
  39. return(baseaddr);
  40. }
  41. }
  42. [MonitoringDescription ("The base memory address of the entry point of this module")]
  43. public IntPtr EntryPointAddress {
  44. get {
  45. return(entryaddr);
  46. }
  47. }
  48. [MonitoringDescription ("The file name of this module")]
  49. public string FileName {
  50. get {
  51. return(filename);
  52. }
  53. }
  54. [Browsable (false)]
  55. public FileVersionInfo FileVersionInfo {
  56. get {
  57. return(version_info);
  58. }
  59. }
  60. [MonitoringDescription ("The memory needed by this module")]
  61. public int ModuleMemorySize {
  62. get {
  63. return(memory_size);
  64. }
  65. }
  66. [MonitoringDescription ("The name of this module")]
  67. public string ModuleName {
  68. get {
  69. return(modulename);
  70. }
  71. }
  72. public override string ToString() {
  73. return(this.ModuleName);
  74. }
  75. }
  76. }