コード例 #1
0
 /// <summary>
 /// Tries to get the 'charset' portion of the given mime-part's content-type
 /// </summary>
 /// <param name="mimePart">The mime part to get the charset for</param>
 /// <param name="charset">The charset if its value is found</param>
 /// <returns>Whether or not the charset was found</returns>
 public static bool TryGetMimeCharset(this IMimePart mimePart, out string charset)
 {
     ExceptionUtilities.CheckArgumentNotNull(mimePart, "mimePart");
     return(mimePart.TryGetContentTypeParameter(HttpHeaders.Charset, out charset));
 }
コード例 #2
0
 /// <summary>
 /// Tries to get the 'boundary' portion of the given mime-part's content-type
 /// </summary>
 /// <param name="mimePart">The mime part to get the boundary for</param>
 /// <param name="boundary">The boundary if its value is found</param>
 /// <returns>Whether or not the boundary was found</returns>
 public static bool TryGetMimeBoundary(this IMimePart mimePart, out string boundary)
 {
     ExceptionUtilities.CheckArgumentNotNull(mimePart, "mimePart");
     return(mimePart.TryGetContentTypeParameter(HttpHeaders.Boundary, out boundary));
 }