private static NetworkConfiguration GetNetworkConfigurationResult(Response response) { if (response.Command != PrimaryResponseCommand.SystemCommands) { throw new InvalidDataException(string.Format("Expected response of {0} but received {1}.", PrimaryResponseCommand.SystemCommands, response.Command)); } return(NetworkConfiguration.Parse(response.Data)); }