Пример #1
0
        internal MimeHeader(MimeMessageStream 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 System.Collections.Specialized.HybridDictionary(2, true);
            this.Parse();
        }
Пример #2
0
			internal MessageInfo (MimeMessageStream m, long start ) {
				this.start = start;
				this.header = new MimeHeader ( m, this.start );
				this.start_body = this.header.BodyPosition;
				this.end = -1;
				parts = new MimeMessageCollection();
			}
Пример #3
0
 internal MessageInfo(MimeMessageStream m, long start)
 {
     this.start      = start;
     this.header     = new MimeHeader(m, this.start);
     this.start_body = this.header.BodyPosition;
     this.end        = -1;
     parts           = new MimeMessageCollection();
 }
Пример #4
0
        internal MimeHeader(MimeMessageStream 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 System.Collections.Specialized.HybridDictionary(2, true);
            this.Parse();
        }
Пример #5
0
 internal MimeHeader( MimeMessageStream message ) : this ( message, 0 ){}
Пример #6
0
 internal MimeHeader(MimeMessageStream message) : this(message, 0)
 {
 }
Пример #7
0
 private MimeMessage(MimeMessageStream message, long startpoint, long endpoint)
 {
     this.message = message;
     this._mi     = new MessageInfo(this.message, startpoint);
     this._mi.end = endpoint;
 }
Пример #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MimeMessage"/> class from a <see cref="System.IO.Stream"/>
 /// </summary>
 /// <param name="message"><see cref="System.IO.Stream" /> to read the message from</param>
 public MimeMessage(System.IO.Stream message)
 {
     this.message = new MimeMessageStream(message);
     this._mi     = new MessageInfo(this.message, this.message.Stream.Position);
 }
Пример #9
0
		private MimeMessage(MimeMessageStream message, long startpoint, long endpoint ) {
			this.message = message;
			this._mi = new MessageInfo ( this.message, startpoint );
			this._mi.end = endpoint;
		}
Пример #10
0
		/// <summary>
		/// Initializes a new instance of the <see cref="MimeMessage"/> class from a <see cref="System.IO.Stream"/>
		/// </summary>
		/// <param name="message"><see cref="System.IO.Stream" /> to read the message from</param>
		public MimeMessage( System.IO.Stream message ) {
			this.message = new MimeMessageStream (message);
			this._mi = new MessageInfo ( this.message, this.message.Stream.Position );
		}