Пример #1
0
        /// <summary>
        /// Get property of a message using property name
        /// </summary>
        /// <param name="name">property name</param>
        /// <returns></returns>
        public String GetProperty(string name)
        {
            String propertyString = null;
            List <IPropertyInfo> propertyInfos = monitor.GetMessageType(messageId).AllProperties.ToList();

            foreach (var propertyInfo in propertyInfos)
            {
                if (propertyInfo.Name.ToLower().Equals(name.ToLower()))
                {
                    propertyString = monitor.GetMessageDisplayData(messageId, propertyInfo).Values[0].ToString();
                    break;
                }
            }
            return(propertyString);
        }