public async Task ExecuteOnClient() { ReceiveString rs = new ReceiveString(new ReceiveBytes(Transport)); string ser = await rs.AwaitFlowResult(); using (StringReader sr = new StringReader(ser)) { using (JsonReader jr = new JsonTextReader(sr)) { Result = Serializer.Deserialize <T>(jr); } } }
public async Task ExecuteOnClient() { ReceiveString rs = new ReceiveString(new ReceiveBytes(Transport)); string ser = await rs.AwaitFlowResult(); NetworkSelectionResult result; using (StringReader sr = new StringReader(ser)) { using (JsonReader jr = new JsonTextReader(sr)) { result = Serializer.Deserialize <NetworkSelectionResult>(jr); result.FileSystem = FileSystem; result.Serializer = Serializer; result.Transport = Transport; Result = result.AsSelectionResult(); } } }
public async Task ExecuteOnClient() { ReceiveString rs = new ReceiveString(new ReceiveBytes(Transport)); string ser = await rs.AwaitFlowResult(); IEnumerable <NetworkClientEntry> entries; using (StringReader sr = new StringReader(ser)) { using (JsonReader jr = new JsonTextReader(sr)) { entries = Serializer.Deserialize <NetworkClientEntry[]>(jr).Where(x => x != null); } } NetworkClientCollection ncc = Root as NetworkClientCollection; //Parallel.ForEach(entries, nce => { // nce.ParentSetup(ncc); //}); foreach (var nce in entries) { nce.ParentSetup(ncc); } Result = entries.ToArray(); }