API Reference
Class
CimWmiClient
CIM-first implementation of IWmiClient with WMI fallback.
Inheritance
- Object
- CimWmiClient
Constructors
public CimWmiClient() #Methods
Query 2 overloads
public virtual IReadOnlyList<WmiRow> Query(String computer, String namespace, String query, WmiOptions options, CancellationToken ct = null) #Returns:
IReadOnlyList<WmiRow>Executes a CIM query and returns all rows; optionally times out.
Parameters
- computer System.String
- Target computer name or IP.
- namespace System.String
- CIM namespace (e.g., root/cimv2 or root\\cimv2).
- query System.String
- WQL query text.
- timeout System.Nullable{System.TimeSpan} = null
- Optional per-query timeout.
- ct System.Threading.CancellationToken = null
- Cancellation token.
Query(System.String computer, System.String namespace, System.String query, ComputerX.Wmi.WmiOptions options, System.Threading.CancellationToken ct) #Executes a CIM query with options (credentials/transport) and returns rows.
Parameters
- computer System.String
- Target computer name or IP.
- namespace System.String
- CIM namespace (e.g., root/cimv2 or root\\cimv2).
- query System.String
- WQL query text.
- options ComputerX.Wmi.WmiOptions
- CIM/WMI options including credentials and timeout.
- ct System.Threading.CancellationToken
- Cancellation token.
QueryAsync 2 overloads
public virtual Task<IReadOnlyList<WmiRow>> QueryAsync(String computer, String namespace, String query, WmiOptions options, CancellationToken ct = null) #Returns:
Task<IReadOnlyList<WmiRow>>Executes a CIM query asynchronously and returns all rows; optionally times out.
Parameters
- computer System.String
- Target computer name or IP.
- namespace System.String
- CIM namespace (e.g., root/cimv2 or root\\cimv2).
- query System.String
- WQL query text.
- timeout System.Nullable{System.TimeSpan} = null
- Optional per-query timeout.
- ct System.Threading.CancellationToken = null
- Cancellation token.
QueryAsync(System.String computer, System.String namespace, System.String query, ComputerX.Wmi.WmiOptions options, System.Threading.CancellationToken ct) #Executes a CIM query asynchronously with options (credentials/transport) and returns rows.
Parameters
- computer System.String
- Target computer name or IP.
- namespace System.String
- CIM namespace (e.g., root/cimv2 or root\\cimv2).
- query System.String
- WQL query text.
- options ComputerX.Wmi.WmiOptions
- CIM/WMI options including credentials and timeout.
- ct System.Threading.CancellationToken
- Cancellation token.
public virtual T QuerySingle<T>(String computer, String namespace, String query, Func<WmiRow, T> projector, WmiOptions options, CancellationToken ct = null) #Returns:
TType Parameters
- T
Parameters
- computer String
- namespace String
- query String
- projector Func<WmiRow, T>
- timeout Nullable<TimeSpan> = null
- ct CancellationToken = null
public virtual Task<T> QuerySingleAsync<T>(String computer, String namespace, String query, Func<WmiRow, T> projector, WmiOptions options, CancellationToken ct = null) #Returns:
Task<T>Type Parameters
- T
Parameters
- computer String
- namespace String
- query String
- projector Func<WmiRow, T>
- timeout Nullable<TimeSpan> = null
- ct CancellationToken = null
QuerySingleAsync``1 2 overloads
QuerySingleAsync``1(System.String computer, System.String namespace, System.String query, System.Func{ComputerX.Wmi.WmiRow,``0} projector, System.Nullable{System.TimeSpan} timeout, System.Threading.CancellationToken ct) #Executes a CIM query asynchronously and projects the first row (if any).
Type Parameters
- T
- Result type produced by the projector.
Parameters
- computer System.String
- Target computer name or IP.
- namespace System.String
- CIM namespace (e.g., root/cimv2 or root\\cimv2).
- query System.String
- WQL query text.
- projector System.Func{ComputerX.Wmi.WmiRow,``0}
- Projection function for the first row.
- timeout System.Nullable{System.TimeSpan}
- Optional per-query timeout.
- ct System.Threading.CancellationToken
- Cancellation token.
QuerySingleAsync``1(System.String computer, System.String namespace, System.String query, System.Func{ComputerX.Wmi.WmiRow,``0} projector, ComputerX.Wmi.WmiOptions options, System.Threading.CancellationToken ct) #Executes a CIM query asynchronously with options and projects the first row (if any).
Type Parameters
- T
- Result type produced by the projector.
Parameters
- computer System.String
- Target computer name or IP.
- namespace System.String
- CIM namespace (e.g., root/cimv2 or root\\cimv2).
- query System.String
- WQL query text.
- projector System.Func{ComputerX.Wmi.WmiRow,``0}
- Projection function for the first row.
- options ComputerX.Wmi.WmiOptions
- CIM/WMI options including credentials and timeout.
- ct System.Threading.CancellationToken
- Cancellation token.
QuerySingle``1 2 overloads
QuerySingle``1(System.String computer, System.String namespace, System.String query, System.Func{ComputerX.Wmi.WmiRow,``0} projector, System.Nullable{System.TimeSpan} timeout, System.Threading.CancellationToken ct) #Executes a CIM query and projects the first row (if any).
Type Parameters
- T
- Result type produced by the projector.
Parameters
- computer System.String
- Target computer name or IP.
- namespace System.String
- CIM namespace (e.g., root/cimv2 or root\\cimv2).
- query System.String
- WQL query text.
- projector System.Func{ComputerX.Wmi.WmiRow,``0}
- Projection function for the first row.
- timeout System.Nullable{System.TimeSpan}
- Optional per-query timeout.
- ct System.Threading.CancellationToken
- Cancellation token.
QuerySingle``1(System.String computer, System.String namespace, System.String query, System.Func{ComputerX.Wmi.WmiRow,``0} projector, ComputerX.Wmi.WmiOptions options, System.Threading.CancellationToken ct) #Executes a CIM query with options and projects the first row (if any).
Type Parameters
- T
- Result type produced by the projector.
Parameters
- computer System.String
- Target computer name or IP.
- namespace System.String
- CIM namespace (e.g., root/cimv2 or root\\cimv2).
- query System.String
- WQL query text.
- projector System.Func{ComputerX.Wmi.WmiRow,``0}
- Projection function for the first row.
- options ComputerX.Wmi.WmiOptions
- CIM/WMI options including credentials and timeout.
- ct System.Threading.CancellationToken
- Cancellation token.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object