Example #1
0
        public void TestMethod1()
        {
            string serverName = GeneralHelper.GetConfigurationValue("BizTalkSqlServer");

            BizTalkObject bizTalkObject = new BizTalkObject(serverName: serverName);
            string        messageId     = "A29E9D0C-7169-48ED-951F-7A2C94E68802";
            string        messageBody   = bizTalkObject.GetMessageString(messageId: messageId);

            Assert.IsNotNull(messageBody);
            messageId   = "FF69A72B-47A7-4F82-BADC-FC964EE18832";
            messageBody = bizTalkObject.GetMessageString(messageId: messageId);
            Assert.IsNull(messageBody);
        }
Example #2
0
        public string GetMessage(string messageId, string encoding = null)
        {
            Encoding enc = null;

            if (!string.IsNullOrWhiteSpace(encoding))
            {
                enc = Encoding.GetEncoding(name: encoding);
            }
            string result = _bizTalkObject.GetMessageString(messageId: messageId, encoding: enc);

            return(result);
        }