/// <inheritdoc />
        public int Deserialize(byte[] buffer, ref int index)
        {
            IDeserializerContracts.Deserialize(buffer, index);
            Contracts.Requires.That((buffer.Length - index).IsDivisibleBy(this.enumerableValue.SerializedLength));

            return((buffer.Length - index) / this.enumerableValue.SerializedLength);
        }
예제 #2
0
        /// <inheritdoc />
        public TValue Deserialize(byte[] buffer, ref int index)
        {
            IDeserializerContracts.Deserialize(buffer, index);

            TKey key = this.keySerializer.Deserialize(buffer, ref index);

            return(this.serializers[key].Deserialize(buffer, ref index));
        }
예제 #3
0
        /// <inheritdoc />
        public TValue Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            T part = this.serialzier.Deserialize(buffer);

            return(this.ComposeValue(part));
        }
예제 #4
0
        /// <inheritdoc />
        public TValue Deserialize(byte[] buffer, ref int index)
        {
            IDeserializerContracts.Deserialize(buffer, index);

            T part = this.serialzier.Deserialize(buffer, ref index);

            return(this.ComposeValue(part));
        }
예제 #5
0
        /// <inheritdoc />
        public TValue Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            TKey key = this.keySerializer.Deserialize(buffer);

            return(this.serializers[key].Deserialize(buffer));
        }
        /// <inheritdoc />
        public TValue Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            T1 part1 = this.serialzierT1.Deserialize(buffer);
            T2 part2 = this.serialzierT2.Deserialize(buffer);

            return(this.ComposeValue(part1, part2));
        }
        /// <inheritdoc />
        public TValue Deserialize(byte[] buffer, ref int index)
        {
            IDeserializerContracts.Deserialize(buffer, index);

            T1 part1 = this.serialzierT1.Deserialize(buffer, ref index);
            T2 part2 = this.serialzierT2.Deserialize(buffer, ref index);

            return(this.ComposeValue(part1, part2));
        }
        /// <inheritdoc />
        public TIndexable Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            TIndex lowerBounds = this.LowerBoundsSerializer.Deserialize(buffer);
            TIndex dimensions  = this.DimensionsSerializer.Deserialize(buffer);

            return(this.DeserializeValues(lowerBounds, dimensions, buffer));
        }
        /// <inheritdoc />
        public TIndexable Deserialize(byte[] buffer, ref int index)
        {
            IDeserializerContracts.Deserialize(buffer, index);

            TIndex lowerBounds = this.LowerBoundsSerializer.Deserialize(buffer, ref index);
            TIndex dimensions  = this.DimensionsSerializer.Deserialize(buffer, ref index);

            return(this.DeserializeValues(lowerBounds, dimensions, buffer, ref index));
        }
        /// <inheritdoc />
        public int Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);
            Contracts.Requires.That(buffer.TotalRemainingLength.HasValue);
            Contracts.Requires.That(buffer.TotalRemainingLength.Value.IsDivisibleBy(
                                        this.enumerableValue.SerializedLength));

            return(buffer.TotalRemainingLength.Value / this.enumerableValue.SerializedLength);
        }
예제 #11
0
        /// <inheritdoc />
        public TValue Deserialize(byte[] buffer, ref int index)
        {
            IDeserializerContracts.Deserialize(buffer, index);

            T1 part1 = this.serialzierT1.Deserialize(buffer, ref index);
            T2 part2 = this.serialzierT2.Deserialize(buffer, ref index);
            T3 part3 = this.serialzierT3.Deserialize(buffer, ref index);
            T4 part4 = this.serialzierT4.Deserialize(buffer, ref index);
            T5 part5 = this.serialzierT5.Deserialize(buffer, ref index);

            return(this.ComposeValue(part1, part2, part3, part4, part5));
        }
예제 #12
0
        /// <inheritdoc />
        public TValue Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            T1 part1 = this.serialzierT1.Deserialize(buffer);
            T2 part2 = this.serialzierT2.Deserialize(buffer);
            T3 part3 = this.serialzierT3.Deserialize(buffer);
            T4 part4 = this.serialzierT4.Deserialize(buffer);
            T5 part5 = this.serialzierT5.Deserialize(buffer);

            return(this.ComposeValue(part1, part2, part3, part4, part5));
        }
예제 #13
0
		/// <inheritdoc />
		public char Deserialize(IBufferedArray buffer)
		{
			IDeserializerContracts.Deserialize(buffer);

			return buffer.NextChar(this.converter);
		}
        /// <inheritdoc />
        public T Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            return(this.ConstantValue);
        }
예제 #15
0
        /// <inheritdoc />
        public ulong Deserialize(byte[] buffer, ref int index)
        {
            IDeserializerContracts.Deserialize(buffer, index);

            return(this.converter.ToULong(buffer, ref index));
        }
        /// <inheritdoc />
        public TValue Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            return(this.converter.Convert(this.serializer.Deserialize(buffer)));
        }
예제 #17
0
        /// <inheritdoc />
        public bool Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            return(buffer.NextBool(this.converter));
        }
        /// <inheritdoc />
        public T Deserialize(byte[] buffer, ref int index)
        {
            IDeserializerContracts.Deserialize(buffer, index);

            return(this.ConstantValue);
        }
        /// <inheritdoc />
        public TEnumerable Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            return(this.DeserializeValues(this.CountSerializer.Deserialize(buffer), buffer));
        }
        /// <inheritdoc />
        public TEnumerable Deserialize(byte[] buffer, ref int index)
        {
            IDeserializerContracts.Deserialize(buffer, index);

            return(this.DeserializeValues(this.CountSerializer.Deserialize(buffer, ref index), buffer, ref index));
        }
예제 #21
0
        /// <inheritdoc />
        public ulong Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            return(buffer.NextULong(this.converter));
        }
예제 #22
0
        /// <inheritdoc />
        public int Deserialize(byte[] buffer, ref int index)
        {
            IDeserializerContracts.Deserialize(buffer, index);

            return(this.converter.ToInt(buffer, ref index));
        }
        /// <inheritdoc />
        public TValue Deserialize(byte[] buffer, ref int index)
        {
            IDeserializerContracts.Deserialize(buffer, index);

            return(this.converter.Convert(this.serializer.Deserialize(buffer, ref index)));
        }
예제 #24
0
        /// <inheritdoc />
        public int Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            return(buffer.NextInt(this.converter));
        }
예제 #25
0
        /// <inheritdoc />
        public decimal Deserialize(byte[] buffer, ref int index)
        {
            IDeserializerContracts.Deserialize(buffer, index);

            return(this.converter.ToDecimal(buffer, ref index));
        }
예제 #26
0
		/// <inheritdoc />
		public char Deserialize(byte[] buffer, ref int index)
		{
			IDeserializerContracts.Deserialize(buffer, index);

			return this.converter.ToChar(buffer, ref index);
		}
예제 #27
0
        /// <inheritdoc />
        public decimal Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            return(buffer.NextDecimal(this.converter));
        }
예제 #28
0
        /// <inheritdoc />
        public double Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            return(buffer.NextDouble(this.converter));
        }
예제 #29
0
        /// <inheritdoc />
        public sbyte Deserialize(IBufferedArray buffer)
        {
            IDeserializerContracts.Deserialize(buffer);

            return(buffer.NextSByte(this.converter));
        }