Beispiel #1
0
 internal void Set(string contentType, HeaderCollection headers)
 {
     _type = contentType;
     ParseValue();
     headers.InternalSet(MailHeaderInfo.GetString(MailHeaderID.ContentType) !, ToString());
     _isPersisted = true;
 }
Beispiel #2
0
 internal void Set(string contentDisposition, HeaderCollection headers)
 {
     this.disposition = contentDisposition;
     this.ParseValue();
     headers.InternalSet(MailHeaderInfo.GetString(MailHeaderID.ContentDisposition), this.ToString());
     this.isPersisted = true;
 }
Beispiel #3
0
 internal void Set(string contentType, HeaderCollection headers)
 {
     this.type = contentType;
     this.ParseValue();
     headers.InternalSet(MailHeaderInfo.GetString(MailHeaderID.ContentType), this.ToString());
     this.isPersisted = true;
 }
Beispiel #4
0
 internal void PersistIfNeeded(HeaderCollection headers, bool forcePersist)
 {
     if ((this.IsChanged || !this.isPersisted) || forcePersist)
     {
         headers.InternalSet(MailHeaderInfo.GetString(MailHeaderID.ContentDisposition), this.ToString());
         this.isPersisted = true;
     }
 }
Beispiel #5
0
 internal void PersistIfNeeded(HeaderCollection headers, bool forcePersist)
 {
     if (IsChanged || !_isPersisted || forcePersist)
     {
         headers.InternalSet(MailHeaderInfo.GetString(MailHeaderID.ContentType) !, ToString());
         _isPersisted = true;
     }
 }
 internal void Set(string contentDisposition, HeaderCollection headers)
 {
     // we don't set ischanged because persistence was already handled
     // via the headers.
     _disposition = contentDisposition;
     ParseValue();
     headers.InternalSet(MailHeaderInfo.GetString(MailHeaderID.ContentDisposition), ToString());
     _isPersisted = true;
 }
Beispiel #7
0
        internal void PrepareHeaders(bool allowUnicode)
        {
            _contentType.PersistIfNeeded((HeaderCollection)Headers, false);
            _headers.InternalSet(MailHeaderInfo.GetString(MailHeaderID.ContentType), _contentType.Encode(allowUnicode));

            if (_contentDisposition != null)
            {
                _contentDisposition.PersistIfNeeded((HeaderCollection)Headers, false);
                _headers.InternalSet(MailHeaderInfo.GetString(MailHeaderID.ContentDisposition), _contentDisposition.Encode(allowUnicode));
            }
        }