예제 #1
0
 public Task ConfigureNetworkInterfaceAsync(NetworkInterfaceConfig config)
 {
     return(Task.Run(() => ConfigureNetworkInterface(config)));
 }
예제 #2
0
        public static void AddIPAddressToNetworkInterface(NetworkInterfaceConfig config)
        {
            var command = @"netsh interface ipv4 add address '" + config.Name + @"' " + config.IPAddress + @" " + config.Subnetmask;

            PowerShellHelper.ExecuteCommand(command, true);
        }
예제 #3
0
        public static void RemoveIPAddressFromNetworkInterface(NetworkInterfaceConfig config)
        {
            var command = @"netsh interface ipv4 delete address '" + config.Name + @"' " + config.IPAddress;

            PowerShellHelper.ExecuteCommand(command, true);
        }
예제 #4
0
 public static Task AddIPAddressToNetworkInterfaceAsync(NetworkInterfaceConfig config)
 {
     return(Task.Run(() => AddIPAddressToNetworkInterface(config)));
 }
예제 #5
0
 public static Task RemoveIPAddressFromNetworkInterfaceAsync(NetworkInterfaceConfig config)
 {
     return(Task.Run(() => RemoveIPAddressFromNetworkInterface(config)));
 }