Example #1
0
        protected (int vsphere, int hyperv) GetVirtualMachineCount95(PerformContext performContext, LicenseTypeEx licenseType)
        {
            bool evaluation = licenseType == LicenseTypeEx.Evaluation;

            VmsCounterInfo vSphereCounterInfo = GetVmsCounters(performContext, EPlatform.EVmware, evaluation);
            VmsCounterInfo hypervCounterInfo  = GetVmsCounters(performContext, EPlatform.EHyperV, evaluation);

            int vsphere = evaluation ? vSphereCounterInfo.TrialVmsCount : vSphereCounterInfo.NonTrialVmsCount;
            int hyperv  = evaluation ? hypervCounterInfo.TrialVmsCount : hypervCounterInfo.NonTrialVmsCount;

            return(vsphere, hyperv);
        }
Example #2
0
        protected (int vsphere, int hyperv) GetVirtualMachineCount(PerformContext performContext, Version programVersion, LicenseTypeEx licenseType)
        {
            if (programVersion.Major == 9 && programVersion.Minor == 5)
            {
                if (programVersion.Revision == 1038)
                {
                    return(GetVirtualMachineCount9501038(performContext));
                }

                return(GetVirtualMachineCount95(performContext, licenseType));
            }

            // default
            return(GetVirtualMachineCount90(performContext));
        }