Ejemplo n.º 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);
                }
            }
        }
Ejemplo n.º 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();
                }
            }
        }
Ejemplo n.º 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();
        }