Ejemplo n.º 1
0
 /// <summary>
 /// This method disposes the collection.
 /// </summary>
 /// <param name="disposing"></param>
 public override void Dispose(bool disposing)
 {
     if (!disposed && disposing)
     {
         mBoundaryTerminator = null;
         base.Dispose(disposing);
     }
     disposed = true;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// This method validates the boundary.
        /// </summary>
        /// <param name="boundary">The ascii byte collection.</param>
        protected virtual void BoundaryValidate(byte[] boundary)
        {
            if (boundary.Length > 69)
            {
                throw new ArgumentOutOfRangeException("boundary", "boundary is over the maximum permitted length of 69 characters.");
            }

            mBoundaryTerminator = new MatchSequenceTerminator <byte, byte>(boundary, false);;
        }
Ejemplo n.º 3
0
            static MimeMatchCollection()
            {
                mTerminatorDashRequired =
                    new MatchSequenceTerminator <byte, byte>(
                        new byte[] { (byte)'-', (byte)'-' }, true);

                mTerminatorDashOptionalTerminator =
                    new MatchSequenceSkipOrFailTerminator <byte, byte>(
                        new byte[] { (byte)'-', (byte)'-' }, false, null, null);

                mTerminatorWHTSPSkip =
                    new MatchSkipTerminator <byte, byte>(
                        new byte[] { 9, 32 }, true);

                mTerminatorCRLF =
                    new MatchSequenceTerminator <byte, byte>(
                        new byte[] { 13, 10 }, false);
            }
Ejemplo n.º 4
0
 /// <summary>
 /// This constructor initializes the collection with the boundary.
 /// </summary>
 /// <param name="boundary"></param>
 internal MimeMatchCollection(MatchSequenceTerminator <byte, byte> boundaryTerminator)
     : base(null)
 {
     mBoundaryTerminator = boundaryTerminator;
 }