NetworkAdapterInfoProvider Class |
Namespace: Xcalibur.WMI.Hardware.Network
The NetworkAdapterInfoProvider type exposes the following members.
Name | Description | |
---|---|---|
NetworkAdapterInfoProvider |
Initializes a new instance of the
NetworkAdapterInfoProvider class.
|
Name | Description | |
---|---|---|
Id |
Gets or sets the id.
(Inherited from WmiModelBaseTData, TDataModel.) | |
Query |
Gets or sets the query.
(Inherited from WmiPullModelBaseTData, TDataModel.) | |
QueryBuilder |
Gets or sets the query items.
Note: This is only used for Pull implementations.
(Inherited from WmiModelBaseTData, TDataModel.) | |
Results |
List of results from GetResults or GetResultsAsync.
This has been made public in the event that an alternate method will be used
outside of this class.
(Inherited from WmiModelBaseTData, TDataModel.) | |
Searcher |
The ManagementSeacherObject affiliates with the specific WMI class used when pulling data.
(Inherited from WmiPullModelBaseTData, TDataModel.) | |
WmiClass |
WMI class that corresponds to the searcher.
(Inherited from WmiModelBaseTData, TDataModel.) |
Name | Description | |
---|---|---|
Dispose |
Implement IDisposable.
Do not make this method virtual.
A derived class should not be able to override this method.
(Inherited from WmiModelBaseTData, TDataModel.) | |
Dispose(Boolean) |
Dispose(bool disposing) executes in two distinct scenarios.
If disposing equals true, the method has been called directly
or indirectly by a user's code. Managed and unmanaged resources
can be disposed.
If disposing equals false, the method has been called by the
runtime from inside the finalizer and you should not reference
other objects. Only unmanaged resources can be disposed.
(Inherited from WmiPullModelBaseTData, TDataModel.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Get |
Gets the specified object.
(Inherited from WmiModelBaseTData, TDataModel.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Pull |
Gets the results.
(Inherited from WmiPullModelBaseTData, TDataModel.) | |
Refresh |
Performs a Get operation on the current data based on a user specified override.
(Inherited from WmiPullModelBaseTData, TDataModel.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Update(Int32) |
Updates this instance.
(Inherited from WmiPullModelBaseTData, TDataModel.) | |
UpdateTConfig(TConfig, Int32) |
Updates the specified configuration.
(Inherited from WmiModelBaseTData, TDataModel.) |
1// Main 2private static void Main() 3{ 4 // Make a connection to the local machine 5 const string computer = "."; 6 var managementScope = new ManagementScope($@"\\{computer}\root\cimv2", new ConnectionOptions 7 { 8 Impersonation = ImpersonationLevel.Impersonate, 9 Authentication = AuthenticationLevel.Connect 10 }); 11 managementScope.Connect(); 12 13 // Network Adapter Info Provider 14 var provider = new NetworkAdapterInfoProvider(managementScope); 15 16 // Fetch data 17 provider.Refresh(); 18 19 // Print 20 foreach (var info in provider.Results) 21 { 22 Console.WriteLine($"{info.Name}"); 23 Console.WriteLine($"{info.MacAddress}"); 24 Console.WriteLine($"{info.Speed}"); 25 Console.WriteLine($"{info.Availability}"); 26 Console.WriteLine(""); 27 } 28 29 // Read 30 Console.Read(); 31} 32 33/* Results: 34 * 35 * Intel(R) Ethernet Connection (2) I219-V 36 * 14:DD:A9:EE:B0:1D 37 * 1000000000 38 * Running 39 * 40 */