예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="bodyInfo"></param>
        /// <returns></returns>
        public static ContentType ContentType(this MessageBodyInfo bodyInfo)
        {
            #region Validate parameters
            if (bodyInfo == null)
            {
                throw new ArgumentNullException("bodyInfo");
            }
            #endregion

            return(ContentType(bodyInfo.Type, bodyInfo.Name));
        }
예제 #2
0
        /// <summary>
        /// Содержимое закодировано в Base64.
        /// </summary>
        /// <returns></returns>
        public static bool IsBase64(this MessageBodyInfo bodyInfo)
        {
            #region Validate parameters
            if (bodyInfo == null)
            {
                throw new ArgumentNullException("bodyInfo");
            }
            #endregion

            if (String.IsNullOrWhiteSpace(bodyInfo.Type))
            {
                return(false);
            }

            return(bodyInfo.ContentType().IsBase64());
        }