internal void Set(string contentType, HeaderCollection headers) { _type = contentType; ParseValue(); headers.InternalSet(MailHeaderInfo.GetString(MailHeaderID.ContentType) !, ToString()); _isPersisted = true; }
internal void Set(string contentDisposition, HeaderCollection headers) { this.disposition = contentDisposition; this.ParseValue(); headers.InternalSet(MailHeaderInfo.GetString(MailHeaderID.ContentDisposition), this.ToString()); this.isPersisted = true; }
internal void Set(string contentType, HeaderCollection headers) { this.type = contentType; this.ParseValue(); headers.InternalSet(MailHeaderInfo.GetString(MailHeaderID.ContentType), this.ToString()); this.isPersisted = true; }
internal void PersistIfNeeded(HeaderCollection headers, bool forcePersist) { if ((this.IsChanged || !this.isPersisted) || forcePersist) { headers.InternalSet(MailHeaderInfo.GetString(MailHeaderID.ContentDisposition), this.ToString()); this.isPersisted = true; } }
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; }
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)); } }