コード例 #1
0
        internal ExtractionContext(ValueExtractor extractor)
        {
            _extractor = extractor;

            _result         = default;
            _resultAssigned = false;
        }
コード例 #2
0
        /// <summary>
        /// Creates a <see cref="ValueExtractor"/> instance configured using the provided configuration method.
        /// </summary>
        /// <param name="configurator">A method that sets configuration options for a new <see cref="ValueExtractor"/> instance.</param>
        /// <returns>A new <see cref="ValueExtractor"/> instance.</returns>
        public static ValueExtractor Create(ValueExtractorConfigurator configurator)
        {
            if (configurator is null)
            {
                throw new ArgumentNullException(nameof(configurator));
            }

            ValueExtractor extractor = new ValueExtractor();

            configurator(new Configuration(extractor));

            return(extractor);
        }
 public Configuration(ValueExtractor extractor)
 {
     _extractor = extractor;
 }