Esempio n. 1
0
 internal MessageInfo(SharpMimeMessageStream m, long start)
 {
     this.start = start;
     header = new SharpMimeHeader(m, this.start);
     start_body = header.BodyPosition;
     end = -1;
     parts = new SharpMimeMessageCollection();
 }
Esempio n. 2
0
 internal SharpMimeHeader(SharpMimeMessageStream message, long startpoint)
 {
     this.startpoint = startpoint;
     this.message = message;
     if (this.startpoint == 0)
     {
         String line = this.message.ReadLine();
         // Perhaps there is part of the POP3 response
         if (line != null && line.Length > 3 && line[0] == '+' && line[1] == 'O' && line[2] == 'K')
         {
             this.startpoint = this.message.Position;
         }
         else
             this.message.ReadLine_Undo(line);
     }
     headers = new HybridDictionary(2, true);
     parse();
 }
Esempio n. 3
0
 internal SharpMimeHeader(SharpMimeMessageStream message) : this(message, 0) { }
Esempio n. 4
0
		/// <summary>
		/// Initializes a new instance of the <see cref="SharpMimeMessage"/> class from a <see cref="System.IO.Stream"/>
		/// </summary>
		/// <param name="message"><see cref="System.IO.Stream" /> to read the message from</param>
        public SharpMimeMessage(Stream message)
        {
            this.message = new SharpMimeMessageStream(message);
            mi = new MessageInfo(this.message, this.message.Stream.Position);
        }
Esempio n. 5
0
 private SharpMimeMessage(SharpMimeMessageStream message, long startpoint, long endpoint)
 {
     this.message = message;
     mi = new MessageInfo(this.message, startpoint) { end = endpoint };
 }
Esempio n. 6
0
 internal SharpMimeHeader(SharpMimeMessageStream message, long startpoint)
 {
     this.startpoint = startpoint;
     this.message = message;
     if ( this.startpoint==0 ) {
         System.String line = this.message.ReadLine();
         // Perhaps there is part of the POP3 response
         if ( line!=null && line.Length>3 && line[0]=='+' && line[1]=='O' && line[2]=='K' ) {
     #if LOG
             if ( log.IsDebugEnabled ) log.Debug ("+OK present at top of the message");
     #endif
             this.startpoint = this.message.Position;
         } else this.message.ReadLine_Undo(line);
     }
     this.headers = new HybridDictionary(2, true);
     this.parse();
 }