예제 #1
0
 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";
     }
 }
예제 #2
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;
            }
        }
예제 #3
0
 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";
     }
 }