Defines data for a Parser configuration object.
Inheritance: ICloneable
コード例 #1
0
        /// <summary>
        ///     Ctor
        /// </summary>
        /// <param name="parserConfiguration">
        ///     Parser's <see cref="IniParserConfiguration"/> instance.
        /// </param>
        public IniDataParser(IniParserConfiguration parserConfiguration)
        {
            if (parserConfiguration == null)
                throw new ArgumentNullException("parserConfiguration");

            Configuration = parserConfiguration;

            _errorExceptions = new List<Exception>();
        }
コード例 #2
0
        /// <summary>
        ///     Copy ctor.
        /// </summary>
        /// <param name="ori">
        ///     Original instance to be copied.
        /// </param>
        public IniParserConfiguration(IniParserConfiguration ori)
        {
            AllowDuplicateKeys      = ori.AllowDuplicateKeys;
            OverrideDuplicateKeys   = ori.OverrideDuplicateKeys;
            AllowDuplicateSections  = ori.AllowDuplicateSections;
            AllowKeysWithoutSection = ori.AllowKeysWithoutSection;

            SectionStartChar       = ori.SectionStartChar;
            SectionEndChar         = ori.SectionEndChar;
            CommentString          = ori.CommentString;
            ThrowExceptionsOnError = ori.ThrowExceptionsOnError;

            // Regex values should recreate themselves.
        }
コード例 #3
0
        /// <summary>
        ///     Copy ctor.
        /// </summary>
        /// <param name="ori">
        ///     Original instance to be copied.
        /// </param>
        public IniParserConfiguration(IniParserConfiguration ori)
        {
            AllowDuplicateKeys = ori.AllowDuplicateKeys;
            OverrideDuplicateKeys = ori.OverrideDuplicateKeys;
            AllowDuplicateSections = ori.AllowDuplicateSections;
            AllowKeysWithoutSection = ori.AllowKeysWithoutSection;

            SectionStartChar = ori.SectionStartChar;
            SectionEndChar = ori.SectionEndChar;
            CommentString = ori.CommentString;
            ThrowExceptionsOnError = ori.ThrowExceptionsOnError;

          // Regex values should recreate themselves.
        }
コード例 #4
0
 public AlignedIniDataFormatter(IniParserConfiguration configuration)
 {
     if (configuration == null)
         throw new ArgumentNullException("configuration");
     this.Configuration = configuration;
 }