AdvancedLauncher.Tools.FingerPrint.identifier C# (CSharp) Method

identifier() private static method

private static identifier ( string wmiClass, string wmiProperty ) : string
wmiClass string
wmiProperty string
return string
        private static string identifier(string wmiClass, string wmiProperty)
        {
            string result = "";
            System.Management.ManagementClass mc =
            new System.Management.ManagementClass(wmiClass);
            System.Management.ManagementObjectCollection moc = mc.GetInstances();
            foreach (System.Management.ManagementObject mo in moc) {
                //Only get the first one
                if (result == "") {
                    try {
                        result = mo[wmiProperty].ToString();
                        break;
                    } catch {
                    }
                }
            }
            return result;
        }

Same methods

FingerPrint::identifier ( string wmiClass, string wmiProperty, string wmiMustBeTrue ) : string