public WmiNetworkAdapterQuery(WmiNetworkAdapterType adapterType = WmiNetworkAdapterType.All) : base("Win32_NetworkAdapter", null, COLUMN_NAMES) { if (adapterType == WmiNetworkAdapterType.Physical) { SelectQuery.Condition = "PhysicalAdapter=1"; } else if (adapterType == WmiNetworkAdapterType.Virtual) { SelectQuery.Condition = "PhysicalAdapter=0"; } }
public WmiNetworkAdapterQuery(WmiNetworkAdapterType adapterType = WmiNetworkAdapterType.All) : base("Win32_NetworkAdapter", null, COLUMN_NAMES) { switch (adapterType) { case WmiNetworkAdapterType.Physical: base.SelectQuery.Condition = "PhysicalAdapter=1"; break; case WmiNetworkAdapterType.Virtual: base.SelectQuery.Condition = "PhysicalAdapter=0"; break; } }
public WmiNetworkAdapterQuery(WmiNetworkAdapterType adapterType = WmiNetworkAdapterType.All) : base("Win32_NetworkAdapter", (string)null, WmiNetworkAdapterQuery.COLUMN_NAMES) { if (adapterType == WmiNetworkAdapterType.Physical) { this.SelectQuery.Condition = "PhysicalAdapter=1"; } else { if (adapterType != WmiNetworkAdapterType.Virtual) { return; } this.SelectQuery.Condition = "PhysicalAdapter=0"; } }