如何将 managementobjectcollection 转换为IEnumerable<IEnumerable<IPropertyData>>
propertydata 仅是名称和值的位置?
interface IPropertyData
{
string Name { get; }
object Value { get; }
}
class ManagementObjectInfo : IManagementInfo
{
public IEnumerable<IEnumerable<IPropertyData>> Get(string query)
{
ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);
return searcher.Get() ;
}
}