private void WriteIPConfiguration(IpAddress ipAddress, NetworkInterface networkInterface) { var interfaceDto = InterfaceDtoUtil.ConvertToDto(networkInterface.Index, _interfaces); var ipConfigurationDto = new IpConfigurationDto { Address = ipAddress.Address, SubnetMask = ipAddress.Netmask, Interface = interfaceDto }; WriteObject(ipConfigurationDto); }
private void WriteRoute(Route route) { RouteDto routeDto = new RouteDto { Destination = route.Destination, Gateway = route.Gateway, Interface = InterfaceDtoUtil.ConvertToDto(route.Nic, _interfaces), Protocol = route.Protocol, RoutingTable = route.RoutingTable, Scope = route.Scope, Priority = route.Priority }; WriteObject(routeDto); }