public SettingDataVer2ObjectSegment(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, 0, __elementSizes);
        }
Beispiel #2
0
        public MyResponseObjectSegment(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, 1, __elementSizes);

            _Data = new CacheSegment <TTypeResolver, string>(__tracker, ObjectSegmentHelper.GetSegment(originalBytes, 1, __binaryLastIndex, __tracker));
        }
Beispiel #3
0
        public ChatMessageObjectSegment(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, 1, __elementSizes);

            _Sender  = new CacheSegment <TTypeResolver, global::Sandbox.RoomMember>(__tracker, ObjectSegmentHelper.GetSegment(originalBytes, 0, __binaryLastIndex, __tracker));
            _Message = new CacheSegment <TTypeResolver, string>(__tracker, ObjectSegmentHelper.GetSegment(originalBytes, 1, __binaryLastIndex, __tracker));
        }
Beispiel #4
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);
        }
Beispiel #5
0
        public MyClass_ObjectSegment(DirtyTracker dirtyTracker, ArraySegment <byte> originalBytes)
        {
            var __array = originalBytes.Array;
            int __out;

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

            this.__extraFixedBytes = ObjectSegmentHelper.CreateExtraFixedBytes(this.__binaryLastIndex, 4, new[] { 4, 4 }); // embed schemaLastIndex, elementSizeSum = should calcurate

            // Auto Generate Area
            _firstName = new CacheSegment <string>(__tracker, ObjectSegmentHelper.GetSegment(originalBytes, 1, __binaryLastIndex, __tracker));
            _lastName  = new CacheSegment <string>(__tracker, ObjectSegmentHelper.GetSegment(originalBytes, 2, __binaryLastIndex, __tracker));
            _myList    = Formatter <IList <int> > .Default.Deserialize(ref __array, ObjectSegmentHelper.GetOffset(originalBytes, 4, __binaryLastIndex, __tracker), __tracker, out __out);
        }