/// <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)); }
/// <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()); }