public MQSPIPutInOut(int version) { base.TrConstructor("%Z% %W% %I% %E% %U%", new object[] { version }); this.spiPutInOutHdr = new SPIPUTINOUTHDR(); this.spiPutInOutHdr.ID = rfpVB_ID_PUT_INOUT; this.Version = version; this.md = null; this.pmo = null; }
public void PutReportMessage(MQMessage message, MQPutMessageOptions putMessageOptions) { uint method = 0x22d; this.TrEntry(method, new object[] { message, putMessageOptions }); int compCode = 0; int reason = 0; try { if (message == null) { base.throwNewMQException(2, 0x7ea); } if (putMessageOptions == null) { base.throwNewMQException(2, 0x87d); } MQMessage newMsg = new MQMessage(); if ((putMessageOptions.Options & 0x800000) != 0) { newMsg = this.CopyMDFromOldMsgIntoReportMsg(message, newMsg, putMessageOptions.Options); putMessageOptions.Options &= -8388609; } IEnumerator propertyNames = message.GetPropertyNames("%"); MQPropertyDescriptor pd = new MQPropertyDescriptor(); while (propertyNames.MoveNext()) { string name = propertyNames.Current.ToString(); object objectProperty = message.GetObjectProperty(name, pd); if (this.ValidToCopy(pd.CopyOptions, 0x10)) { newMsg.SetObjectProperty(name, pd, objectProperty); } } base.Put(newMsg, putMessageOptions); } catch (MQException exception) { compCode = exception.CompCode; reason = exception.Reason; throw exception; } finally { base.unsafe_compCode = compCode; base.unsafe_reason = reason; base.TrExit(method); } }
public void Put(MQMessage message, MQPutMessageOptions pmo) { uint method = 0x7d; this.TrEntry(method, new object[] { message, pmo }); int options = 0; int pCompCode = 0; int pReason = 0; try { if (message == null) { base.throwNewMQException(2, 0x7ea); } if (pmo == null) { base.throwNewMQException(2, 0x87d); } pmo.ValidateOptions(); options = pmo.Options; if ((pmo.Options & 6) == 0) { base.TrText(method, "Setting explicit NO_SYNCPOINT"); pmo.Options |= 4; } if ((Transaction.Current != null) && !base.qMgr.IsXAEnabled) { base.qMgr.IsXAEnabled = true; } byte[] src = message.GetBuffer(); this.tempMsgBuffer = new byte[src.Length]; Buffer.BlockCopy(src, 0, this.tempMsgBuffer, 0, src.Length); int characterSet = message.CharacterSet; int encoding = message.Encoding; string format = message.Format; this.PerformMsgProcessgingBeforePut(ref message); src = message.GetBuffer(); if (!base.qMgr.IsHconnValid) { base.throwNewMQException(2, 0x7e2); } base.qMgr.nmqiConnector.MQPUT(base.qMgr.hConn, base.hObj, message.md, pmo, src.Length, src, out pCompCode, out pReason); if (pCompCode == 0) { this.PerformMsgProcessingAfterPut(ref message, this.tempMsgBuffer, characterSet, encoding, format); } if (pCompCode != 0) { base.qMgr.CheckHConnHealth(pReason); base.throwNewMQException(pCompCode, pReason); } } catch (MQException exception) { pCompCode = exception.CompCode; pReason = exception.Reason; throw exception; } catch (Exception exception2) { base.TrException(method, exception2); pCompCode = 2; pReason = 0x893; throw exception2; } finally { pmo.Options = options; base.unsafe_compCode = pCompCode; base.unsafe_reason = pReason; base.TrExit(method); } }
protected void Put(MQMessage message, MQPutMessageOptions pmo, int spiOptions) { uint method = 0x227; this.TrEntry(method, new object[] { message, pmo, spiOptions }); int options = 0; bool flag = false; byte[] src = null; int compCode = 0; int reason = 0; try { MQSPIPutOpts spipo = null; if (message == null) { base.throwNewMQException(2, 0x7ea); } if (pmo == null) { base.throwNewMQException(2, 0x87d); } spipo = new MQSPIPutOpts(spiOptions); options = pmo.Options; flag = true; if ((pmo.Options & 6) == 0) { pmo.Options |= 4; } src = message.GetBuffer(); base.tempMsgBuffer = new byte[src.Length]; Buffer.BlockCopy(src, 0, base.tempMsgBuffer, 0, src.Length); int characterSet = message.CharacterSet; int encoding = message.Encoding; string format = message.Format; base.PerformMsgProcessgingBeforePut(ref message); src = message.GetBuffer(); ((NmqiSP)base.qMgr.nmqiConnector).SPIPut(base.qMgr.hConn, base.objectHandle.HOBJ, ref message.md, ref pmo, ref spipo, src.Length, src, out compCode, out reason); if (compCode == 0) { base.PerformMsgProcessingAfterPut(ref message, base.tempMsgBuffer, characterSet, encoding, format); } if (compCode != 0) { base.qMgr.CheckHConnHealth(reason); base.throwNewMQException(compCode, reason); } } catch (MQException exception) { compCode = exception.CompCode; reason = exception.Reason; throw exception; } finally { if (flag) { pmo.Options = options; } base.unsafe_compCode = compCode; base.unsafe_reason = reason; base.TrExit(method); } }