示例#1
0
        public MyHugeResponseObjectSegment(DirtyTracker dirtyTracker, ArraySegment <byte> originalBytes)
        {
            var __array = originalBytes.Array;

            this.__originalBytes   = originalBytes;
            this.__tracker         = dirtyTracker = dirtyTracker.CreateChild();
            this.__binaryLastIndex = BinaryUtil.ReadInt32(ref __array, originalBytes.Offset + 4);

            this.__extraFixedBytes = ObjectSegmentHelper.CreateExtraFixedBytes(this.__binaryLastIndex, 6, __elementSizes);

            _z    = new CacheSegment <TTypeResolver, string>(__tracker, ObjectSegmentHelper.GetSegment(originalBytes, 2, __binaryLastIndex, __tracker));
            _soho = new CacheSegment <TTypeResolver, global::SharedLibrary.MyStructResponse>(__tracker, ObjectSegmentHelper.GetSegment(originalBytes, 4, __binaryLastIndex, __tracker));
            _req  = ObjectSegmentHelper.DeserializeSegment <TTypeResolver, global::SharedLibrary.MyRequest>(originalBytes, 6, __binaryLastIndex, __tracker);
        }
        public CustomMeshObjectSegment(global::ZeroFormatter.DirtyTracker dirtyTracker, ArraySegment <byte> originalBytes)
        {
            var __array = originalBytes.Array;

            this.__originalBytes   = originalBytes;
            this.__tracker         = dirtyTracker = dirtyTracker.CreateChild();
            this.__binaryLastIndex = BinaryUtil.ReadInt32(ref __array, originalBytes.Offset + 4);

            this.__extraFixedBytes = ObjectSegmentHelper.CreateExtraFixedBytes(this.__binaryLastIndex, 3, __elementSizes);

            _vertices = ObjectSegmentHelper.DeserializeSegment <TTypeResolver, global::System.Collections.Generic.IList <float[]> >(originalBytes, 0, __binaryLastIndex, __tracker);
            _uvs      = ObjectSegmentHelper.DeserializeSegment <TTypeResolver, global::System.Collections.Generic.IList <float[]> >(originalBytes, 1, __binaryLastIndex, __tracker);
            _normals  = ObjectSegmentHelper.DeserializeSegment <TTypeResolver, global::System.Collections.Generic.IList <float[]> >(originalBytes, 2, __binaryLastIndex, __tracker);
            _faces    = ObjectSegmentHelper.DeserializeSegment <TTypeResolver, global::System.Collections.Generic.IList <int[]> >(originalBytes, 3, __binaryLastIndex, __tracker);
        }