public void AddIpAddress() { var defaultIp = _manager.GetIpList("192.168.88.105").First(); defaultIp.Address = "192.168.88.208"; // rewrite ip _manager.AddIpAddress(defaultIp); }
public string Post(IPDescriptor value) { Trace.WriteLine("Got add request"); var success = ValidateValue(value); if (success) { try { success = _networkManager.AddIpAddress(value); } catch (Exception e) { Trace.WriteLine(e.GetBaseException().ToString()); success = false; } } return(success ? "ok" : "fail"); }