예제 #1
0
        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);
                }
            }
        }
예제 #2
0
        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();
                }
            }
        }
예제 #3
0
        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();
        }