Exemple #1
0
        public void loadProperties(Message msg)
        {
            string body, bodyProps;

            if (msg.Body == null)
            {
                body = "";
            }
            else
            {
                body = msg.Body.ToString();
            }

            int ptysPos = body.IndexOf("[GxPtys:]");

            if (ptysPos >= 0)
            {
                bodyProps = body.Substring(ptysPos + 9);
                properties.Clear();
                string[] nameValue;
                string[] ptys = bodyProps.Split(';');
                foreach (string pty in ptys)
                {
                    if (pty.Trim().Length > 0)
                    {
                        nameValue = pty.Split('=');
                        properties.Add(nameValue[0].Trim(), nameValue[1]);
                    }
                }
                msg.Body = removeProperties(body);
            }
        }