Exemple #1
0
 // Token: 0x06000004 RID: 4 RVA: 0x000020F3 File Offset: 0x000002F3
 private static ManagementObjectCollection GetObjectCollection(string wmiclass, string property, string condition, ManagementScope scope)
 {
     return(Wmi.GetObjectCollection(wmiclass, new string[]
     {
         property
     }, condition, scope));
 }
Exemple #2
0
        // Token: 0x06000003 RID: 3 RVA: 0x000020A0 File Offset: 0x000002A0
        private static ManagementObjectCollection GetObjectCollection(string wmiclass, string[] properties, string condition, ManagementScope scope)
        {
            string arg   = (properties == null) ? "*" : string.Join(",", properties);
            string query = string.IsNullOrEmpty(condition) ? string.Format("SELECT {0} FROM {1}", arg, wmiclass) : string.Format("SELECT {0} FROM {1} WHERE {2}", arg, wmiclass, condition);

            return(Wmi.GetObjectCollection(query, scope));
        }
Exemple #3
0
        // Token: 0x0600000B RID: 11 RVA: 0x00002268 File Offset: 0x00000468
        public static WmiProperty PropertyQuery(string wmiclass, string property, string condition, ManagementScope scope = null)
        {
            ManagementObjectCollection objectCollection   = Wmi.GetObjectCollection(wmiclass, property, condition, scope);
            WmiClassCollection         wmiClassCollection = Wmi.ParseObjectCollection(objectCollection);

            foreach (WmiClass wmiClass in wmiClassCollection)
            {
                WmiProperty[] properties = wmiClass.Properties;
                int           num        = 0;
                if (num < properties.Length)
                {
                    return(properties[num]);
                }
            }
            return(null);
        }
Exemple #4
0
        // Token: 0x06000009 RID: 9 RVA: 0x00002238 File Offset: 0x00000438
        public static WmiClassCollection CustomQuery(ObjectQuery query, ManagementScope scope = null)
        {
            ManagementObjectCollection objectCollection = Wmi.GetObjectCollection(query, scope);

            return(Wmi.ParseObjectCollection(objectCollection));
        }
Exemple #5
0
        // Token: 0x06000006 RID: 6 RVA: 0x00002200 File Offset: 0x00000400
        public static WmiClassCollection Query(string wmiclass, string[] properties, string condition, ManagementScope scope = null)
        {
            ManagementObjectCollection objectCollection = Wmi.GetObjectCollection(wmiclass, properties, condition, scope);

            return(Wmi.ParseObjectCollection(objectCollection));
        }
Exemple #6
0
 // Token: 0x06000002 RID: 2 RVA: 0x00002090 File Offset: 0x00000290
 private static ManagementObjectCollection GetObjectCollection(string query, ManagementScope scope)
 {
     return(Wmi.GetObjectCollection(new ObjectQuery(query), scope));
 }