toNetworkProtocol method
Implementation
NetworkProtocol toNetworkProtocol() {
switch (this) {
case 'tcp':
return NetworkProtocol.tcp;
case 'all':
return NetworkProtocol.all;
case 'udp':
return NetworkProtocol.udp;
case 'icmp':
return NetworkProtocol.icmp;
}
throw Exception('$this is not known in enum NetworkProtocol');
}