Exemple #1
0
        public ContentModel.ISerializer Get(TypeInfo parameter)
        {
            var entry  = _entries.Get(parameter);
            var reader = _contents.Create(parameter, new CollectionInnerContentHandler(entry, _contents));
            var result = new ContentModel.Serializer(reader, new EnumerableWriter(_enumerators, entry).Adapt());

            return(result);
        }
        public ISerializer Get(TypeInfo parameter)
        {
            var members = _instances.Get(parameter);
            var entry   = _entries.Get(parameter);

            var handler = new CollectionWithMembersInnerContentHandler(new MemberInnerContentHandler(_instances.Get(parameter),
                                                                                                     _contents, _contents),
                                                                       new CollectionInnerContentHandler(entry, _contents));
            var reader = _contents.Create(parameter, handler);
            var writer =
                new MemberedCollectionWriter(new MemberListWriter(members), new EnumerableWriter(_enumerators, entry).Adapt());
            var result = new Serializer(reader, writer);

            return(result);
        }