Example #1
0
        private void SetFieldValue(byte fieldId, byte[] value)
        {
            switch (fieldId)
            {
            case 0:
            {
                this.ApiVersion = (int)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.Int32, value);
                return;
            }

            case 1:
            {
                this.OperationTimeout = new TimeSpan?((TimeSpan)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.TimeSpan, value));
                return;
            }

            case 2:
            {
                this.ServerTimeout = new TimeSpan?((TimeSpan)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.TimeSpan, value));
                return;
            }

            case 3:
            {
                this.MessageId = (string)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.String, value);
                return;
            }

            case 4:
            {
                this.SessionId = (string)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.String, value);
                return;
            }

            case 5:
            {
                this.LockToken = new Guid?((Guid)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.Guid, value));
                return;
            }

            case 6:
            {
                this.PartitionKey = (string)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.String, value);
                return;
            }

            case 7:
            {
                this.ViaPartitionKey = (string)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.String, value);
                return;
            }

            case 8:
            {
                this.PartitionId = new short?((short)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.Int16, value));
                return;
            }

            case 9:
            {
                this.SequenceNumber = new long?((long)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.Int64, value));
                return;
            }

            case 10:
            {
                this.Skip = new int?((int)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.Int32, value));
                return;
            }

            case 11:
            {
                this.Top = new int?((int)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.Int32, value));
                return;
            }

            case 12:
            {
                this.LastUpdatedTime = new DateTime?((DateTime)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.DateTime, value));
                return;
            }

            case 13:
            {
                this.MessageCount = new int?((int)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.Int32, value));
                return;
            }

            case 14:
            {
                this.TransactionId = (string)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.String, value);
                return;
            }

            case 15:
            {
                this.Destination = (string)SerializationUtilities.ConvertByteArrayToNativeValue(this.version, PropertyValueType.String, value);
                return;
            }

            default:
            {
                return;
            }
            }
        }