Closed madjarian closed 2 years ago
Hi and thank you for your work. i try to use Ormi with async query like that:
[WMIClass("Win32_Processor")] public class Processor : WMIInstance { public string Name { get; set; } [WMIProperty("NumberOfCores")] public int Cores { get; set; } public string Description { get; set; } } WMIHelper helper = new WMIHelper("root\\CimV2", host, account, password); List<Processor> processors = await helper.QueryAsync<Processor>().ToList(); ...
but i got Compiler Error CS1061 with msg like: Task<IEnumerable> no definition for ToList()... is anybody have a idea to fix that ?
Try:
List<Processor> processors = (await helper.QueryAsync<Processor>()).ToList();
Hi and thank you for your work. i try to use Ormi with async query like that:
but i got Compiler Error CS1061 with msg like: Task<IEnumerable> no definition for ToList()...
is anybody have a idea to fix that ?