public override void Initialize(MQMessage message) { base.type = message.ReadInt4(); base.strucLength = message.ReadInt4(); base.parameter = message.ReadInt4(); this.value = message.ReadInt4(); }
internal override sealed void Initialize(MQMessage message) { Type = message.ReadInt4(); StrucLength = message.ReadInt4(); Parameter = message.ReadInt4(); _value = message.ReadInt4(); }
protected MQMessage[] Send(int command, PCFParameter[] parameters) { if (parameters == null) { throw new Exception("Must specify parameters!"); } MQQueue queue = this.qMgr.AccessQueue("SYSTEM.DEFAULT.MODEL.QUEUE", 0x2021); MQMessage message = new MQMessage(); message.ReplyToQueueName = queue.Name; message.MessageType = 1; message.Feedback = 0; message.Format = "MQADMIN "; message.Report = 0; MQCFH.Write(message, command, parameters.Length); for (int i = 0; i < parameters.Length; i++) { parameters[i].Write(message); } MQQueue queue2 = this.qMgr.AccessQueue(this.qMgr.CommandInputQueueName, 0x2030); MQPutMessageOptions pmo = new MQPutMessageOptions(); pmo.Options = 0x40; queue2.Put(message, pmo); MQGetMessageOptions gmo = new MQGetMessageOptions(); gmo.Options = 0x2001; gmo.WaitInterval = this.waitInterval; gmo.MatchOptions = 2; ArrayList list = new ArrayList(); MQMessage message2 = null; int compCode = 0; int reason = 0; int num4 = 1; do { message2 = new MQMessage(); message2.CorrelationId = message.MessageId; queue.Get(message2, gmo); message2.SkipBytes(20); num4 = message2.ReadInt4(); compCode = message2.ReadInt4(); reason = message2.ReadInt4(); message2.Seek(0); if (compCode != 0) { throw new PCFException(compCode, reason); } list.Add(message2); }while (num4 == 0); queue2.Close(); queue.Close(); return((MQMessage[])list.ToArray(typeof(MQMessage))); }
internal override sealed void Initialize(MQMessage message) { base.Type = message.ReadInt4(); base.StrucLength = message.ReadInt4(); base.Parameter = message.ReadInt4(); this.stringLength = message.ReadInt4(); this.byteVal = message.ReadBytes(this.stringLength); int padding = (4 - ((Cmqcfc.MqcfbsStrucLengthFixed + this.stringLength) % 4)) % 4; message.SkipBytes(padding); }
internal override sealed void Initialize(MQMessage message) { Type = message.ReadInt4(); StrucLength = message.ReadInt4(); Parameter = message.ReadInt4(); CodedCharSetId = message.ReadInt4(); _stringLength = message.ReadInt4(); _stringval = message.ReadString(_stringLength); // Encoding.ASCII.GetString(message.ReadBytes(_stringLength), 0, _stringLength); var padding = (4 - ((Cmqcfc.MqcfstStrucLengthFixed + _stringLength) % 4)) % 4; message.SkipBytes(padding); }
public override void Initialize(MQMessage message) { base.type = message.ReadInt4(); base.strucLength = message.ReadInt4(); base.parameter = message.ReadInt4(); this.codedCharSetId = message.ReadInt4(); this.stringLength = message.ReadInt4(); this.stringval = Encoding.ASCII.GetString(message.Read(this.stringLength), 0, this.stringLength); int n = (4 - ((20 + this.stringLength) % 4)) % 4; message.SkipBytes(n); }
internal override bool IsLast(MQMessage message) { message.SkipBytes(20); var end = message.ReadInt4() != 0; var compCode = message.ReadInt4(); var reason = message.ReadInt4(); message.Seek(0); if (compCode != 0) { throw new PcfException(compCode, reason); } return(end); }
internal override sealed void Initialize(MQMessage message) { Type = message.ReadInt4(); StrucLength = message.ReadInt4(); Parameter = message.ReadInt4(); _count = message.ReadInt4(); _values = new int[_count]; for (var i = 0; i < _count; i++) { _values[i] = message.ReadInt4(); } var n = (4 - (StrucLength % 4)) % 4; message.SkipBytes(n); }
public override void Initialize(MQMessage message) { base.type = message.ReadInt4(); base.strucLength = message.ReadInt4(); base.parameter = message.ReadInt4(); this.count = message.ReadInt4(); this.values = new int[this.count]; for (int i = 0; i < this.count; i++) { this.values[i] = message.ReadInt4(); } int n = (4 - (base.strucLength % 4)) % 4; message.SkipBytes(n); }
public override void Initialize(MQMessage message) { base.type = message.ReadInt4(); base.strucLength = message.ReadInt4(); this.version = message.ReadInt4(); this.command = message.ReadInt4(); this.msgSeqNumber = message.ReadInt4(); this.control = message.ReadInt4(); this.compCode = message.ReadInt4(); this.reason = message.ReadInt4(); this.parameterCount = message.ReadInt4(); }
internal override sealed void Initialize(MQMessage message) { Type = message.ReadInt4(); StrucLength = message.ReadInt4(); Version = message.ReadInt4(); Command = message.ReadInt4(); MsgSeqNumber = message.ReadInt4(); Control = message.ReadInt4(); CompCode = message.ReadInt4(); Reason = message.ReadInt4(); ParameterCount = message.ReadInt4(); }
public static PCFParameter NextParameter(MQMessage message) { int num = message.ReadInt4(); message.DataOffset -= 4; switch (num) { case 3: return(new MQCFIN(message)); case 4: return(new MQCFST(message)); case 5: return(new MQCFIL(message)); case 6: return(new MQCFSL(message)); } throw new Exception("Unknown type"); }
public override void Initialize(MQMessage message) { base.type = message.ReadInt4(); base.strucLength = message.ReadInt4(); base.parameter = message.ReadInt4(); this.codedCharSetId = message.ReadInt4(); this.count = message.ReadInt4(); this.stringLength = message.ReadInt4(); this.strings = new string[this.count]; for (int i = 0; i < this.count; i++) { this.strings[i] = Encoding.ASCII.GetString(message.Read(this.stringLength), 0, this.stringLength); } int n = (4 - (base.strucLength % 4)) % 4; message.SkipBytes(n); }
internal override sealed void Initialize(MQMessage message) { Type = message.ReadInt4(); StrucLength = message.ReadInt4(); Parameter = message.ReadInt4(); CodedCharSetId = message.ReadInt4(); _count = message.ReadInt4(); _stringLength = message.ReadInt4(); _strings = new string[_count]; for (var i = 0; i < _count; i++) { _strings[i] = message.ReadString(_stringLength); // Encoding.ASCII.GetString(message.ReadBytes(_stringLength), 0, _stringLength); } var padding = (4 - (StrucLength % 4)) % 4; message.SkipBytes(padding); }
public static PcfParameter NextParameter(MQMessage message) { var num = message.ReadInt4(); message.DataOffset -= 4; switch (num) { case Cmqcfc.MqcftInteger: return(new Mqcfin(message)); case Cmqcfc.MqcftString: return(new Mqcfst(message)); case Cmqcfc.MqcftIntegerList: return(new Mqcfil(message)); case Cmqcfc.MqcftStringList: return(new Mqcfsl(message)); case Cmqcfc.MqcftByteString: return(new Mqcfbs(message)); } throw new ArgumentException("Unknown type"); }