Пример #1
0
 public virtual int Get_(string wszName, int lFlags, out object pVal, out int pType, out int plFlavor)
 {
     pVal = _handler.GetProperty(wszName);
     if (pVal == null)
     {
         var info = _handler.PropertyInfos.FirstOrDefault(x => x.Name == wszName);
         if (string.IsNullOrEmpty(info.Name))
         {
             pType = (int)CimType.Object;
         }
         else
         {
             pType = (int)info.Type;
         }
     }
     else if (pVal.GetType() == typeof(object))
     {
         pType = (int)CimType.String;
     }
     else
     {
         pType = CimTypeConverter.GetMiType(pVal.GetType());
     }
     plFlavor = 0;
     return(0);
 }