private void CheckContentTransferEncodingOnRoot(ContentTransferEncodingHeader header)
 {
     if ((header != null) && (header.ContentTransferEncoding == ContentTransferEncoding.Other))
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("MtomContentTransferEncodingNotSupported", new object[] { header.Value, ContentTransferEncodingHeader.SevenBit.ContentTransferEncodingValue, ContentTransferEncodingHeader.EightBit.ContentTransferEncodingValue, ContentTransferEncodingHeader.Binary.ContentTransferEncodingValue })));
     }
 }
 private void CheckContentTransferEncodingOnBinaryPart(ContentTransferEncodingHeader header)
 {
     if (header == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("MtomContentTransferEncodingNotPresent", new object[] { ContentTransferEncodingHeader.Binary.ContentTransferEncodingValue })));
     }
     if (header.ContentTransferEncoding != ContentTransferEncoding.Binary)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString("MtomInvalidTransferEncodingForMimePart", new object[] { header.Value, ContentTransferEncodingHeader.Binary.ContentTransferEncodingValue })));
     }
 }
 void CheckContentTransferEncodingOnBinaryPart(ContentTransferEncodingHeader header)
 {
     if (header == null)
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(SR.GetString(SR.MtomContentTransferEncodingNotPresent,
             ContentTransferEncodingHeader.Binary.ContentTransferEncodingValue)));
     else if (header.ContentTransferEncoding != ContentTransferEncoding.Binary)
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(SR.GetString(SR.MtomInvalidTransferEncodingForMimePart,
             header.Value, ContentTransferEncodingHeader.Binary.ContentTransferEncodingValue)));
 }
 // 7bit is default encoding in the absence of content-transfer-encoding header 
 void CheckContentTransferEncodingOnRoot(ContentTransferEncodingHeader header)
 {
     if (header != null && header.ContentTransferEncoding == ContentTransferEncoding.Other)
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(SR.GetString(SR.MtomContentTransferEncodingNotSupported,
                                                                               header.Value,
                                                                               ContentTransferEncodingHeader.SevenBit.ContentTransferEncodingValue,
                                                                               ContentTransferEncodingHeader.EightBit.ContentTransferEncodingValue,
                                                                               ContentTransferEncodingHeader.Binary.ContentTransferEncodingValue)));
 }