예제 #1
0
        /// <summary>
        /// Gets memory counters of the process
        /// </summary>
        public ProcessMemoryCountersSnapshot?GetMemoryCountersSnapshot()
        {
            try
            {
                if (Process == null || Process.HasExited)
                {
                    return(null);
                }

                return(Dispatch.GetMemoryCountersSnapshot(Process.Handle, ProcessId));
            }
#pragma warning disable ERP022 // Unobserved exception in generic exception handler
            catch
            {
                return(null);
            }
#pragma warning restore ERP022 // Unobserved exception in generic exception handler
        }