Exemplo n.º 1
0
 public SerializableContentType(ContentType contentType)
 {
     Boundary   = contentType.Boundary;
     CharSet    = contentType.CharSet;
     MediaType  = contentType.MediaType;
     Name       = contentType.Name;
     Parameters = new SerializableCollection(contentType.Parameters);
 }
Exemplo n.º 2
0
		public SerializableContentType(ContentType contentType)
		{
			Boundary = contentType.Boundary;
			CharSet = contentType.CharSet;
			MediaType = contentType.MediaType;
			Name = contentType.Name;
			Parameters = new SerializableCollection(contentType.Parameters);
		}
		public SerializableContentDisposition(ContentDisposition contentDisposition)
		{
			CreationDate = contentDisposition.CreationDate;
			DispositionType = contentDisposition.DispositionType;
			FileName = contentDisposition.FileName;
			Inline = contentDisposition.Inline;
			ModificationDate = contentDisposition.ModificationDate;
			Parameters = new SerializableCollection(contentDisposition.Parameters);
			ReadDate = contentDisposition.ReadDate;
			Size = contentDisposition.Size;
		}
Exemplo n.º 4
0
 public SerializableContentDisposition(ContentDisposition contentDisposition)
 {
     CreationDate     = contentDisposition.CreationDate;
     DispositionType  = contentDisposition.DispositionType;
     FileName         = contentDisposition.FileName;
     Inline           = contentDisposition.Inline;
     ModificationDate = contentDisposition.ModificationDate;
     Parameters       = new SerializableCollection(contentDisposition.Parameters);
     ReadDate         = contentDisposition.ReadDate;
     Size             = contentDisposition.Size;
 }
Exemplo n.º 5
0
        public SerializableMailMessage(MailMessage mailMessage)
        {
            IsBodyHtml = mailMessage.IsBodyHtml;
            Body       = mailMessage.Body;
            Subject    = mailMessage.Subject;
            From       = new SerializableMailAddress(mailMessage.From);

            foreach (MailAddress ma in mailMessage.To)
            {
                To.Add(new SerializableMailAddress(ma));
            }

            foreach (MailAddress ma in mailMessage.CC)
            {
                CC.Add(new SerializableMailAddress(ma));
            }

            foreach (MailAddress ma in mailMessage.Bcc)
            {
                Bcc.Add(new SerializableMailAddress(ma));
            }

            foreach (Attachment att in mailMessage.Attachments)
            {
                Attachments.Add(new SerializableAttachment(att));
            }

            BodyEncoding = mailMessage.BodyEncoding;

            DeliveryNotificationOptions = mailMessage.DeliveryNotificationOptions;
            Headers  = new SerializableCollection(mailMessage.Headers);
            Priority = mailMessage.Priority;

            foreach (MailAddress ma in mailMessage.ReplyToList)
            {
                ReplyToList.Add(new SerializableMailAddress(ma));
            }

            if (mailMessage.Sender != null)
            {
                Sender = new SerializableMailAddress(mailMessage.Sender);
            }

            SubjectEncoding = mailMessage.SubjectEncoding;

            foreach (AlternateView av in mailMessage.AlternateViews)
            {
                AlternateViews.Add(new SerializableAlternateView(av));
            }
        }
Exemplo n.º 6
0
		public SerializableMailMessage(MailMessage mailMessage)
		{
			IsBodyHtml = mailMessage.IsBodyHtml;
			Body = mailMessage.Body;
			Subject = mailMessage.Subject;
			From = new SerializableMailAddress(mailMessage.From);

			foreach (MailAddress ma in mailMessage.To)
				To.Add(new SerializableMailAddress(ma));

			foreach (MailAddress ma in mailMessage.CC)
				CC.Add(new SerializableMailAddress(ma));

			foreach (MailAddress ma in mailMessage.Bcc)
				Bcc.Add(new SerializableMailAddress(ma));

			foreach (Attachment att in mailMessage.Attachments)
				Attachments.Add(new SerializableAttachment(att));

			BodyEncoding = mailMessage.BodyEncoding;

			DeliveryNotificationOptions = mailMessage.DeliveryNotificationOptions;
			Headers = new SerializableCollection(mailMessage.Headers);
			Priority = mailMessage.Priority;

			foreach (MailAddress ma in mailMessage.ReplyToList)
				ReplyToList.Add(new SerializableMailAddress(ma));

			if (mailMessage.Sender != null)
				Sender = new SerializableMailAddress(mailMessage.Sender);

			SubjectEncoding = mailMessage.SubjectEncoding;

			foreach (AlternateView av in mailMessage.AlternateViews)
				AlternateViews.Add(new SerializableAlternateView(av));
		}