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 })));
     }
 }
Ejemplo n.º 3
0
 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)));
 }
Ejemplo n.º 4
0
 // 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)));
 }