public static SettleMode SettleType(this Attach attach) { SenderSettleMode value; ReceiverSettleMode receiverSettleMode; if (attach.SndSettleMode.HasValue) { value = (SenderSettleMode)attach.SndSettleMode.Value; } else { value = SenderSettleMode.Mixed; } SenderSettleMode senderSettleMode = value; if (attach.RcvSettleMode.HasValue) { receiverSettleMode = (ReceiverSettleMode)attach.RcvSettleMode.Value; } else { receiverSettleMode = ReceiverSettleMode.First; } ReceiverSettleMode receiverSettleMode1 = receiverSettleMode; if (senderSettleMode == SenderSettleMode.Settled) { return(SettleMode.SettleOnSend); } if (receiverSettleMode1 == ReceiverSettleMode.First) { return(SettleMode.SettleOnReceive); } return(SettleMode.SettleOnDispose); }
internal ReceiverSettleMode GetField(int index, ReceiverSettleMode field, ReceiverSettleMode defaultValue = default(ReceiverSettleMode)) { if ((this.fields & (1 << index)) == 0) { return(defaultValue); } return(field); }
internal override void ReadField(ByteBuffer buffer, int index, byte formatCode) { switch (index) { case 0: this.handle = Encoder.ReadUInt(buffer, formatCode); break; case 1: this.deliveryId = Encoder.ReadUInt(buffer, formatCode); break; case 2: this.deliveryTag = Encoder.ReadBinary(buffer, formatCode); break; case 3: this.messageFormat = Encoder.ReadUInt(buffer, formatCode); break; case 4: this.settled = Encoder.ReadBoolean(buffer, formatCode); break; case 5: this.more = Encoder.ReadBoolean(buffer, formatCode); break; case 6: this.rcvSettleMode = (ReceiverSettleMode)Encoder.ReadUByte(buffer, formatCode); break; case 7: this.state = (DeliveryState)Encoder.ReadObject(buffer, formatCode); break; case 8: this.resume = Encoder.ReadBoolean(buffer, formatCode); break; case 9: this.aborted = Encoder.ReadBoolean(buffer, formatCode); break; case 10: this.batchable = Encoder.ReadBoolean(buffer, formatCode); break; default: Fx.Assert(false, "Invalid field index"); break; } }
public static SettleMode SettleType(this Attach attach) { SenderSettleMode ssm = attach.SndSettleMode.HasValue ? (SenderSettleMode)attach.SndSettleMode.Value : SenderSettleMode.Mixed; ReceiverSettleMode rsm = attach.RcvSettleMode.HasValue ? (ReceiverSettleMode)attach.RcvSettleMode.Value : ReceiverSettleMode.First; if (ssm == SenderSettleMode.Settled) { return(SettleMode.SettleOnSend); } else { if (rsm == ReceiverSettleMode.First) { return(SettleMode.SettleOnReceive); } else { return(SettleMode.SettleOnDispose); } } }
internal void SetField(int index, ref ReceiverSettleMode field, ReceiverSettleMode value) { this.fields |= (1 << index); field = value; }
internal override void ReadField(ByteBuffer buffer, int index, byte formatCode) { switch (index) { case 0: this.linkName = Encoder.ReadString(buffer, formatCode); break; case 1: this.handle = Encoder.ReadUInt(buffer, formatCode); break; case 2: this.role = Encoder.ReadBoolean(buffer, formatCode); break; case 3: this.sndSettleMode = (SenderSettleMode)Encoder.ReadUByte(buffer, formatCode); break; case 4: this.rcvSettleMode = (ReceiverSettleMode)Encoder.ReadUByte(buffer, formatCode); break; case 5: this.source = Encoder.ReadObject(buffer, formatCode); break; case 6: this.target = Encoder.ReadObject(buffer, formatCode); break; case 7: this.unsettled = Encoder.ReadMap(buffer, formatCode); break; case 8: this.incompleteUnsettled = Encoder.ReadBoolean(buffer, formatCode); break; case 9: this.initialDeliveryCount = Encoder.ReadUInt(buffer, formatCode); break; case 10: this.maxMessageSize = Encoder.ReadULong(buffer, formatCode); break; case 11: this.offeredCapabilities = Encoder.ReadObject(buffer, formatCode); break; case 12: this.desiredCapabilities = Encoder.ReadObject(buffer, formatCode); break; case 13: this.properties = Encoder.ReadFields(buffer, formatCode); break; default: Fx.Assert(false, "Invalid field index"); break; } }