ProjectBLL/CpuUsage.cs
/// <summary> 
/// Creates and returns a CpuUsage instance that can be used to query the CPU time on this operating system. 
/// </summary> 
/// <returns>An instance of the CpuUsage class.</returns> 
/// <exception cref="NotSupportedException">This platform is not supported -or- initialization of the CPUUsage object failed.</exception> 
Creates and returns a CpuUsage instance that can be used to query the CPU time on this operating system.
Creates and returns a CpuUsage instance that can be used to query the CPU time on this operating system .
public static CpuUsage Create()
        {
            if (m_CpuUsage == null)
            {
                if (Environment.OSVersion.Platform == PlatformID.Win32NT)
                    m_CpuUsage = new CpuUsageNt();
                else if (Environment.OSVersion.Platform == PlatformID.Win32Windows)
                    m_CpuUsage = new CpuUsage9x();
                else
                    throw new NotSupportedException();
            }
            return m_CpuUsage;
        }
public static CpuUsage Create ( ) { if ( m_CpuUsage == null ) { if ( Environment . OSVersion . Platform == PlatformID . Win32NT ) m_CpuUsage = new CpuUsageNt ( ) ; else if ( Environment . OSVersion . Platform == PlatformID . Win32Windows ) m_CpuUsage = new CpuUsage9x ( ) ; else throw new NotSupportedException ( ) ; } return m_CpuUsage ; }
Creates and returns a CpuUsage instance that can be used to query the CPU time on this operating system.
Creates and returns a CpuUsage instance that can be used to query the CPU time on this operating system .
An instance of the CpuUsage class.
An instance of the CpuUsage class .
This platform is not supported -or- initialization of the CPUUsage object failed.
This platform is not supported - or - initialization of the CPUUsage object failed .