Пример #1
0
        }   // Constructor 5 of 9


        /// <summary>
        /// Use this constructor to override the default delimiter (comma) and
        /// the protector of delimiters (double quotation marks) by selecting
        /// characters from a pair of enumerations that offer two mutually
        /// exclusive lists of characters.
        /// </summary>
        /// <param name="penmDelimiter">
        /// Use any member of the DelimiterChar enumeration except DelimiterChar.Other
        /// to specify your chosen delimiter.
        /// </param>
        /// <param name="penmProtector">
        /// Use any member of the GuardChar enumeration except GuardChar.Other
        /// to specify your chosen character to protect delimiters.
        /// </param>
        public Parser (
            DelimiterChar penmDelimiter ,
            GuardChar penmProtector )
        {
            _enmDelimiter = penmDelimiter;
            _enmGuard = penmProtector;

            _chrDelimiter = DelimiterCharFromEnum ( penmDelimiter );
            _chrGuard = GuardCharFromEnum ( penmProtector );
        }   // Constructor 6 of 9
Пример #2
0
        }   // Constructor 7 of 9


        /// <summary>
        /// Use this constructor to override the default delimiter (comma) and
        /// the protector of delimiters (double quotation marks) by selecting
        /// characters from a pair of enumerations that offer two mutually
        /// exclusive lists of characters.
        ///
        /// In addition, this constructor can override the default disposition
        /// of guard characters that surround a whole field. By default, these
        /// guard characters are stripped; this constructor allows you to keep
        /// them.
        /// </summary>
        /// <param name="penmDelimiter">
        /// Use any member of the DelimiterChar enumeration except
        /// DelimiterChar.Other to specify your chosen delimiter.
        /// </param>
        /// <param name="penmProtector">
        /// Use any member of the GuardChar enumeration except GuardChar.Other
        /// to specify your chosen character to protect delimiters.
        /// </param>
        /// <param name="penmTrimWhiteSpace">
        /// Specify whether leading or trailing white space should be trimmed
        /// from a field.
        /// </param>
        public Parser (
            DelimiterChar penmDelimiter ,
            GuardChar penmProtector ,
            TrimWhiteSpace penmTrimWhiteSpace )
        {
            _enmDelimiter = penmDelimiter;
            _enmGuard = penmProtector;
            _enmTrimWhiteSpace = penmTrimWhiteSpace;

            _chrDelimiter = DelimiterCharFromEnum ( penmDelimiter );
            _chrGuard = GuardCharFromEnum ( penmProtector );
        }   // Constructor 8 of 9
Пример #3
0
        }   // Constructor 6 of 9


        /// <summary>
        /// Use this constructor to override the default delimiter (comma) and
        /// the protector of delimiters (double quotation marks) by selecting
        /// characters from a pair of enumerations that offer two mutually
        /// exclusive lists of characters.
        ///
        /// In addition, this constructor can override the default disposition
        /// of guard characters that surround a whole field. By default, these
        /// guard characters are stripped; this constructor allows you to keep
        /// them.
        /// </summary>
        /// <param name="penmDelimiter">
        /// Use any member of the DelimiterChar enumeration except
        /// DelimiterChar.Other to specify your chosen delimiter.
        /// </param>
        /// <param name="penmProtector">
        /// Use any member of the GuardChar enumeration except GuardChar.Other
        /// to specify your chosen character to protect delimiters.
        /// </param>
        /// <param name="penmGuardDisposition">
        /// Specify whether guard characters that surround a whole field should
        /// be stripped (default) or kept.
        /// </param>
        public Parser (
            DelimiterChar penmDelimiter ,
            GuardChar penmProtector ,
            GuardDisposition penmGuardDisposition )
        {
            _enmDelimiter = penmDelimiter;
            _enmGuard = penmProtector;
            _enmGuardDisposition = penmGuardDisposition;

            _chrDelimiter = DelimiterCharFromEnum ( penmDelimiter );
            _chrGuard = GuardCharFromEnum ( penmProtector );
        }   // Constructor 7 of 9
Пример #4
0
        }   // Constructor 3 of 9


        /// <summary>
        /// Use this constructor to override the default protector of delimiters
        /// (double quote) by selecting a character from an enumeration.
        /// </summary>
        /// <param name="penmProtector">
        /// Use any member of the GuardChar enumeration except GuardChar.Other
        /// to specify your chosen character to protect delimiters.
        /// </param>
        public Parser ( GuardChar penmProtector )
        {
            _enmGuard = penmProtector;
            _chrGuard = GuardCharFromEnum ( penmProtector );
        }   // Constructor 4 of 9