Пример #1
0
 public void Deserialize(IValue rootTable)
 {
     var visitor = new DynamicVisitor(value =>
     {
         this.Value = value;
     });
     rootTable.Visit(visitor);
 }
Пример #2
0
        public void Deserialize(IValue rootTable)
        {
            var visitor = new DynamicVisitor(value =>
            {
                this.Value = value;
            });

            rootTable.Visit(visitor);
        }
Пример #3
0
        public void Deserialize(IEnumerable <IValue> values)
        {
            var valueItems = new List <dynamic>();
            var visitor    = new DynamicVisitor(value =>
            {
                valueItems.Add(value);
            });

            foreach (var value in values)
            {
                value.Visit(visitor);
            }

            this.callback(valueItems);
        }
Пример #4
0
        public void Deserialize(IEnumerable<IValue> values)
        {
            var valueItems = new List<dynamic>();
            var visitor = new DynamicVisitor(value =>
            {
                valueItems.Add(value);
            });

            foreach (var value in values)
            {
                value.Visit(visitor);
            }

            this.callback(valueItems);
        }
Пример #5
0
        public void Deserialize(IDictionary <string, Values.IValue> values)
        {
            var objects = new ExpandoObject();
            IDictionary <string, object> dict = objects;

            foreach (var kvp in values)
            {
                var visitor = new DynamicVisitor(value =>
                {
                    dict.Add(kvp.Key, value);
                });
                kvp.Value.Visit(visitor);
            }

            this.callback(objects);
        }
Пример #6
0
        public void Deserialize(IDictionary<string, Values.IValue> values)
        {
            var objects = new ExpandoObject();
            IDictionary<string, object> dict = objects;

            foreach (var kvp in values)
            {
                var visitor = new DynamicVisitor(value =>
                {
                    dict.Add(kvp.Key, value);
                });
                kvp.Value.Visit(visitor);
            }

            this.callback(objects);
        }