예제 #1
0
파일: marshall.cs 프로젝트: bitdotgames/bhl
            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
파일: marshall.cs 프로젝트: bitdotgames/bhl
            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);
            }