Пример #1
0
            static public T Stream2Obj <T>(Stream s, IFactory f = null) where T : IMarshallable, new()
            {
                var reader = new MsgPackDataReader(s);
                var obj    = new T();

                Sync(SyncContext.NewReader(reader, f), ref obj);
                return(obj);
            }
Пример #2
0
            static public void Stream2Obj <T>(Stream s, T obj, IFactory f = null) where T : IMarshallable
            {
                var reader = new MsgPackDataReader(s);

                Sync(SyncContext.NewReader(reader, f), ref obj);
            }