public static FromString ( string value ) : |
||
value | string |
/// The |
Результат |
/// <inheritdoc/> public IEnumerable <ForwardData> ListReverse(DeviceData device) { this.EnsureDevice(device); using (IAdbSocket socket = this.adbSocketFactory(this.EndPoint)) { socket.SendAdbRequest("host:transport:" + device.Serial); var response = socket.ReadAdbResponse(); if (!response.Okay) { return(null); } socket.SendAdbRequest($"reverse:list-forward"); response = socket.ReadAdbResponse(); if (!response.Okay) { return(null); } var data = socket.ReadString(); var parts = data.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); return(parts.Select(p => ForwardData.FromString(p))); } }
/// <include file='IAdbClient.xml' path='/IAdbClient/ListForward/*'/> public IEnumerable <ForwardData> ListForward(DeviceData device) { using (IAdbSocket socket = Factories.AdbSocketFactory(this.EndPoint)) { socket.SendAdbRequest($"host-serial:{device.Serial}:list-forward"); var response = socket.ReadAdbResponse(); var data = socket.ReadString(); var parts = data.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); return(parts.Select(p => ForwardData.FromString(p))); } }