Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RuntimeInstance"/> class.
 /// </summary>
 /// <param name="addressSpace">The address space where this code was loaded.</param>
 /// <param name="loadDateTime">The time when this code was loaded.</param>
 public RuntimeInstance(AddressSpace addressSpace, DateTime loadDateTime)
 {
     AddressSpace = addressSpace;
     LifeSpan     = new LifeSpan {
         Start = loadDateTime,
     };
 }
Beispiel #2
0
 /// <summary>
 /// Indicates whether the current object is equal to another <see cref="LifeSpan"/> object.
 /// </summary>
 /// <param name="other">A <see cref="LifeSpan"/> object to compare with this object.</param>
 /// <returns>true if the current object is equal to the other parameter; otherwise, false.</returns>
 public bool Equals(LifeSpan other)
 {
     if ((object)other == null)
     {
         return(false);
     }
     return(Start == other.Start && End == other.End);
 }
Beispiel #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Process"/> class.
        /// </summary>
        /// <param name="name">Process image file name</param>
        /// <param name="id">Process Id</param>
        /// <param name="parentId">Process' parent Id</param>
        /// <param name="monitoredCounters">A set of monitored <see cref="PerformanceMonitorCounter"/> counters.</param>
        public Process(string name, int id, int parentId, ISet <PerformanceMonitorCounter> monitoredCounters)
        {
            Name     = name;
            Id       = id;
            ParentId = parentId;
            LifeSpan = new LifeSpan();

            PerformanceMonitorCounterData = new Dictionary <PerformanceMonitorCounter, long>();
            foreach (var pmc in monitoredCounters)
            {
                PerformanceMonitorCounterData.Add(pmc, 0);
            }

            Modules = new List <Module>();
        }